* Adding explicit MPL license for sub-package. This directory and its subdirectories (packages) contain files licensed with the MPLv2 `LICENSE` file in this directory and are intentionally licensed separately from the BSL `LICENSE` file at the root of this repository. * Adding explicit MPL license for sub-package This directory and its subdirectories (packages) contain files licensed with the MPLv2 `LICENSE` file in this directory and are intentionally licensed separately from the BSL `LICENSE` file at the root of this repository. * Updating the license from MPL to Business Source License Going forward, this project will be licensed under the Business Source License v1.1. Please see our blog post for more details at https://hashi.co/bsl-blog, FAQ at www.hashicorp.com/licensing-faq, and details of the license at www.hashicorp.com/bsl. * Update copyright file headers to BUS-1.1 * Rerun make gen This will pick up the last of the license changes * Revert "Rerun make gen" This reverts commit dbe0968bffd92745d8663c6940debae098395a6b. * Remove copywrite from generation script The current version of copywrite is not sophisticated enough to only apply the copywrite changes to certain subdirectories, so to avoid accidentally relicensing our api and sdk modules, we will stop running the copywrite script until such time that it can do the right thing. * License protobuf API as MPL The protobuf API files are used to generate the SDK, since we want the SDK to be MPL, the protobuf files must also be MPL. This extends to all protobuf files whose sources end up in the SDK directory, including: - internal/proto/controller/api - internal/proto/controller/custom_options - internal/proto/plugin It also includes the generated service directory in internal/gen/controller/api/services, since they are generated from the protobuf sources used for the SDK. * Change website license file name This makes the naming scheme consistent with the rest of the repository. * Add note on licensing to README * Set copywrite license to BUSL * Revert "Add note on licensing to README" This reverts commit 4d865a91a7a4f11605f0dc4609355d7e3c3cfffe. --------- Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com> Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
327 lines
9.9 KiB
Go
327 lines
9.9 KiB
Go
// Copyright (c) HashiCorp, Inc.
|
|
// SPDX-License-Identifier: BUSL-1.1
|
|
|
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.30.0
|
|
// protoc (unknown)
|
|
// source: errors/v1/errors.proto
|
|
|
|
package errors
|
|
|
|
import (
|
|
api "github.com/hashicorp/boundary/internal/gen/controller/api"
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
reflect "reflect"
|
|
sync "sync"
|
|
)
|
|
|
|
const (
|
|
// Verify that this generated code is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
|
)
|
|
|
|
// Err is a protobuf representation of a domain error
|
|
type Err struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
// code is the error's code, which can be used to get the error's
|
|
// errorCodeInfo, which contains the error's Kind and Message
|
|
Code uint32 `protobuf:"varint,10,opt,name=code,proto3" json:"code,omitempty"`
|
|
// msg for the error
|
|
Msg string `protobuf:"bytes,20,opt,name=msg,proto3" json:"msg,omitempty"`
|
|
// op represents the operation raising/propagating an error and is optional.
|
|
Op string `protobuf:"bytes,30,opt,name=op,proto3" json:"op,omitempty"`
|
|
// wrapped represents an optionally wrapped error
|
|
//
|
|
// Types that are assignable to Wrapped:
|
|
//
|
|
// *Err_Err
|
|
// *Err_StdError
|
|
// *Err_None
|
|
Wrapped isErr_Wrapped `protobuf_oneof:"wrapped"`
|
|
}
|
|
|
|
func (x *Err) Reset() {
|
|
*x = Err{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_errors_v1_errors_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *Err) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*Err) ProtoMessage() {}
|
|
|
|
func (x *Err) ProtoReflect() protoreflect.Message {
|
|
mi := &file_errors_v1_errors_proto_msgTypes[0]
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use Err.ProtoReflect.Descriptor instead.
|
|
func (*Err) Descriptor() ([]byte, []int) {
|
|
return file_errors_v1_errors_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *Err) GetCode() uint32 {
|
|
if x != nil {
|
|
return x.Code
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *Err) GetMsg() string {
|
|
if x != nil {
|
|
return x.Msg
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Err) GetOp() string {
|
|
if x != nil {
|
|
return x.Op
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Err) GetWrapped() isErr_Wrapped {
|
|
if m != nil {
|
|
return m.Wrapped
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *Err) GetErr() *Err {
|
|
if x, ok := x.GetWrapped().(*Err_Err); ok {
|
|
return x.Err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *Err) GetStdError() string {
|
|
if x, ok := x.GetWrapped().(*Err_StdError); ok {
|
|
return x.StdError
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Err) GetNone() bool {
|
|
if x, ok := x.GetWrapped().(*Err_None); ok {
|
|
return x.None
|
|
}
|
|
return false
|
|
}
|
|
|
|
type isErr_Wrapped interface {
|
|
isErr_Wrapped()
|
|
}
|
|
|
|
type Err_Err struct {
|
|
// err is a wrapped Err (aka a domain error)
|
|
Err *Err `protobuf:"bytes,40,opt,name=err,proto3,oneof"`
|
|
}
|
|
|
|
type Err_StdError struct {
|
|
// std_error is a wrapped std error
|
|
StdError string `protobuf:"bytes,50,opt,name=std_error,json=stdError,proto3,oneof"`
|
|
}
|
|
|
|
type Err_None struct {
|
|
// no error or err is wrapped
|
|
None bool `protobuf:"varint,60,opt,name=none,proto3,oneof"`
|
|
}
|
|
|
|
func (*Err_Err) isErr_Wrapped() {}
|
|
|
|
func (*Err_StdError) isErr_Wrapped() {}
|
|
|
|
func (*Err_None) isErr_Wrapped() {}
|
|
|
|
// ApiError is a protobuf representation of a controller ApiError
|
|
type ApiError struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
// api_error is the controller ApiError
|
|
ApiError *api.Error `protobuf:"bytes,10,opt,name=api_error,json=apiError,proto3" json:"api_error,omitempty"`
|
|
// status is the status code assocatiated with the api error
|
|
Status int32 `protobuf:"varint,20,opt,name=status,proto3" json:"status,omitempty"`
|
|
}
|
|
|
|
func (x *ApiError) Reset() {
|
|
*x = ApiError{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_errors_v1_errors_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *ApiError) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ApiError) ProtoMessage() {}
|
|
|
|
func (x *ApiError) ProtoReflect() protoreflect.Message {
|
|
mi := &file_errors_v1_errors_proto_msgTypes[1]
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use ApiError.ProtoReflect.Descriptor instead.
|
|
func (*ApiError) Descriptor() ([]byte, []int) {
|
|
return file_errors_v1_errors_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *ApiError) GetApiError() *api.Error {
|
|
if x != nil {
|
|
return x.ApiError
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *ApiError) GetStatus() int32 {
|
|
if x != nil {
|
|
return x.Status
|
|
}
|
|
return 0
|
|
}
|
|
|
|
var File_errors_v1_errors_proto protoreflect.FileDescriptor
|
|
|
|
var file_errors_v1_errors_proto_rawDesc = []byte{
|
|
0x0a, 0x16, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x72, 0x72, 0x6f,
|
|
0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73,
|
|
0x2e, 0x76, 0x31, 0x1a, 0x1d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f,
|
|
0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f,
|
|
0x74, 0x6f, 0x22, 0x9f, 0x01, 0x0a, 0x03, 0x45, 0x72, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f,
|
|
0x64, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x10,
|
|
0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67,
|
|
0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x70, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x6f, 0x70,
|
|
0x12, 0x22, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x28, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e,
|
|
0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x72, 0x72, 0x48, 0x00, 0x52,
|
|
0x03, 0x65, 0x72, 0x72, 0x12, 0x1d, 0x0a, 0x09, 0x73, 0x74, 0x64, 0x5f, 0x65, 0x72, 0x72, 0x6f,
|
|
0x72, 0x18, 0x32, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x73, 0x74, 0x64, 0x45, 0x72,
|
|
0x72, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x04, 0x6e, 0x6f, 0x6e, 0x65, 0x18, 0x3c, 0x20, 0x01, 0x28,
|
|
0x08, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x6f, 0x6e, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x77, 0x72, 0x61,
|
|
0x70, 0x70, 0x65, 0x64, 0x22, 0x59, 0x0a, 0x08, 0x41, 0x70, 0x69, 0x45, 0x72, 0x72, 0x6f, 0x72,
|
|
0x12, 0x35, 0x0a, 0x09, 0x61, 0x70, 0x69, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x0a, 0x20,
|
|
0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72,
|
|
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x08, 0x61,
|
|
0x70, 0x69, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75,
|
|
0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42,
|
|
0x3a, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61,
|
|
0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x72, 0x79,
|
|
0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x65, 0x72,
|
|
0x72, 0x6f, 0x72, 0x73, 0x3b, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
|
0x74, 0x6f, 0x33,
|
|
}
|
|
|
|
var (
|
|
file_errors_v1_errors_proto_rawDescOnce sync.Once
|
|
file_errors_v1_errors_proto_rawDescData = file_errors_v1_errors_proto_rawDesc
|
|
)
|
|
|
|
func file_errors_v1_errors_proto_rawDescGZIP() []byte {
|
|
file_errors_v1_errors_proto_rawDescOnce.Do(func() {
|
|
file_errors_v1_errors_proto_rawDescData = protoimpl.X.CompressGZIP(file_errors_v1_errors_proto_rawDescData)
|
|
})
|
|
return file_errors_v1_errors_proto_rawDescData
|
|
}
|
|
|
|
var file_errors_v1_errors_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
|
var file_errors_v1_errors_proto_goTypes = []interface{}{
|
|
(*Err)(nil), // 0: errors.v1.Err
|
|
(*ApiError)(nil), // 1: errors.v1.ApiError
|
|
(*api.Error)(nil), // 2: controller.api.v1.Error
|
|
}
|
|
var file_errors_v1_errors_proto_depIdxs = []int32{
|
|
0, // 0: errors.v1.Err.err:type_name -> errors.v1.Err
|
|
2, // 1: errors.v1.ApiError.api_error:type_name -> controller.api.v1.Error
|
|
2, // [2:2] is the sub-list for method output_type
|
|
2, // [2:2] is the sub-list for method input_type
|
|
2, // [2:2] is the sub-list for extension type_name
|
|
2, // [2:2] is the sub-list for extension extendee
|
|
0, // [0:2] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_errors_v1_errors_proto_init() }
|
|
func file_errors_v1_errors_proto_init() {
|
|
if File_errors_v1_errors_proto != nil {
|
|
return
|
|
}
|
|
if !protoimpl.UnsafeEnabled {
|
|
file_errors_v1_errors_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*Err); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
file_errors_v1_errors_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*ApiError); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
}
|
|
file_errors_v1_errors_proto_msgTypes[0].OneofWrappers = []interface{}{
|
|
(*Err_Err)(nil),
|
|
(*Err_StdError)(nil),
|
|
(*Err_None)(nil),
|
|
}
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: file_errors_v1_errors_proto_rawDesc,
|
|
NumEnums: 0,
|
|
NumMessages: 2,
|
|
NumExtensions: 0,
|
|
NumServices: 0,
|
|
},
|
|
GoTypes: file_errors_v1_errors_proto_goTypes,
|
|
DependencyIndexes: file_errors_v1_errors_proto_depIdxs,
|
|
MessageInfos: file_errors_v1_errors_proto_msgTypes,
|
|
}.Build()
|
|
File_errors_v1_errors_proto = out.File
|
|
file_errors_v1_errors_proto_rawDesc = nil
|
|
file_errors_v1_errors_proto_goTypes = nil
|
|
file_errors_v1_errors_proto_depIdxs = nil
|
|
}
|