* Install buf with go install This reduces the impact of using buf on our dependency closure, which was significant. It also avoids potential issues with building buf given our own internal dependency constraints. This has caused issues (including crashes!) in the past. See https://github.com/cockroachdb/cockroach/issues/67216#issuecomment-874176186 for more discussion on using tool dependencies generally, and https://github.com/bufbuild/buf/issues/52 for an example of where this sort of thing caused an issue for a user. * Upgrade buf version We should migrate to v1 sooner rather than later, as it has some breaking changes from v0. * Change buf lint/breaking commands These commands were moved up one level for v1 * Migrate to buf.yaml to v1 * Remove unused imports These were uncovered by using "buf lint". * Use buf v1.3.1 * Depend on googleapis and grpc-gateway via BSR * Switch to buf for proto generation * Remove third party dependency * Remove unused tools and scripts * Move local protos up one level * Temporarily don't fail on breaking changes * Generate CI config * Fix generation of controller.json * Replace use of deprecated flag * Remove unused import, regenerate files * Remove temporary skipping over breaking check
323 lines
9.8 KiB
Go
323 lines
9.8 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.27.1
|
|
// 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
|
|
}
|