Documentation ¶
Overview ¶
Package leaf_go is a generated ecode package. This code was generated with kratos/tool/protobuf/protoc-gen-ecode v0.1.
package 命名使用 {appid}.{version} 的方式, version 形如 v1, v2 ..
It is generated from these files:
leafgo_error.proto
Index ¶
- Variables
- func RegisterLeafGoServiceServer(s *grpc.Server, srv LeafGoServiceServer)
- type GetSegmentReq
- func (*GetSegmentReq) Descriptor() ([]byte, []int)
- func (m *GetSegmentReq) Marshal() (dAtA []byte, err error)
- func (m *GetSegmentReq) MarshalTo(dAtA []byte) (int, error)
- func (m *GetSegmentReq) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GetSegmentReq) ProtoMessage()
- func (m *GetSegmentReq) Reset()
- func (m *GetSegmentReq) Size() (n int)
- func (m *GetSegmentReq) String() string
- func (m *GetSegmentReq) Unmarshal(dAtA []byte) error
- func (m *GetSegmentReq) XXX_DiscardUnknown()
- func (m *GetSegmentReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetSegmentReq) XXX_Merge(src proto.Message)
- func (m *GetSegmentReq) XXX_Size() int
- func (m *GetSegmentReq) XXX_Unmarshal(b []byte) error
- type GetSegmentRsp
- func (*GetSegmentRsp) Descriptor() ([]byte, []int)
- func (m *GetSegmentRsp) Marshal() (dAtA []byte, err error)
- func (m *GetSegmentRsp) MarshalTo(dAtA []byte) (int, error)
- func (m *GetSegmentRsp) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GetSegmentRsp) ProtoMessage()
- func (m *GetSegmentRsp) Reset()
- func (m *GetSegmentRsp) Size() (n int)
- func (m *GetSegmentRsp) String() string
- func (m *GetSegmentRsp) Unmarshal(dAtA []byte) error
- func (m *GetSegmentRsp) XXX_DiscardUnknown()
- func (m *GetSegmentRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetSegmentRsp) XXX_Merge(src proto.Message)
- func (m *GetSegmentRsp) XXX_Size() int
- func (m *GetSegmentRsp) XXX_Unmarshal(b []byte) error
- type GetSnowflakeReq
- func (*GetSnowflakeReq) Descriptor() ([]byte, []int)
- func (m *GetSnowflakeReq) Marshal() (dAtA []byte, err error)
- func (m *GetSnowflakeReq) MarshalTo(dAtA []byte) (int, error)
- func (m *GetSnowflakeReq) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GetSnowflakeReq) ProtoMessage()
- func (m *GetSnowflakeReq) Reset()
- func (m *GetSnowflakeReq) Size() (n int)
- func (m *GetSnowflakeReq) String() string
- func (m *GetSnowflakeReq) Unmarshal(dAtA []byte) error
- func (m *GetSnowflakeReq) XXX_DiscardUnknown()
- func (m *GetSnowflakeReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetSnowflakeReq) XXX_Merge(src proto.Message)
- func (m *GetSnowflakeReq) XXX_Size() int
- func (m *GetSnowflakeReq) XXX_Unmarshal(b []byte) error
- type GetSnowflakeRsp
- func (*GetSnowflakeRsp) Descriptor() ([]byte, []int)
- func (m *GetSnowflakeRsp) Marshal() (dAtA []byte, err error)
- func (m *GetSnowflakeRsp) MarshalTo(dAtA []byte) (int, error)
- func (m *GetSnowflakeRsp) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GetSnowflakeRsp) ProtoMessage()
- func (m *GetSnowflakeRsp) Reset()
- func (m *GetSnowflakeRsp) Size() (n int)
- func (m *GetSnowflakeRsp) String() string
- func (m *GetSnowflakeRsp) Unmarshal(dAtA []byte) error
- func (m *GetSnowflakeRsp) XXX_DiscardUnknown()
- func (m *GetSnowflakeRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetSnowflakeRsp) XXX_Merge(src proto.Message)
- func (m *GetSnowflakeRsp) XXX_Size() int
- func (m *GetSnowflakeRsp) XXX_Unmarshal(b []byte) error
- type LeafGoErrCode
- type LeafGoServiceClient
- type LeafGoServiceServer
- type UnimplementedLeafGoServiceServer
- func (*UnimplementedLeafGoServiceServer) GetSegment(ctx context.Context, req *GetSegmentReq) (*GetSegmentRsp, error)
- func (*UnimplementedLeafGoServiceServer) GetSnowflake(ctx context.Context, req *GetSnowflakeReq) (*GetSnowflakeRsp, error)
- func (*UnimplementedLeafGoServiceServer) Ping(ctx context.Context, req *empty.Empty) (*empty.Empty, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthLeafgoApi = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowLeafgoApi = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupLeafgoApi = fmt.Errorf("proto: unexpected end of group") )
View Source
var ( LAST_TIME_GT_CURRENT_TIME = ecode.New(256) ID_KEY_NOT_EXISTS = ecode.New(257) ID_ID_CACHE_INIT_FALSE = ecode.New(258) ID_TWO_SEGMENTS_ARE_NULL = ecode.New(259) )
LeafGoErrCode ecode
View Source
var LeafGoErrCode_name = map[int32]string{
0: "OK",
256: "LAST_TIME_GT_CURRENT_TIME",
257: "ID_KEY_NOT_EXISTS",
258: "ID_ID_CACHE_INIT_FALSE",
259: "ID_TWO_SEGMENTS_ARE_NULL",
}
View Source
var LeafGoErrCode_value = map[string]int32{
"OK": 0,
"LAST_TIME_GT_CURRENT_TIME": 256,
"ID_KEY_NOT_EXISTS": 257,
"ID_ID_CACHE_INIT_FALSE": 258,
"ID_TWO_SEGMENTS_ARE_NULL": 259,
}
Functions ¶
func RegisterLeafGoServiceServer ¶
func RegisterLeafGoServiceServer(s *grpc.Server, srv LeafGoServiceServer)
Types ¶
type GetSegmentReq ¶
type GetSegmentReq struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetSegmentReq) Descriptor ¶
func (*GetSegmentReq) Descriptor() ([]byte, []int)
func (*GetSegmentReq) Marshal ¶
func (m *GetSegmentReq) Marshal() (dAtA []byte, err error)
func (*GetSegmentReq) MarshalToSizedBuffer ¶
func (m *GetSegmentReq) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GetSegmentReq) ProtoMessage ¶
func (*GetSegmentReq) ProtoMessage()
func (*GetSegmentReq) Reset ¶
func (m *GetSegmentReq) Reset()
func (*GetSegmentReq) Size ¶
func (m *GetSegmentReq) Size() (n int)
func (*GetSegmentReq) String ¶
func (m *GetSegmentReq) String() string
func (*GetSegmentReq) Unmarshal ¶
func (m *GetSegmentReq) Unmarshal(dAtA []byte) error
func (*GetSegmentReq) XXX_DiscardUnknown ¶
func (m *GetSegmentReq) XXX_DiscardUnknown()
func (*GetSegmentReq) XXX_Marshal ¶
func (m *GetSegmentReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetSegmentReq) XXX_Merge ¶
func (m *GetSegmentReq) XXX_Merge(src proto.Message)
func (*GetSegmentReq) XXX_Size ¶
func (m *GetSegmentReq) XXX_Size() int
func (*GetSegmentReq) XXX_Unmarshal ¶
func (m *GetSegmentReq) XXX_Unmarshal(b []byte) error
type GetSegmentRsp ¶
type GetSegmentRsp struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetSegmentRsp) Descriptor ¶
func (*GetSegmentRsp) Descriptor() ([]byte, []int)
func (*GetSegmentRsp) Marshal ¶
func (m *GetSegmentRsp) Marshal() (dAtA []byte, err error)
func (*GetSegmentRsp) MarshalToSizedBuffer ¶
func (m *GetSegmentRsp) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GetSegmentRsp) ProtoMessage ¶
func (*GetSegmentRsp) ProtoMessage()
func (*GetSegmentRsp) Reset ¶
func (m *GetSegmentRsp) Reset()
func (*GetSegmentRsp) Size ¶
func (m *GetSegmentRsp) Size() (n int)
func (*GetSegmentRsp) String ¶
func (m *GetSegmentRsp) String() string
func (*GetSegmentRsp) Unmarshal ¶
func (m *GetSegmentRsp) Unmarshal(dAtA []byte) error
func (*GetSegmentRsp) XXX_DiscardUnknown ¶
func (m *GetSegmentRsp) XXX_DiscardUnknown()
func (*GetSegmentRsp) XXX_Marshal ¶
func (m *GetSegmentRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetSegmentRsp) XXX_Merge ¶
func (m *GetSegmentRsp) XXX_Merge(src proto.Message)
func (*GetSegmentRsp) XXX_Size ¶
func (m *GetSegmentRsp) XXX_Size() int
func (*GetSegmentRsp) XXX_Unmarshal ¶
func (m *GetSegmentRsp) XXX_Unmarshal(b []byte) error
type GetSnowflakeReq ¶
type GetSnowflakeReq struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetSnowflakeReq) Descriptor ¶
func (*GetSnowflakeReq) Descriptor() ([]byte, []int)
func (*GetSnowflakeReq) Marshal ¶
func (m *GetSnowflakeReq) Marshal() (dAtA []byte, err error)
func (*GetSnowflakeReq) MarshalToSizedBuffer ¶
func (m *GetSnowflakeReq) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GetSnowflakeReq) ProtoMessage ¶
func (*GetSnowflakeReq) ProtoMessage()
func (*GetSnowflakeReq) Reset ¶
func (m *GetSnowflakeReq) Reset()
func (*GetSnowflakeReq) Size ¶
func (m *GetSnowflakeReq) Size() (n int)
func (*GetSnowflakeReq) String ¶
func (m *GetSnowflakeReq) String() string
func (*GetSnowflakeReq) Unmarshal ¶
func (m *GetSnowflakeReq) Unmarshal(dAtA []byte) error
func (*GetSnowflakeReq) XXX_DiscardUnknown ¶
func (m *GetSnowflakeReq) XXX_DiscardUnknown()
func (*GetSnowflakeReq) XXX_Marshal ¶
func (m *GetSnowflakeReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetSnowflakeReq) XXX_Merge ¶
func (m *GetSnowflakeReq) XXX_Merge(src proto.Message)
func (*GetSnowflakeReq) XXX_Size ¶
func (m *GetSnowflakeReq) XXX_Size() int
func (*GetSnowflakeReq) XXX_Unmarshal ¶
func (m *GetSnowflakeReq) XXX_Unmarshal(b []byte) error
type GetSnowflakeRsp ¶
type GetSnowflakeRsp struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetSnowflakeRsp) Descriptor ¶
func (*GetSnowflakeRsp) Descriptor() ([]byte, []int)
func (*GetSnowflakeRsp) Marshal ¶
func (m *GetSnowflakeRsp) Marshal() (dAtA []byte, err error)
func (*GetSnowflakeRsp) MarshalToSizedBuffer ¶
func (m *GetSnowflakeRsp) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GetSnowflakeRsp) ProtoMessage ¶
func (*GetSnowflakeRsp) ProtoMessage()
func (*GetSnowflakeRsp) Reset ¶
func (m *GetSnowflakeRsp) Reset()
func (*GetSnowflakeRsp) Size ¶
func (m *GetSnowflakeRsp) Size() (n int)
func (*GetSnowflakeRsp) String ¶
func (m *GetSnowflakeRsp) String() string
func (*GetSnowflakeRsp) Unmarshal ¶
func (m *GetSnowflakeRsp) Unmarshal(dAtA []byte) error
func (*GetSnowflakeRsp) XXX_DiscardUnknown ¶
func (m *GetSnowflakeRsp) XXX_DiscardUnknown()
func (*GetSnowflakeRsp) XXX_Marshal ¶
func (m *GetSnowflakeRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetSnowflakeRsp) XXX_Merge ¶
func (m *GetSnowflakeRsp) XXX_Merge(src proto.Message)
func (*GetSnowflakeRsp) XXX_Size ¶
func (m *GetSnowflakeRsp) XXX_Size() int
func (*GetSnowflakeRsp) XXX_Unmarshal ¶
func (m *GetSnowflakeRsp) XXX_Unmarshal(b []byte) error
type LeafGoErrCode ¶
type LeafGoErrCode int32
const ( LeafGoErrCode_OK LeafGoErrCode = 0 LeafGoErrCode_LAST_TIME_GT_CURRENT_TIME LeafGoErrCode = 256 LeafGoErrCode_ID_KEY_NOT_EXISTS LeafGoErrCode = 257 LeafGoErrCode_ID_ID_CACHE_INIT_FALSE LeafGoErrCode = 258 LeafGoErrCode_ID_TWO_SEGMENTS_ARE_NULL LeafGoErrCode = 259 )
func (LeafGoErrCode) EnumDescriptor ¶
func (LeafGoErrCode) EnumDescriptor() ([]byte, []int)
func (LeafGoErrCode) String ¶
func (x LeafGoErrCode) String() string
type LeafGoServiceClient ¶
type LeafGoServiceClient interface { Ping(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) GetSegment(ctx context.Context, in *GetSegmentReq, opts ...grpc.CallOption) (*GetSegmentRsp, error) GetSnowflake(ctx context.Context, in *GetSnowflakeReq, opts ...grpc.CallOption) (*GetSnowflakeRsp, error) }
LeafGoServiceClient is the client API for LeafGoService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewLeafGoServiceClient ¶
func NewLeafGoServiceClient(cc *grpc.ClientConn) LeafGoServiceClient
type LeafGoServiceServer ¶
type LeafGoServiceServer interface { Ping(context.Context, *empty.Empty) (*empty.Empty, error) GetSegment(context.Context, *GetSegmentReq) (*GetSegmentRsp, error) GetSnowflake(context.Context, *GetSnowflakeReq) (*GetSnowflakeRsp, error) }
LeafGoServiceServer is the server API for LeafGoService service.
type UnimplementedLeafGoServiceServer ¶
type UnimplementedLeafGoServiceServer struct { }
UnimplementedLeafGoServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedLeafGoServiceServer) GetSegment ¶
func (*UnimplementedLeafGoServiceServer) GetSegment(ctx context.Context, req *GetSegmentReq) (*GetSegmentRsp, error)
func (*UnimplementedLeafGoServiceServer) GetSnowflake ¶
func (*UnimplementedLeafGoServiceServer) GetSnowflake(ctx context.Context, req *GetSnowflakeReq) (*GetSnowflakeRsp, error)
Click to show internal directories.
Click to hide internal directories.