1//  Copyright (c) 2019 Couchbase, Inc.
2//  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
3//  except in compliance with the License. You may obtain a copy of the License at
4//    http://www.apache.org/licenses/LICENSE-2.0
5//  Unless required by applicable law or agreed to in writing, software distributed under the
6//  License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
7//  either express or implied. See the License for the specific language governing permissions
8//  and limitations under the License.
9
10package errors
11
12func NewVirtualKSNotSupportedError(e error, msg string) Error {
13	return &err{level: EXCEPTION, ICode: 17000, IKey: "datastore.virtual.keyspace.not_supported", ICause: e,
14		InternalMsg: "Virtual Keyspace : Not supported " + msg, InternalCaller: CallerN(1)}
15}
16
17func NewVirtualKSNotImplementedError(e error, msg string) Error {
18	return &err{level: EXCEPTION, ICode: 17001, IKey: "datastore.virtual.keyspace.not_implemented", ICause: e,
19		InternalMsg: "Virtual Keyspace : Not yet implemented " + msg, InternalCaller: CallerN(1)}
20}
21
22func NewVirtualKSIdxerNotFoundError(e error, msg string) Error {
23	return &err{level: EXCEPTION, ICode: 17002, IKey: "datastore.virtual.keyspace.not_found", ICause: e,
24		InternalMsg: "Virtual keyspace : Indexer not found " + msg, InternalCaller: CallerN(1)}
25}
26
27func NewVirtualIdxNotFoundError(e error, msg string) Error {
28	return &err{level: EXCEPTION, ICode: 17003, IKey: "datastore.virtual.indexer.not_found", ICause: e,
29		InternalMsg: "Virtual indexer : Index not found " + msg, InternalCaller: CallerN(1)}
30
31}
32
33func NewVirtualIdxerNotSupportedError(e error, msg string) Error {
34	return &err{level: EXCEPTION, ICode: 17004, IKey: "datastore.virtual.indexer.not_supported", ICause: e,
35		InternalMsg: "Virtual Indexer : Not supported " + msg, InternalCaller: CallerN(1)}
36}
37
38func NewVirtualIdxNotImplementedError(e error, msg string) Error {
39	return &err{level: EXCEPTION, ICode: 17005, IKey: "datastore.virtual.index.not_implemented", ICause: e,
40		InternalMsg: "Virtual index : Not yet implemented " + msg, InternalCaller: CallerN(1)}
41}
42
43func NewVirtualIdxNotSupportedError(e error, msg string) Error {
44	return &err{level: EXCEPTION, ICode: 17006, IKey: "datastore.virtual.index.not_supported", ICause: e,
45		InternalMsg: "Virtual Index : Not supported " + msg, InternalCaller: CallerN(1)}
46}
47