Documentation
¶
Index ¶
- Variables
- func RegisterCouponServer(s *grpc.Server, srv CouponServer)
- type CouponClient
- type CouponServer
- type ReceiveAllReq
- func (*ReceiveAllReq) Descriptor() ([]byte, []int)
- func (m *ReceiveAllReq) Marshal() (dAtA []byte, err error)
- func (m *ReceiveAllReq) MarshalTo(dAtA []byte) (int, error)
- func (m *ReceiveAllReq) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ReceiveAllReq) ProtoMessage()
- func (m *ReceiveAllReq) Reset()
- func (m *ReceiveAllReq) Size() (n int)
- func (m *ReceiveAllReq) String() string
- func (m *ReceiveAllReq) Unmarshal(dAtA []byte) error
- func (m *ReceiveAllReq) XXX_DiscardUnknown()
- func (m *ReceiveAllReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ReceiveAllReq) XXX_Merge(src proto.Message)
- func (m *ReceiveAllReq) XXX_Size() int
- func (m *ReceiveAllReq) XXX_Unmarshal(b []byte) error
- type ReceiveByIDReq
- func (*ReceiveByIDReq) Descriptor() ([]byte, []int)
- func (m *ReceiveByIDReq) GetId() []string
- func (m *ReceiveByIDReq) Marshal() (dAtA []byte, err error)
- func (m *ReceiveByIDReq) MarshalTo(dAtA []byte) (int, error)
- func (m *ReceiveByIDReq) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ReceiveByIDReq) ProtoMessage()
- func (m *ReceiveByIDReq) Reset()
- func (m *ReceiveByIDReq) Size() (n int)
- func (m *ReceiveByIDReq) String() string
- func (m *ReceiveByIDReq) Unmarshal(dAtA []byte) error
- func (m *ReceiveByIDReq) XXX_DiscardUnknown()
- func (m *ReceiveByIDReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ReceiveByIDReq) XXX_Merge(src proto.Message)
- func (m *ReceiveByIDReq) XXX_Size() int
- func (m *ReceiveByIDReq) XXX_Unmarshal(b []byte) error
- type ReceiveInfo
- func (*ReceiveInfo) Descriptor() ([]byte, []int)
- func (m *ReceiveInfo) GetId() string
- func (m *ReceiveInfo) GetStatus() ReceiveStatus
- func (m *ReceiveInfo) Marshal() (dAtA []byte, err error)
- func (m *ReceiveInfo) MarshalTo(dAtA []byte) (int, error)
- func (m *ReceiveInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ReceiveInfo) ProtoMessage()
- func (m *ReceiveInfo) Reset()
- func (m *ReceiveInfo) Size() (n int)
- func (m *ReceiveInfo) String() string
- func (m *ReceiveInfo) Unmarshal(dAtA []byte) error
- func (m *ReceiveInfo) XXX_DiscardUnknown()
- func (m *ReceiveInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ReceiveInfo) XXX_Merge(src proto.Message)
- func (m *ReceiveInfo) XXX_Size() int
- func (m *ReceiveInfo) XXX_Unmarshal(b []byte) error
- type ReceiveRsp
- func (*ReceiveRsp) Descriptor() ([]byte, []int)
- func (m *ReceiveRsp) GetReceiveList() []*ReceiveInfo
- func (m *ReceiveRsp) Marshal() (dAtA []byte, err error)
- func (m *ReceiveRsp) MarshalTo(dAtA []byte) (int, error)
- func (m *ReceiveRsp) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ReceiveRsp) ProtoMessage()
- func (m *ReceiveRsp) Reset()
- func (m *ReceiveRsp) Size() (n int)
- func (m *ReceiveRsp) String() string
- func (m *ReceiveRsp) Unmarshal(dAtA []byte) error
- func (m *ReceiveRsp) XXX_DiscardUnknown()
- func (m *ReceiveRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ReceiveRsp) XXX_Merge(src proto.Message)
- func (m *ReceiveRsp) XXX_Size() int
- func (m *ReceiveRsp) XXX_Unmarshal(b []byte) error
- type ReceiveStatus
- type UnimplementedCouponServer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthApi = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowApi = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupApi = fmt.Errorf("proto: unexpected end of group") )
View Source
var ReceiveStatus_name = map[int32]string{
0: "Success",
1: "ActNotOpen",
2: "UserNotConfig",
3: "UserNotOpen",
4: "CouponNotExist",
5: "ReceiveRepeat",
6: "UnknownError",
}
View Source
var ReceiveStatus_value = map[string]int32{
"Success": 0,
"ActNotOpen": 1,
"UserNotConfig": 2,
"UserNotOpen": 3,
"CouponNotExist": 4,
"ReceiveRepeat": 5,
"UnknownError": 6,
}
Functions ¶
func RegisterCouponServer ¶
func RegisterCouponServer(s *grpc.Server, srv CouponServer)
Types ¶
type CouponClient ¶
type CouponClient interface { // 领取所有 ReceiveAll(ctx context.Context, in *ReceiveAllReq, opts ...grpc.CallOption) (*ReceiveRsp, error) // 根据id领取 ReceiveByID(ctx context.Context, in *ReceiveByIDReq, opts ...grpc.CallOption) (*ReceiveRsp, error) }
CouponClient is the client API for Coupon service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewCouponClient ¶
func NewCouponClient(cc *grpc.ClientConn) CouponClient
type CouponServer ¶
type CouponServer interface { // 领取所有 ReceiveAll(context.Context, *ReceiveAllReq) (*ReceiveRsp, error) // 根据id领取 ReceiveByID(context.Context, *ReceiveByIDReq) (*ReceiveRsp, error) }
CouponServer is the server API for Coupon service.
type ReceiveAllReq ¶
type ReceiveAllReq struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ReceiveAllReq) Descriptor ¶
func (*ReceiveAllReq) Descriptor() ([]byte, []int)
func (*ReceiveAllReq) Marshal ¶
func (m *ReceiveAllReq) Marshal() (dAtA []byte, err error)
func (*ReceiveAllReq) MarshalToSizedBuffer ¶
func (m *ReceiveAllReq) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ReceiveAllReq) ProtoMessage ¶
func (*ReceiveAllReq) ProtoMessage()
func (*ReceiveAllReq) Reset ¶
func (m *ReceiveAllReq) Reset()
func (*ReceiveAllReq) Size ¶
func (m *ReceiveAllReq) Size() (n int)
func (*ReceiveAllReq) String ¶
func (m *ReceiveAllReq) String() string
func (*ReceiveAllReq) Unmarshal ¶
func (m *ReceiveAllReq) Unmarshal(dAtA []byte) error
func (*ReceiveAllReq) XXX_DiscardUnknown ¶
func (m *ReceiveAllReq) XXX_DiscardUnknown()
func (*ReceiveAllReq) XXX_Marshal ¶
func (m *ReceiveAllReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ReceiveAllReq) XXX_Merge ¶
func (m *ReceiveAllReq) XXX_Merge(src proto.Message)
func (*ReceiveAllReq) XXX_Size ¶
func (m *ReceiveAllReq) XXX_Size() int
func (*ReceiveAllReq) XXX_Unmarshal ¶
func (m *ReceiveAllReq) XXX_Unmarshal(b []byte) error
type ReceiveByIDReq ¶
type ReceiveByIDReq struct { // id Id []string `protobuf:"bytes,1,rep,name=id" json:"id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ReceiveByIDReq) Descriptor ¶
func (*ReceiveByIDReq) Descriptor() ([]byte, []int)
func (*ReceiveByIDReq) GetId ¶
func (m *ReceiveByIDReq) GetId() []string
func (*ReceiveByIDReq) Marshal ¶
func (m *ReceiveByIDReq) Marshal() (dAtA []byte, err error)
func (*ReceiveByIDReq) MarshalToSizedBuffer ¶
func (m *ReceiveByIDReq) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ReceiveByIDReq) ProtoMessage ¶
func (*ReceiveByIDReq) ProtoMessage()
func (*ReceiveByIDReq) Reset ¶
func (m *ReceiveByIDReq) Reset()
func (*ReceiveByIDReq) Size ¶
func (m *ReceiveByIDReq) Size() (n int)
func (*ReceiveByIDReq) String ¶
func (m *ReceiveByIDReq) String() string
func (*ReceiveByIDReq) Unmarshal ¶
func (m *ReceiveByIDReq) Unmarshal(dAtA []byte) error
func (*ReceiveByIDReq) XXX_DiscardUnknown ¶
func (m *ReceiveByIDReq) XXX_DiscardUnknown()
func (*ReceiveByIDReq) XXX_Marshal ¶
func (m *ReceiveByIDReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ReceiveByIDReq) XXX_Merge ¶
func (m *ReceiveByIDReq) XXX_Merge(src proto.Message)
func (*ReceiveByIDReq) XXX_Size ¶
func (m *ReceiveByIDReq) XXX_Size() int
func (*ReceiveByIDReq) XXX_Unmarshal ¶
func (m *ReceiveByIDReq) XXX_Unmarshal(b []byte) error
type ReceiveInfo ¶
type ReceiveInfo struct { // id Id *string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` // 结果 Status *ReceiveStatus `protobuf:"varint,2,opt,name=status,enum=api.ReceiveStatus" json:"status,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ReceiveInfo) Descriptor ¶
func (*ReceiveInfo) Descriptor() ([]byte, []int)
func (*ReceiveInfo) GetId ¶
func (m *ReceiveInfo) GetId() string
func (*ReceiveInfo) GetStatus ¶
func (m *ReceiveInfo) GetStatus() ReceiveStatus
func (*ReceiveInfo) Marshal ¶
func (m *ReceiveInfo) Marshal() (dAtA []byte, err error)
func (*ReceiveInfo) MarshalToSizedBuffer ¶
func (m *ReceiveInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ReceiveInfo) ProtoMessage ¶
func (*ReceiveInfo) ProtoMessage()
func (*ReceiveInfo) Reset ¶
func (m *ReceiveInfo) Reset()
func (*ReceiveInfo) Size ¶
func (m *ReceiveInfo) Size() (n int)
func (*ReceiveInfo) String ¶
func (m *ReceiveInfo) String() string
func (*ReceiveInfo) Unmarshal ¶
func (m *ReceiveInfo) Unmarshal(dAtA []byte) error
func (*ReceiveInfo) XXX_DiscardUnknown ¶
func (m *ReceiveInfo) XXX_DiscardUnknown()
func (*ReceiveInfo) XXX_Marshal ¶
func (m *ReceiveInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ReceiveInfo) XXX_Merge ¶
func (m *ReceiveInfo) XXX_Merge(src proto.Message)
func (*ReceiveInfo) XXX_Size ¶
func (m *ReceiveInfo) XXX_Size() int
func (*ReceiveInfo) XXX_Unmarshal ¶
func (m *ReceiveInfo) XXX_Unmarshal(b []byte) error
type ReceiveRsp ¶
type ReceiveRsp struct { // 领取结果 ReceiveList []*ReceiveInfo `protobuf:"bytes,1,rep,name=receiveList" json:"receiveList,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ReceiveRsp) Descriptor ¶
func (*ReceiveRsp) Descriptor() ([]byte, []int)
func (*ReceiveRsp) GetReceiveList ¶
func (m *ReceiveRsp) GetReceiveList() []*ReceiveInfo
func (*ReceiveRsp) Marshal ¶
func (m *ReceiveRsp) Marshal() (dAtA []byte, err error)
func (*ReceiveRsp) MarshalToSizedBuffer ¶
func (m *ReceiveRsp) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ReceiveRsp) ProtoMessage ¶
func (*ReceiveRsp) ProtoMessage()
func (*ReceiveRsp) Reset ¶
func (m *ReceiveRsp) Reset()
func (*ReceiveRsp) Size ¶
func (m *ReceiveRsp) Size() (n int)
func (*ReceiveRsp) String ¶
func (m *ReceiveRsp) String() string
func (*ReceiveRsp) Unmarshal ¶
func (m *ReceiveRsp) Unmarshal(dAtA []byte) error
func (*ReceiveRsp) XXX_DiscardUnknown ¶
func (m *ReceiveRsp) XXX_DiscardUnknown()
func (*ReceiveRsp) XXX_Marshal ¶
func (m *ReceiveRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ReceiveRsp) XXX_Merge ¶
func (m *ReceiveRsp) XXX_Merge(src proto.Message)
func (*ReceiveRsp) XXX_Size ¶
func (m *ReceiveRsp) XXX_Size() int
func (*ReceiveRsp) XXX_Unmarshal ¶
func (m *ReceiveRsp) XXX_Unmarshal(b []byte) error
type ReceiveStatus ¶
type ReceiveStatus int32
const ( // 成功 ReceiveStatus_Success ReceiveStatus = 0 // 活动未打开 ReceiveStatus_ActNotOpen ReceiveStatus = 1 // 未知用户 ReceiveStatus_UserNotConfig ReceiveStatus = 2 // 用户配置未打开 ReceiveStatus_UserNotOpen ReceiveStatus = 3 // 领取目标不存在 ReceiveStatus_CouponNotExist ReceiveStatus = 4 // 重复领取 ReceiveStatus_ReceiveRepeat ReceiveStatus = 5 // 未知错误 ReceiveStatus_UnknownError ReceiveStatus = 6 )
func (ReceiveStatus) Enum ¶
func (x ReceiveStatus) Enum() *ReceiveStatus
func (ReceiveStatus) EnumDescriptor ¶
func (ReceiveStatus) EnumDescriptor() ([]byte, []int)
func (ReceiveStatus) String ¶
func (x ReceiveStatus) String() string
func (*ReceiveStatus) UnmarshalJSON ¶
func (x *ReceiveStatus) UnmarshalJSON(data []byte) error
type UnimplementedCouponServer ¶
type UnimplementedCouponServer struct { }
UnimplementedCouponServer can be embedded to have forward compatible implementations.
func (*UnimplementedCouponServer) ReceiveAll ¶
func (*UnimplementedCouponServer) ReceiveAll(ctx context.Context, req *ReceiveAllReq) (*ReceiveRsp, error)
func (*UnimplementedCouponServer) ReceiveByID ¶
func (*UnimplementedCouponServer) ReceiveByID(ctx context.Context, req *ReceiveByIDReq) (*ReceiveRsp, error)
Click to show internal directories.
Click to hide internal directories.