Documentation ¶
Overview ¶
Package proto is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterEasyCarHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterEasyCarHandlerClient(ctx context.Context, mux *runtime.ServeMux, client EasyCarClient) error
- func RegisterEasyCarHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterEasyCarHandlerServer(ctx context.Context, mux *runtime.ServeMux, server EasyCarServer) error
- func RegisterEasyCarServer(s grpc.ServiceRegistrar, srv EasyCarServer)
- type Action
- type BeginResp
- func (*BeginResp) Descriptor() ([]byte, []int)deprecated
- func (x *BeginResp) GetGId() string
- func (*BeginResp) ProtoMessage()
- func (x *BeginResp) ProtoReflect() protoreflect.Message
- func (x *BeginResp) Reset()
- func (x *BeginResp) String() string
- func (m *BeginResp) Validate() error
- func (m *BeginResp) ValidateAll() error
- type BeginRespMultiError
- type BeginRespValidationError
- type BranchState
- func (BranchState) Descriptor() protoreflect.EnumDescriptor
- func (x BranchState) Enum() *BranchState
- func (BranchState) EnumDescriptor() ([]byte, []int)deprecated
- func (x BranchState) Number() protoreflect.EnumNumber
- func (x BranchState) String() string
- func (BranchState) Type() protoreflect.EnumType
- type CommitReq
- func (*CommitReq) Descriptor() ([]byte, []int)deprecated
- func (x *CommitReq) GetGId() string
- func (*CommitReq) ProtoMessage()
- func (x *CommitReq) ProtoReflect() protoreflect.Message
- func (x *CommitReq) Reset()
- func (x *CommitReq) String() string
- func (m *CommitReq) Validate() error
- func (m *CommitReq) ValidateAll() error
- type CommitReqMultiError
- type CommitReqValidationError
- type EasyCarClient
- type EasyCarServer
- type GetStateReq
- func (*GetStateReq) Descriptor() ([]byte, []int)deprecated
- func (x *GetStateReq) GetGId() string
- func (*GetStateReq) ProtoMessage()
- func (x *GetStateReq) ProtoReflect() protoreflect.Message
- func (x *GetStateReq) Reset()
- func (x *GetStateReq) String() string
- func (m *GetStateReq) Validate() error
- func (m *GetStateReq) ValidateAll() error
- type GetStateReqMultiError
- type GetStateReqValidationError
- func (e GetStateReqValidationError) Cause() error
- func (e GetStateReqValidationError) Error() string
- func (e GetStateReqValidationError) ErrorName() string
- func (e GetStateReqValidationError) Field() string
- func (e GetStateReqValidationError) Key() bool
- func (e GetStateReqValidationError) Reason() string
- type GetStateResp
- func (*GetStateResp) Descriptor() ([]byte, []int)deprecated
- func (x *GetStateResp) GetBranches() []*GetStateRespBranch
- func (x *GetStateResp) GetEndTime() int64
- func (x *GetStateResp) GetGId() string
- func (x *GetStateResp) GetState() GlobalState
- func (*GetStateResp) ProtoMessage()
- func (x *GetStateResp) ProtoReflect() protoreflect.Message
- func (x *GetStateResp) Reset()
- func (x *GetStateResp) String() string
- func (m *GetStateResp) Validate() error
- func (m *GetStateResp) ValidateAll() error
- type GetStateRespBranch
- func (*GetStateRespBranch) Descriptor() ([]byte, []int)deprecated
- func (x *GetStateRespBranch) GetAction() Action
- func (x *GetStateRespBranch) GetBranchId() string
- func (x *GetStateRespBranch) GetLastErrMsg() string
- func (x *GetStateRespBranch) GetLevel() int64
- func (x *GetStateRespBranch) GetProtocol() string
- func (x *GetStateRespBranch) GetReqData() string
- func (x *GetStateRespBranch) GetReqHeader() string
- func (x *GetStateRespBranch) GetState() BranchState
- func (x *GetStateRespBranch) GetTranType() TranType
- func (x *GetStateRespBranch) GetUri() string
- func (*GetStateRespBranch) ProtoMessage()
- func (x *GetStateRespBranch) ProtoReflect() protoreflect.Message
- func (x *GetStateRespBranch) Reset()
- func (x *GetStateRespBranch) String() string
- func (m *GetStateRespBranch) Validate() error
- func (m *GetStateRespBranch) ValidateAll() error
- type GetStateRespBranchMultiError
- type GetStateRespBranchValidationError
- func (e GetStateRespBranchValidationError) Cause() error
- func (e GetStateRespBranchValidationError) Error() string
- func (e GetStateRespBranchValidationError) ErrorName() string
- func (e GetStateRespBranchValidationError) Field() string
- func (e GetStateRespBranchValidationError) Key() bool
- func (e GetStateRespBranchValidationError) Reason() string
- type GetStateRespMultiError
- type GetStateRespValidationError
- func (e GetStateRespValidationError) Cause() error
- func (e GetStateRespValidationError) Error() string
- func (e GetStateRespValidationError) ErrorName() string
- func (e GetStateRespValidationError) Field() string
- func (e GetStateRespValidationError) Key() bool
- func (e GetStateRespValidationError) Reason() string
- type GlobalState
- func (GlobalState) Descriptor() protoreflect.EnumDescriptor
- func (x GlobalState) Enum() *GlobalState
- func (GlobalState) EnumDescriptor() ([]byte, []int)deprecated
- func (x GlobalState) Number() protoreflect.EnumNumber
- func (x GlobalState) String() string
- func (GlobalState) Type() protoreflect.EnumType
- type RegisterReq
- func (*RegisterReq) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterReq) GetBranches() []*RegisterReq_Branch
- func (x *RegisterReq) GetGId() string
- func (*RegisterReq) ProtoMessage()
- func (x *RegisterReq) ProtoReflect() protoreflect.Message
- func (x *RegisterReq) Reset()
- func (x *RegisterReq) String() string
- func (m *RegisterReq) Validate() error
- func (m *RegisterReq) ValidateAll() error
- type RegisterReqMultiError
- type RegisterReqValidationError
- func (e RegisterReqValidationError) Cause() error
- func (e RegisterReqValidationError) Error() string
- func (e RegisterReqValidationError) ErrorName() string
- func (e RegisterReqValidationError) Field() string
- func (e RegisterReqValidationError) Key() bool
- func (e RegisterReqValidationError) Reason() string
- type RegisterReq_Branch
- func (*RegisterReq_Branch) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterReq_Branch) GetAction() Action
- func (x *RegisterReq_Branch) GetLevel() int32
- func (x *RegisterReq_Branch) GetProtocol() string
- func (x *RegisterReq_Branch) GetReqData() string
- func (x *RegisterReq_Branch) GetReqHeader() string
- func (x *RegisterReq_Branch) GetTimeout() int32
- func (x *RegisterReq_Branch) GetTranType() TranType
- func (x *RegisterReq_Branch) GetUri() string
- func (*RegisterReq_Branch) ProtoMessage()
- func (x *RegisterReq_Branch) ProtoReflect() protoreflect.Message
- func (x *RegisterReq_Branch) Reset()
- func (x *RegisterReq_Branch) String() string
- func (m *RegisterReq_Branch) Validate() error
- func (m *RegisterReq_Branch) ValidateAll() error
- type RegisterReq_BranchMultiError
- type RegisterReq_BranchValidationError
- func (e RegisterReq_BranchValidationError) Cause() error
- func (e RegisterReq_BranchValidationError) Error() string
- func (e RegisterReq_BranchValidationError) ErrorName() string
- func (e RegisterReq_BranchValidationError) Field() string
- func (e RegisterReq_BranchValidationError) Key() bool
- func (e RegisterReq_BranchValidationError) Reason() string
- type RegisterResp
- func (*RegisterResp) Descriptor() ([]byte, []int)deprecated
- func (*RegisterResp) ProtoMessage()
- func (x *RegisterResp) ProtoReflect() protoreflect.Message
- func (x *RegisterResp) Reset()
- func (x *RegisterResp) String() string
- func (m *RegisterResp) Validate() error
- func (m *RegisterResp) ValidateAll() error
- type RegisterRespMultiError
- type RegisterRespValidationError
- func (e RegisterRespValidationError) Cause() error
- func (e RegisterRespValidationError) Error() string
- func (e RegisterRespValidationError) ErrorName() string
- func (e RegisterRespValidationError) Field() string
- func (e RegisterRespValidationError) Key() bool
- func (e RegisterRespValidationError) Reason() string
- type RollBckReq
- func (*RollBckReq) Descriptor() ([]byte, []int)deprecated
- func (x *RollBckReq) GetGId() string
- func (*RollBckReq) ProtoMessage()
- func (x *RollBckReq) ProtoReflect() protoreflect.Message
- func (x *RollBckReq) Reset()
- func (x *RollBckReq) String() string
- func (m *RollBckReq) Validate() error
- func (m *RollBckReq) ValidateAll() error
- type RollBckReqMultiError
- type RollBckReqValidationError
- type StartReq
- func (*StartReq) Descriptor() ([]byte, []int)deprecated
- func (x *StartReq) GetGId() string
- func (*StartReq) ProtoMessage()
- func (x *StartReq) ProtoReflect() protoreflect.Message
- func (x *StartReq) Reset()
- func (x *StartReq) String() string
- func (m *StartReq) Validate() error
- func (m *StartReq) ValidateAll() error
- type StartReqMultiError
- type StartReqValidationError
- type TranType
- type UnimplementedEasyCarServer
- func (UnimplementedEasyCarServer) Begin(context.Context, *emptypb.Empty) (*BeginResp, error)
- func (UnimplementedEasyCarServer) Commit(context.Context, *CommitReq) (*emptypb.Empty, error)
- func (UnimplementedEasyCarServer) GetState(context.Context, *GetStateReq) (*GetStateResp, error)
- func (UnimplementedEasyCarServer) Register(context.Context, *RegisterReq) (*emptypb.Empty, error)
- func (UnimplementedEasyCarServer) Rollback(context.Context, *RollBckReq) (*emptypb.Empty, error)
- func (UnimplementedEasyCarServer) Start(context.Context, *StartReq) (*emptypb.Empty, error)
- type UnsafeEasyCarServer
Constants ¶
This section is empty.
Variables ¶
var ( TranType_name = map[int32]string{ 0: "UN_KNOW", 1: "TCC", 2: "SAGE", } TranType_value = map[string]int32{ "UN_KNOW": 0, "TCC": 1, "SAGE": 2, } )
Enum value maps for TranType.
var ( Action_name = map[int32]string{ 0: "UN_KNOW_TRANSACTION_TYPE", 1: "TRY", 2: "CONFIRM", 3: "CANCEL", 4: "NORMAL", 5: "COMPENSATION", } Action_value = map[string]int32{ "UN_KNOW_TRANSACTION_TYPE": 0, "TRY": 1, "CONFIRM": 2, "CANCEL": 3, "NORMAL": 4, "COMPENSATION": 5, } )
Enum value maps for Action.
var ( BranchState_name = map[int32]string{ 0: "UN_KNOW_STATE", 1: "B_INIT", 2: "RETRYING", 3: "SUCCEED", 4: "FAILED", } BranchState_value = map[string]int32{ "UN_KNOW_STATE": 0, "B_INIT": 1, "RETRYING": 2, "SUCCEED": 3, "FAILED": 4, } )
Enum value maps for BranchState.
var ( GlobalState_name = map[int32]string{ 0: "GLOBAL_DEFAULT", 1: "INIT", 2: "PHASE1_PROCESSING", 3: "PHASE1_RETRYING", 4: "PHASE1_FAILED", 5: "PHASE1_SUCCESS", 6: "PHASE2_COMMITTING", 7: "PHASE2_ROLLBACKING", 8: "PHASE2_COMMIT_FAILED", 9: "PHASE2_ROLLBACK_FAILED", 10: "COMMITTED", 11: "ROLLBACKED", } GlobalState_value = map[string]int32{ "GLOBAL_DEFAULT": 0, "INIT": 1, "PHASE1_PROCESSING": 2, "PHASE1_RETRYING": 3, "PHASE1_FAILED": 4, "PHASE1_SUCCESS": 5, "PHASE2_COMMITTING": 6, "PHASE2_ROLLBACKING": 7, "PHASE2_COMMIT_FAILED": 8, "PHASE2_ROLLBACK_FAILED": 9, "COMMITTED": 10, "ROLLBACKED": 11, } )
Enum value maps for GlobalState.
var EasyCar_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.EasyCar", HandlerType: (*EasyCarServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Begin", Handler: _EasyCar_Begin_Handler, }, { MethodName: "Register", Handler: _EasyCar_Register_Handler, }, { MethodName: "Start", Handler: _EasyCar_Start_Handler, }, { MethodName: "Commit", Handler: _EasyCar_Commit_Handler, }, { MethodName: "Rollback", Handler: _EasyCar_Rollback_Handler, }, { MethodName: "GetState", Handler: _EasyCar_GetState_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/easycar.proto", }
EasyCar_ServiceDesc is the grpc.ServiceDesc for EasyCar service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_proto_easycar_proto protoreflect.FileDescriptor
Functions ¶
func RegisterEasyCarHandler ¶
func RegisterEasyCarHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterEasyCarHandler registers the http handlers for service EasyCar to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterEasyCarHandlerClient ¶
func RegisterEasyCarHandlerClient(ctx context.Context, mux *runtime.ServeMux, client EasyCarClient) error
RegisterEasyCarHandlerClient registers the http handlers for service EasyCar to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "EasyCarClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "EasyCarClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "EasyCarClient" to call the correct interceptors.
func RegisterEasyCarHandlerFromEndpoint ¶
func RegisterEasyCarHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterEasyCarHandlerFromEndpoint is same as RegisterEasyCarHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterEasyCarHandlerServer ¶
func RegisterEasyCarHandlerServer(ctx context.Context, mux *runtime.ServeMux, server EasyCarServer) error
RegisterEasyCarHandlerServer registers the http handlers for service EasyCar to "mux". UnaryRPC :call EasyCarServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterEasyCarHandlerFromEndpoint instead.
func RegisterEasyCarServer ¶
func RegisterEasyCarServer(s grpc.ServiceRegistrar, srv EasyCarServer)
Types ¶
type Action ¶
type Action int32
func (Action) Descriptor ¶
func (Action) Descriptor() protoreflect.EnumDescriptor
func (Action) EnumDescriptor
deprecated
func (Action) Number ¶
func (x Action) Number() protoreflect.EnumNumber
func (Action) Type ¶
func (Action) Type() protoreflect.EnumType
type BeginResp ¶
type BeginResp struct { GId string `protobuf:"bytes,1,opt,name=gId,proto3" json:"gId,omitempty"` // contains filtered or unexported fields }
func (*BeginResp) Descriptor
deprecated
func (*BeginResp) ProtoMessage ¶
func (*BeginResp) ProtoMessage()
func (*BeginResp) ProtoReflect ¶
func (x *BeginResp) ProtoReflect() protoreflect.Message
func (*BeginResp) Validate ¶
Validate checks the field values on BeginResp with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*BeginResp) ValidateAll ¶
ValidateAll checks the field values on BeginResp with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in BeginRespMultiError, or nil if none found.
type BeginRespMultiError ¶
type BeginRespMultiError []error
BeginRespMultiError is an error wrapping multiple validation errors returned by BeginResp.ValidateAll() if the designated constraints aren't met.
func (BeginRespMultiError) AllErrors ¶
func (m BeginRespMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (BeginRespMultiError) Error ¶
func (m BeginRespMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type BeginRespValidationError ¶
type BeginRespValidationError struct {
// contains filtered or unexported fields
}
BeginRespValidationError is the validation error returned by BeginResp.Validate if the designated constraints aren't met.
func (BeginRespValidationError) Cause ¶
func (e BeginRespValidationError) Cause() error
Cause function returns cause value.
func (BeginRespValidationError) Error ¶
func (e BeginRespValidationError) Error() string
Error satisfies the builtin error interface
func (BeginRespValidationError) ErrorName ¶
func (e BeginRespValidationError) ErrorName() string
ErrorName returns error name.
func (BeginRespValidationError) Field ¶
func (e BeginRespValidationError) Field() string
Field function returns field value.
func (BeginRespValidationError) Key ¶
func (e BeginRespValidationError) Key() bool
Key function returns key value.
func (BeginRespValidationError) Reason ¶
func (e BeginRespValidationError) Reason() string
Reason function returns reason value.
type BranchState ¶
type BranchState int32
const ( BranchState_UN_KNOW_STATE BranchState = 0 BranchState_B_INIT BranchState = 1 BranchState_RETRYING BranchState = 2 BranchState_SUCCEED BranchState = 3 BranchState_FAILED BranchState = 4 )
func (BranchState) Descriptor ¶
func (BranchState) Descriptor() protoreflect.EnumDescriptor
func (BranchState) Enum ¶
func (x BranchState) Enum() *BranchState
func (BranchState) EnumDescriptor
deprecated
func (BranchState) EnumDescriptor() ([]byte, []int)
Deprecated: Use BranchState.Descriptor instead.
func (BranchState) Number ¶
func (x BranchState) Number() protoreflect.EnumNumber
func (BranchState) String ¶
func (x BranchState) String() string
func (BranchState) Type ¶
func (BranchState) Type() protoreflect.EnumType
type CommitReq ¶
type CommitReq struct { GId string `protobuf:"bytes,1,opt,name=gId,proto3" json:"gId,omitempty"` // contains filtered or unexported fields }
func (*CommitReq) Descriptor
deprecated
func (*CommitReq) ProtoMessage ¶
func (*CommitReq) ProtoMessage()
func (*CommitReq) ProtoReflect ¶
func (x *CommitReq) ProtoReflect() protoreflect.Message
func (*CommitReq) Validate ¶
Validate checks the field values on CommitReq with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*CommitReq) ValidateAll ¶
ValidateAll checks the field values on CommitReq with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in CommitReqMultiError, or nil if none found.
type CommitReqMultiError ¶
type CommitReqMultiError []error
CommitReqMultiError is an error wrapping multiple validation errors returned by CommitReq.ValidateAll() if the designated constraints aren't met.
func (CommitReqMultiError) AllErrors ¶
func (m CommitReqMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (CommitReqMultiError) Error ¶
func (m CommitReqMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type CommitReqValidationError ¶
type CommitReqValidationError struct {
// contains filtered or unexported fields
}
CommitReqValidationError is the validation error returned by CommitReq.Validate if the designated constraints aren't met.
func (CommitReqValidationError) Cause ¶
func (e CommitReqValidationError) Cause() error
Cause function returns cause value.
func (CommitReqValidationError) Error ¶
func (e CommitReqValidationError) Error() string
Error satisfies the builtin error interface
func (CommitReqValidationError) ErrorName ¶
func (e CommitReqValidationError) ErrorName() string
ErrorName returns error name.
func (CommitReqValidationError) Field ¶
func (e CommitReqValidationError) Field() string
Field function returns field value.
func (CommitReqValidationError) Key ¶
func (e CommitReqValidationError) Key() bool
Key function returns key value.
func (CommitReqValidationError) Reason ¶
func (e CommitReqValidationError) Reason() string
Reason function returns reason value.
type EasyCarClient ¶
type EasyCarClient interface { Begin(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*BeginResp, error) Register(ctx context.Context, in *RegisterReq, opts ...grpc.CallOption) (*emptypb.Empty, error) // phase1 Start(ctx context.Context, in *StartReq, opts ...grpc.CallOption) (*emptypb.Empty, error) // phase2 for commit Commit(ctx context.Context, in *CommitReq, opts ...grpc.CallOption) (*emptypb.Empty, error) // phase2 for rollback Rollback(ctx context.Context, in *RollBckReq, opts ...grpc.CallOption) (*emptypb.Empty, error) GetState(ctx context.Context, in *GetStateReq, opts ...grpc.CallOption) (*GetStateResp, error) }
EasyCarClient is the client API for EasyCar service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewEasyCarClient ¶
func NewEasyCarClient(cc grpc.ClientConnInterface) EasyCarClient
type EasyCarServer ¶
type EasyCarServer interface { Begin(context.Context, *emptypb.Empty) (*BeginResp, error) Register(context.Context, *RegisterReq) (*emptypb.Empty, error) // phase1 Start(context.Context, *StartReq) (*emptypb.Empty, error) // phase2 for commit Commit(context.Context, *CommitReq) (*emptypb.Empty, error) // phase2 for rollback Rollback(context.Context, *RollBckReq) (*emptypb.Empty, error) GetState(context.Context, *GetStateReq) (*GetStateResp, error) // contains filtered or unexported methods }
EasyCarServer is the server API for EasyCar service. All implementations must embed UnimplementedEasyCarServer for forward compatibility
type GetStateReq ¶
type GetStateReq struct { GId string `protobuf:"bytes,1,opt,name=gId,proto3" json:"gId,omitempty"` // contains filtered or unexported fields }
func (*GetStateReq) Descriptor
deprecated
func (*GetStateReq) Descriptor() ([]byte, []int)
Deprecated: Use GetStateReq.ProtoReflect.Descriptor instead.
func (*GetStateReq) GetGId ¶
func (x *GetStateReq) GetGId() string
func (*GetStateReq) ProtoMessage ¶
func (*GetStateReq) ProtoMessage()
func (*GetStateReq) ProtoReflect ¶
func (x *GetStateReq) ProtoReflect() protoreflect.Message
func (*GetStateReq) Reset ¶
func (x *GetStateReq) Reset()
func (*GetStateReq) String ¶
func (x *GetStateReq) String() string
func (*GetStateReq) Validate ¶
func (m *GetStateReq) Validate() error
Validate checks the field values on GetStateReq with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*GetStateReq) ValidateAll ¶
func (m *GetStateReq) ValidateAll() error
ValidateAll checks the field values on GetStateReq with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetStateReqMultiError, or nil if none found.
type GetStateReqMultiError ¶
type GetStateReqMultiError []error
GetStateReqMultiError is an error wrapping multiple validation errors returned by GetStateReq.ValidateAll() if the designated constraints aren't met.
func (GetStateReqMultiError) AllErrors ¶
func (m GetStateReqMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetStateReqMultiError) Error ¶
func (m GetStateReqMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetStateReqValidationError ¶
type GetStateReqValidationError struct {
// contains filtered or unexported fields
}
GetStateReqValidationError is the validation error returned by GetStateReq.Validate if the designated constraints aren't met.
func (GetStateReqValidationError) Cause ¶
func (e GetStateReqValidationError) Cause() error
Cause function returns cause value.
func (GetStateReqValidationError) Error ¶
func (e GetStateReqValidationError) Error() string
Error satisfies the builtin error interface
func (GetStateReqValidationError) ErrorName ¶
func (e GetStateReqValidationError) ErrorName() string
ErrorName returns error name.
func (GetStateReqValidationError) Field ¶
func (e GetStateReqValidationError) Field() string
Field function returns field value.
func (GetStateReqValidationError) Key ¶
func (e GetStateReqValidationError) Key() bool
Key function returns key value.
func (GetStateReqValidationError) Reason ¶
func (e GetStateReqValidationError) Reason() string
Reason function returns reason value.
type GetStateResp ¶
type GetStateResp struct { GId string `protobuf:"bytes,1,opt,name=gId,proto3" json:"gId,omitempty"` State GlobalState `protobuf:"varint,2,opt,name=state,proto3,enum=proto.GlobalState" json:"state,omitempty"` EndTime int64 `protobuf:"varint,3,opt,name=endTime,proto3" json:"endTime,omitempty"` Branches []*GetStateRespBranch `protobuf:"bytes,4,rep,name=branches,proto3" json:"branches,omitempty"` // contains filtered or unexported fields }
func (*GetStateResp) Descriptor
deprecated
func (*GetStateResp) Descriptor() ([]byte, []int)
Deprecated: Use GetStateResp.ProtoReflect.Descriptor instead.
func (*GetStateResp) GetBranches ¶
func (x *GetStateResp) GetBranches() []*GetStateRespBranch
func (*GetStateResp) GetEndTime ¶
func (x *GetStateResp) GetEndTime() int64
func (*GetStateResp) GetGId ¶
func (x *GetStateResp) GetGId() string
func (*GetStateResp) GetState ¶
func (x *GetStateResp) GetState() GlobalState
func (*GetStateResp) ProtoMessage ¶
func (*GetStateResp) ProtoMessage()
func (*GetStateResp) ProtoReflect ¶
func (x *GetStateResp) ProtoReflect() protoreflect.Message
func (*GetStateResp) Reset ¶
func (x *GetStateResp) Reset()
func (*GetStateResp) String ¶
func (x *GetStateResp) String() string
func (*GetStateResp) Validate ¶
func (m *GetStateResp) Validate() error
Validate checks the field values on GetStateResp with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*GetStateResp) ValidateAll ¶
func (m *GetStateResp) ValidateAll() error
ValidateAll checks the field values on GetStateResp with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetStateRespMultiError, or nil if none found.
type GetStateRespBranch ¶
type GetStateRespBranch struct { BranchId string `protobuf:"bytes,1,opt,name=branchId,proto3" json:"branchId,omitempty"` ReqData string `protobuf:"bytes,2,opt,name=reqData,proto3" json:"reqData,omitempty"` ReqHeader string `protobuf:"bytes,3,opt,name=reqHeader,proto3" json:"reqHeader,omitempty"` Uri string `protobuf:"bytes,4,opt,name=uri,proto3" json:"uri,omitempty"` TranType TranType `protobuf:"varint,5,opt,name=tranType,proto3,enum=proto.TranType" json:"tranType,omitempty"` Protocol string `protobuf:"bytes,6,opt,name=protocol,proto3" json:"protocol,omitempty"` Action Action `protobuf:"varint,7,opt,name=action,proto3,enum=proto.Action" json:"action,omitempty"` State BranchState `protobuf:"varint,8,opt,name=state,proto3,enum=proto.BranchState" json:"state,omitempty"` Level int64 `protobuf:"varint,9,opt,name=level,proto3" json:"level,omitempty"` LastErrMsg string `protobuf:"bytes,10,opt,name=lastErrMsg,proto3" json:"lastErrMsg,omitempty"` // contains filtered or unexported fields }
func (*GetStateRespBranch) Descriptor
deprecated
func (*GetStateRespBranch) Descriptor() ([]byte, []int)
Deprecated: Use GetStateRespBranch.ProtoReflect.Descriptor instead.
func (*GetStateRespBranch) GetAction ¶
func (x *GetStateRespBranch) GetAction() Action
func (*GetStateRespBranch) GetBranchId ¶
func (x *GetStateRespBranch) GetBranchId() string
func (*GetStateRespBranch) GetLastErrMsg ¶
func (x *GetStateRespBranch) GetLastErrMsg() string
func (*GetStateRespBranch) GetLevel ¶
func (x *GetStateRespBranch) GetLevel() int64
func (*GetStateRespBranch) GetProtocol ¶
func (x *GetStateRespBranch) GetProtocol() string
func (*GetStateRespBranch) GetReqData ¶
func (x *GetStateRespBranch) GetReqData() string
func (*GetStateRespBranch) GetReqHeader ¶
func (x *GetStateRespBranch) GetReqHeader() string
func (*GetStateRespBranch) GetState ¶
func (x *GetStateRespBranch) GetState() BranchState
func (*GetStateRespBranch) GetTranType ¶
func (x *GetStateRespBranch) GetTranType() TranType
func (*GetStateRespBranch) GetUri ¶
func (x *GetStateRespBranch) GetUri() string
func (*GetStateRespBranch) ProtoMessage ¶
func (*GetStateRespBranch) ProtoMessage()
func (*GetStateRespBranch) ProtoReflect ¶
func (x *GetStateRespBranch) ProtoReflect() protoreflect.Message
func (*GetStateRespBranch) Reset ¶
func (x *GetStateRespBranch) Reset()
func (*GetStateRespBranch) String ¶
func (x *GetStateRespBranch) String() string
func (*GetStateRespBranch) Validate ¶
func (m *GetStateRespBranch) Validate() error
Validate checks the field values on GetStateRespBranch with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*GetStateRespBranch) ValidateAll ¶
func (m *GetStateRespBranch) ValidateAll() error
ValidateAll checks the field values on GetStateRespBranch with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetStateRespBranchMultiError, or nil if none found.
type GetStateRespBranchMultiError ¶
type GetStateRespBranchMultiError []error
GetStateRespBranchMultiError is an error wrapping multiple validation errors returned by GetStateRespBranch.ValidateAll() if the designated constraints aren't met.
func (GetStateRespBranchMultiError) AllErrors ¶
func (m GetStateRespBranchMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetStateRespBranchMultiError) Error ¶
func (m GetStateRespBranchMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetStateRespBranchValidationError ¶
type GetStateRespBranchValidationError struct {
// contains filtered or unexported fields
}
GetStateRespBranchValidationError is the validation error returned by GetStateRespBranch.Validate if the designated constraints aren't met.
func (GetStateRespBranchValidationError) Cause ¶
func (e GetStateRespBranchValidationError) Cause() error
Cause function returns cause value.
func (GetStateRespBranchValidationError) Error ¶
func (e GetStateRespBranchValidationError) Error() string
Error satisfies the builtin error interface
func (GetStateRespBranchValidationError) ErrorName ¶
func (e GetStateRespBranchValidationError) ErrorName() string
ErrorName returns error name.
func (GetStateRespBranchValidationError) Field ¶
func (e GetStateRespBranchValidationError) Field() string
Field function returns field value.
func (GetStateRespBranchValidationError) Key ¶
func (e GetStateRespBranchValidationError) Key() bool
Key function returns key value.
func (GetStateRespBranchValidationError) Reason ¶
func (e GetStateRespBranchValidationError) Reason() string
Reason function returns reason value.
type GetStateRespMultiError ¶
type GetStateRespMultiError []error
GetStateRespMultiError is an error wrapping multiple validation errors returned by GetStateResp.ValidateAll() if the designated constraints aren't met.
func (GetStateRespMultiError) AllErrors ¶
func (m GetStateRespMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetStateRespMultiError) Error ¶
func (m GetStateRespMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetStateRespValidationError ¶
type GetStateRespValidationError struct {
// contains filtered or unexported fields
}
GetStateRespValidationError is the validation error returned by GetStateResp.Validate if the designated constraints aren't met.
func (GetStateRespValidationError) Cause ¶
func (e GetStateRespValidationError) Cause() error
Cause function returns cause value.
func (GetStateRespValidationError) Error ¶
func (e GetStateRespValidationError) Error() string
Error satisfies the builtin error interface
func (GetStateRespValidationError) ErrorName ¶
func (e GetStateRespValidationError) ErrorName() string
ErrorName returns error name.
func (GetStateRespValidationError) Field ¶
func (e GetStateRespValidationError) Field() string
Field function returns field value.
func (GetStateRespValidationError) Key ¶
func (e GetStateRespValidationError) Key() bool
Key function returns key value.
func (GetStateRespValidationError) Reason ¶
func (e GetStateRespValidationError) Reason() string
Reason function returns reason value.
type GlobalState ¶
type GlobalState int32
const ( GlobalState_GLOBAL_DEFAULT GlobalState = 0 GlobalState_INIT GlobalState = 1 GlobalState_PHASE1_PROCESSING GlobalState = 2 GlobalState_PHASE1_RETRYING GlobalState = 3 GlobalState_PHASE1_FAILED GlobalState = 4 GlobalState_PHASE1_SUCCESS GlobalState = 5 GlobalState_PHASE2_COMMITTING GlobalState = 6 GlobalState_PHASE2_ROLLBACKING GlobalState = 7 GlobalState_PHASE2_COMMIT_FAILED GlobalState = 8 GlobalState_PHASE2_ROLLBACK_FAILED GlobalState = 9 GlobalState_COMMITTED GlobalState = 10 GlobalState_ROLLBACKED GlobalState = 11 )
func (GlobalState) Descriptor ¶
func (GlobalState) Descriptor() protoreflect.EnumDescriptor
func (GlobalState) Enum ¶
func (x GlobalState) Enum() *GlobalState
func (GlobalState) EnumDescriptor
deprecated
func (GlobalState) EnumDescriptor() ([]byte, []int)
Deprecated: Use GlobalState.Descriptor instead.
func (GlobalState) Number ¶
func (x GlobalState) Number() protoreflect.EnumNumber
func (GlobalState) String ¶
func (x GlobalState) String() string
func (GlobalState) Type ¶
func (GlobalState) Type() protoreflect.EnumType
type RegisterReq ¶
type RegisterReq struct { GId string `protobuf:"bytes,1,opt,name=gId,proto3" json:"gId,omitempty"` Branches []*RegisterReq_Branch `protobuf:"bytes,2,rep,name=branches,proto3" json:"branches,omitempty"` // contains filtered or unexported fields }
func (*RegisterReq) Descriptor
deprecated
func (*RegisterReq) Descriptor() ([]byte, []int)
Deprecated: Use RegisterReq.ProtoReflect.Descriptor instead.
func (*RegisterReq) GetBranches ¶
func (x *RegisterReq) GetBranches() []*RegisterReq_Branch
func (*RegisterReq) GetGId ¶
func (x *RegisterReq) GetGId() string
func (*RegisterReq) ProtoMessage ¶
func (*RegisterReq) ProtoMessage()
func (*RegisterReq) ProtoReflect ¶
func (x *RegisterReq) ProtoReflect() protoreflect.Message
func (*RegisterReq) Reset ¶
func (x *RegisterReq) Reset()
func (*RegisterReq) String ¶
func (x *RegisterReq) String() string
func (*RegisterReq) Validate ¶
func (m *RegisterReq) Validate() error
Validate checks the field values on RegisterReq with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*RegisterReq) ValidateAll ¶
func (m *RegisterReq) ValidateAll() error
ValidateAll checks the field values on RegisterReq with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in RegisterReqMultiError, or nil if none found.
type RegisterReqMultiError ¶
type RegisterReqMultiError []error
RegisterReqMultiError is an error wrapping multiple validation errors returned by RegisterReq.ValidateAll() if the designated constraints aren't met.
func (RegisterReqMultiError) AllErrors ¶
func (m RegisterReqMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (RegisterReqMultiError) Error ¶
func (m RegisterReqMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type RegisterReqValidationError ¶
type RegisterReqValidationError struct {
// contains filtered or unexported fields
}
RegisterReqValidationError is the validation error returned by RegisterReq.Validate if the designated constraints aren't met.
func (RegisterReqValidationError) Cause ¶
func (e RegisterReqValidationError) Cause() error
Cause function returns cause value.
func (RegisterReqValidationError) Error ¶
func (e RegisterReqValidationError) Error() string
Error satisfies the builtin error interface
func (RegisterReqValidationError) ErrorName ¶
func (e RegisterReqValidationError) ErrorName() string
ErrorName returns error name.
func (RegisterReqValidationError) Field ¶
func (e RegisterReqValidationError) Field() string
Field function returns field value.
func (RegisterReqValidationError) Key ¶
func (e RegisterReqValidationError) Key() bool
Key function returns key value.
func (RegisterReqValidationError) Reason ¶
func (e RegisterReqValidationError) Reason() string
Reason function returns reason value.
type RegisterReq_Branch ¶
type RegisterReq_Branch struct { Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"` ReqData string `protobuf:"bytes,2,opt,name=reqData,proto3" json:"reqData,omitempty"` ReqHeader string `protobuf:"bytes,3,opt,name=reqHeader,proto3" json:"reqHeader,omitempty"` TranType TranType `protobuf:"varint,4,opt,name=tranType,proto3,enum=proto.TranType" json:"tranType,omitempty"` Protocol string `protobuf:"bytes,5,opt,name=protocol,proto3" json:"protocol,omitempty"` Action Action `protobuf:"varint,6,opt,name=action,proto3,enum=proto.Action" json:"action,omitempty"` Level int32 `protobuf:"varint,7,opt,name=level,proto3" json:"level,omitempty"` Timeout int32 `protobuf:"varint,8,opt,name=timeout,proto3" json:"timeout,omitempty"` // contains filtered or unexported fields }
func (*RegisterReq_Branch) Descriptor
deprecated
func (*RegisterReq_Branch) Descriptor() ([]byte, []int)
Deprecated: Use RegisterReq_Branch.ProtoReflect.Descriptor instead.
func (*RegisterReq_Branch) GetAction ¶
func (x *RegisterReq_Branch) GetAction() Action
func (*RegisterReq_Branch) GetLevel ¶
func (x *RegisterReq_Branch) GetLevel() int32
func (*RegisterReq_Branch) GetProtocol ¶
func (x *RegisterReq_Branch) GetProtocol() string
func (*RegisterReq_Branch) GetReqData ¶
func (x *RegisterReq_Branch) GetReqData() string
func (*RegisterReq_Branch) GetReqHeader ¶
func (x *RegisterReq_Branch) GetReqHeader() string
func (*RegisterReq_Branch) GetTimeout ¶
func (x *RegisterReq_Branch) GetTimeout() int32
func (*RegisterReq_Branch) GetTranType ¶
func (x *RegisterReq_Branch) GetTranType() TranType
func (*RegisterReq_Branch) GetUri ¶
func (x *RegisterReq_Branch) GetUri() string
func (*RegisterReq_Branch) ProtoMessage ¶
func (*RegisterReq_Branch) ProtoMessage()
func (*RegisterReq_Branch) ProtoReflect ¶
func (x *RegisterReq_Branch) ProtoReflect() protoreflect.Message
func (*RegisterReq_Branch) Reset ¶
func (x *RegisterReq_Branch) Reset()
func (*RegisterReq_Branch) String ¶
func (x *RegisterReq_Branch) String() string
func (*RegisterReq_Branch) Validate ¶
func (m *RegisterReq_Branch) Validate() error
Validate checks the field values on RegisterReq_Branch with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*RegisterReq_Branch) ValidateAll ¶
func (m *RegisterReq_Branch) ValidateAll() error
ValidateAll checks the field values on RegisterReq_Branch with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in RegisterReq_BranchMultiError, or nil if none found.
type RegisterReq_BranchMultiError ¶
type RegisterReq_BranchMultiError []error
RegisterReq_BranchMultiError is an error wrapping multiple validation errors returned by RegisterReq_Branch.ValidateAll() if the designated constraints aren't met.
func (RegisterReq_BranchMultiError) AllErrors ¶
func (m RegisterReq_BranchMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (RegisterReq_BranchMultiError) Error ¶
func (m RegisterReq_BranchMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type RegisterReq_BranchValidationError ¶
type RegisterReq_BranchValidationError struct {
// contains filtered or unexported fields
}
RegisterReq_BranchValidationError is the validation error returned by RegisterReq_Branch.Validate if the designated constraints aren't met.
func (RegisterReq_BranchValidationError) Cause ¶
func (e RegisterReq_BranchValidationError) Cause() error
Cause function returns cause value.
func (RegisterReq_BranchValidationError) Error ¶
func (e RegisterReq_BranchValidationError) Error() string
Error satisfies the builtin error interface
func (RegisterReq_BranchValidationError) ErrorName ¶
func (e RegisterReq_BranchValidationError) ErrorName() string
ErrorName returns error name.
func (RegisterReq_BranchValidationError) Field ¶
func (e RegisterReq_BranchValidationError) Field() string
Field function returns field value.
func (RegisterReq_BranchValidationError) Key ¶
func (e RegisterReq_BranchValidationError) Key() bool
Key function returns key value.
func (RegisterReq_BranchValidationError) Reason ¶
func (e RegisterReq_BranchValidationError) Reason() string
Reason function returns reason value.
type RegisterResp ¶
type RegisterResp struct {
// contains filtered or unexported fields
}
func (*RegisterResp) Descriptor
deprecated
func (*RegisterResp) Descriptor() ([]byte, []int)
Deprecated: Use RegisterResp.ProtoReflect.Descriptor instead.
func (*RegisterResp) ProtoMessage ¶
func (*RegisterResp) ProtoMessage()
func (*RegisterResp) ProtoReflect ¶
func (x *RegisterResp) ProtoReflect() protoreflect.Message
func (*RegisterResp) Reset ¶
func (x *RegisterResp) Reset()
func (*RegisterResp) String ¶
func (x *RegisterResp) String() string
func (*RegisterResp) Validate ¶
func (m *RegisterResp) Validate() error
Validate checks the field values on RegisterResp with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*RegisterResp) ValidateAll ¶
func (m *RegisterResp) ValidateAll() error
ValidateAll checks the field values on RegisterResp with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in RegisterRespMultiError, or nil if none found.
type RegisterRespMultiError ¶
type RegisterRespMultiError []error
RegisterRespMultiError is an error wrapping multiple validation errors returned by RegisterResp.ValidateAll() if the designated constraints aren't met.
func (RegisterRespMultiError) AllErrors ¶
func (m RegisterRespMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (RegisterRespMultiError) Error ¶
func (m RegisterRespMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type RegisterRespValidationError ¶
type RegisterRespValidationError struct {
// contains filtered or unexported fields
}
RegisterRespValidationError is the validation error returned by RegisterResp.Validate if the designated constraints aren't met.
func (RegisterRespValidationError) Cause ¶
func (e RegisterRespValidationError) Cause() error
Cause function returns cause value.
func (RegisterRespValidationError) Error ¶
func (e RegisterRespValidationError) Error() string
Error satisfies the builtin error interface
func (RegisterRespValidationError) ErrorName ¶
func (e RegisterRespValidationError) ErrorName() string
ErrorName returns error name.
func (RegisterRespValidationError) Field ¶
func (e RegisterRespValidationError) Field() string
Field function returns field value.
func (RegisterRespValidationError) Key ¶
func (e RegisterRespValidationError) Key() bool
Key function returns key value.
func (RegisterRespValidationError) Reason ¶
func (e RegisterRespValidationError) Reason() string
Reason function returns reason value.
type RollBckReq ¶
type RollBckReq struct { GId string `protobuf:"bytes,1,opt,name=gId,proto3" json:"gId,omitempty"` // contains filtered or unexported fields }
func (*RollBckReq) Descriptor
deprecated
func (*RollBckReq) Descriptor() ([]byte, []int)
Deprecated: Use RollBckReq.ProtoReflect.Descriptor instead.
func (*RollBckReq) GetGId ¶
func (x *RollBckReq) GetGId() string
func (*RollBckReq) ProtoMessage ¶
func (*RollBckReq) ProtoMessage()
func (*RollBckReq) ProtoReflect ¶
func (x *RollBckReq) ProtoReflect() protoreflect.Message
func (*RollBckReq) Reset ¶
func (x *RollBckReq) Reset()
func (*RollBckReq) String ¶
func (x *RollBckReq) String() string
func (*RollBckReq) Validate ¶
func (m *RollBckReq) Validate() error
Validate checks the field values on RollBckReq with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*RollBckReq) ValidateAll ¶
func (m *RollBckReq) ValidateAll() error
ValidateAll checks the field values on RollBckReq with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in RollBckReqMultiError, or nil if none found.
type RollBckReqMultiError ¶
type RollBckReqMultiError []error
RollBckReqMultiError is an error wrapping multiple validation errors returned by RollBckReq.ValidateAll() if the designated constraints aren't met.
func (RollBckReqMultiError) AllErrors ¶
func (m RollBckReqMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (RollBckReqMultiError) Error ¶
func (m RollBckReqMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type RollBckReqValidationError ¶
type RollBckReqValidationError struct {
// contains filtered or unexported fields
}
RollBckReqValidationError is the validation error returned by RollBckReq.Validate if the designated constraints aren't met.
func (RollBckReqValidationError) Cause ¶
func (e RollBckReqValidationError) Cause() error
Cause function returns cause value.
func (RollBckReqValidationError) Error ¶
func (e RollBckReqValidationError) Error() string
Error satisfies the builtin error interface
func (RollBckReqValidationError) ErrorName ¶
func (e RollBckReqValidationError) ErrorName() string
ErrorName returns error name.
func (RollBckReqValidationError) Field ¶
func (e RollBckReqValidationError) Field() string
Field function returns field value.
func (RollBckReqValidationError) Key ¶
func (e RollBckReqValidationError) Key() bool
Key function returns key value.
func (RollBckReqValidationError) Reason ¶
func (e RollBckReqValidationError) Reason() string
Reason function returns reason value.
type StartReq ¶
type StartReq struct { GId string `protobuf:"bytes,1,opt,name=gId,proto3" json:"gId,omitempty"` // contains filtered or unexported fields }
func (*StartReq) Descriptor
deprecated
func (*StartReq) ProtoMessage ¶
func (*StartReq) ProtoMessage()
func (*StartReq) ProtoReflect ¶
func (x *StartReq) ProtoReflect() protoreflect.Message
func (*StartReq) Validate ¶
Validate checks the field values on StartReq with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*StartReq) ValidateAll ¶
ValidateAll checks the field values on StartReq with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in StartReqMultiError, or nil if none found.
type StartReqMultiError ¶
type StartReqMultiError []error
StartReqMultiError is an error wrapping multiple validation errors returned by StartReq.ValidateAll() if the designated constraints aren't met.
func (StartReqMultiError) AllErrors ¶
func (m StartReqMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (StartReqMultiError) Error ¶
func (m StartReqMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type StartReqValidationError ¶
type StartReqValidationError struct {
// contains filtered or unexported fields
}
StartReqValidationError is the validation error returned by StartReq.Validate if the designated constraints aren't met.
func (StartReqValidationError) Cause ¶
func (e StartReqValidationError) Cause() error
Cause function returns cause value.
func (StartReqValidationError) Error ¶
func (e StartReqValidationError) Error() string
Error satisfies the builtin error interface
func (StartReqValidationError) ErrorName ¶
func (e StartReqValidationError) ErrorName() string
ErrorName returns error name.
func (StartReqValidationError) Field ¶
func (e StartReqValidationError) Field() string
Field function returns field value.
func (StartReqValidationError) Key ¶
func (e StartReqValidationError) Key() bool
Key function returns key value.
func (StartReqValidationError) Reason ¶
func (e StartReqValidationError) Reason() string
Reason function returns reason value.
type TranType ¶
type TranType int32
func (TranType) Descriptor ¶
func (TranType) Descriptor() protoreflect.EnumDescriptor
func (TranType) EnumDescriptor
deprecated
func (TranType) Number ¶
func (x TranType) Number() protoreflect.EnumNumber
func (TranType) Type ¶
func (TranType) Type() protoreflect.EnumType
type UnimplementedEasyCarServer ¶
type UnimplementedEasyCarServer struct { }
UnimplementedEasyCarServer must be embedded to have forward compatible implementations.
func (UnimplementedEasyCarServer) GetState ¶
func (UnimplementedEasyCarServer) GetState(context.Context, *GetStateReq) (*GetStateResp, error)
func (UnimplementedEasyCarServer) Register ¶
func (UnimplementedEasyCarServer) Register(context.Context, *RegisterReq) (*emptypb.Empty, error)
func (UnimplementedEasyCarServer) Rollback ¶
func (UnimplementedEasyCarServer) Rollback(context.Context, *RollBckReq) (*emptypb.Empty, error)
type UnsafeEasyCarServer ¶
type UnsafeEasyCarServer interface {
// contains filtered or unexported methods
}
UnsafeEasyCarServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EasyCarServer will result in compilation errors.