Documentation ¶
Index ¶
- func RegisterActivityRPCServer(s *grpc.Server, srv ActivityRPCServer)
- type Activity
- func (*Activity) Descriptor() ([]byte, []int)
- func (m *Activity) GetEndTime() int64
- func (m *Activity) GetGoodsList() []*Goods
- func (m *Activity) GetId() int32
- func (m *Activity) GetLimit() int32
- func (m *Activity) GetStartTime() int64
- func (m *Activity) GetTopicId() int32
- func (*Activity) ProtoMessage()
- func (m *Activity) Reset()
- func (m *Activity) String() string
- func (m *Activity) XXX_DiscardUnknown()
- func (m *Activity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Activity) XXX_Merge(src proto.Message)
- func (m *Activity) XXX_Size() int
- func (m *Activity) XXX_Unmarshal(b []byte) error
- type ActivityRPCClient
- type ActivityRPCServer
- type Goods
- func (*Goods) Descriptor() ([]byte, []int)
- func (m *Goods) GetActivityPrice() string
- func (m *Goods) GetActivityStock() int32
- func (m *Goods) GetDesc() string
- func (m *Goods) GetId() int32
- func (m *Goods) GetImg() string
- func (m *Goods) GetPrice() string
- func (*Goods) ProtoMessage()
- func (m *Goods) Reset()
- func (m *Goods) String() string
- func (m *Goods) XXX_DiscardUnknown()
- func (m *Goods) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Goods) XXX_Merge(src proto.Message)
- func (m *Goods) XXX_Size() int
- func (m *Goods) XXX_Unmarshal(b []byte) error
- type Response
- func (*Response) Descriptor() ([]byte, []int)
- func (m *Response) GetCode() int32
- func (m *Response) GetMsg() string
- func (*Response) ProtoMessage()
- func (m *Response) Reset()
- func (m *Response) String() string
- func (m *Response) XXX_DiscardUnknown()
- func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Response) XXX_Merge(src proto.Message)
- func (m *Response) XXX_Size() int
- func (m *Response) XXX_Unmarshal(b []byte) error
- type Topic
- func (*Topic) Descriptor() ([]byte, []int)
- func (m *Topic) GetBanner() string
- func (m *Topic) GetDesc() string
- func (m *Topic) GetEndTime() int64
- func (m *Topic) GetId() int32
- func (m *Topic) GetStartTime() int64
- func (m *Topic) GetTitle() string
- func (*Topic) ProtoMessage()
- func (m *Topic) Reset()
- func (m *Topic) String() string
- func (m *Topic) XXX_DiscardUnknown()
- func (m *Topic) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Topic) XXX_Merge(src proto.Message)
- func (m *Topic) XXX_Size() int
- func (m *Topic) XXX_Unmarshal(b []byte) error
- type UnimplementedActivityRPCServer
- func (*UnimplementedActivityRPCServer) ActivityOffline(ctx context.Context, req *Activity) (*Response, error)
- func (*UnimplementedActivityRPCServer) ActivityOnline(ctx context.Context, req *Activity) (*Response, error)
- func (*UnimplementedActivityRPCServer) TopicOffline(ctx context.Context, req *Topic) (*Response, error)
- func (*UnimplementedActivityRPCServer) TopicOnline(ctx context.Context, req *Topic) (*Response, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterActivityRPCServer ¶
func RegisterActivityRPCServer(s *grpc.Server, srv ActivityRPCServer)
Types ¶
type Activity ¶
type Activity struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` TopicId int32 `protobuf:"varint,2,opt,name=topic_id,json=topicId,proto3" json:"topic_id,omitempty"` StartTime int64 `protobuf:"varint,3,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` EndTime int64 `protobuf:"varint,4,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` Limit int32 `protobuf:"varint,5,opt,name=limit,proto3" json:"limit,omitempty"` GoodsList []*Goods `protobuf:"bytes,6,rep,name=goods_list,json=goodsList,proto3" json:"goods_list,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Activity) Descriptor ¶
func (*Activity) GetEndTime ¶
func (*Activity) GetGoodsList ¶
func (*Activity) GetStartTime ¶
func (*Activity) GetTopicId ¶
func (*Activity) ProtoMessage ¶
func (*Activity) ProtoMessage()
func (*Activity) XXX_DiscardUnknown ¶
func (m *Activity) XXX_DiscardUnknown()
func (*Activity) XXX_Marshal ¶
func (*Activity) XXX_Unmarshal ¶
type ActivityRPCClient ¶
type ActivityRPCClient interface { ActivityOnline(ctx context.Context, in *Activity, opts ...grpc.CallOption) (*Response, error) ActivityOffline(ctx context.Context, in *Activity, opts ...grpc.CallOption) (*Response, error) TopicOnline(ctx context.Context, in *Topic, opts ...grpc.CallOption) (*Response, error) TopicOffline(ctx context.Context, in *Topic, opts ...grpc.CallOption) (*Response, error) }
ActivityRPCClient is the client API for ActivityRPC service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewActivityRPCClient ¶
func NewActivityRPCClient(cc *grpc.ClientConn) ActivityRPCClient
type ActivityRPCServer ¶
type ActivityRPCServer interface { ActivityOnline(context.Context, *Activity) (*Response, error) ActivityOffline(context.Context, *Activity) (*Response, error) TopicOnline(context.Context, *Topic) (*Response, error) TopicOffline(context.Context, *Topic) (*Response, error) }
ActivityRPCServer is the server API for ActivityRPC service.
type Goods ¶
type Goods struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"` Img string `protobuf:"bytes,3,opt,name=img,proto3" json:"img,omitempty"` Price string `protobuf:"bytes,4,opt,name=price,proto3" json:"price,omitempty"` ActivityPrice string `protobuf:"bytes,5,opt,name=activity_price,json=activityPrice,proto3" json:"activity_price,omitempty"` ActivityStock int32 `protobuf:"varint,6,opt,name=activity_stock,json=activityStock,proto3" json:"activity_stock,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Goods) Descriptor ¶
func (*Goods) GetActivityPrice ¶
func (*Goods) GetActivityStock ¶
func (*Goods) ProtoMessage ¶
func (*Goods) ProtoMessage()
func (*Goods) XXX_DiscardUnknown ¶
func (m *Goods) XXX_DiscardUnknown()
func (*Goods) XXX_Marshal ¶
func (*Goods) XXX_Unmarshal ¶
type Response ¶
type Response struct { // 返回 Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Response) Descriptor ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) XXX_DiscardUnknown ¶
func (m *Response) XXX_DiscardUnknown()
func (*Response) XXX_Marshal ¶
func (*Response) XXX_Unmarshal ¶
type Topic ¶
type Topic struct { // Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` Desc string `protobuf:"bytes,3,opt,name=desc,proto3" json:"desc,omitempty"` Banner string `protobuf:"bytes,4,opt,name=banner,proto3" json:"banner,omitempty"` StartTime int64 `protobuf:"varint,5,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` EndTime int64 `protobuf:"varint,6,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Topic) Descriptor ¶
func (*Topic) GetEndTime ¶
func (*Topic) GetStartTime ¶
func (*Topic) ProtoMessage ¶
func (*Topic) ProtoMessage()
func (*Topic) XXX_DiscardUnknown ¶
func (m *Topic) XXX_DiscardUnknown()
func (*Topic) XXX_Marshal ¶
func (*Topic) XXX_Unmarshal ¶
type UnimplementedActivityRPCServer ¶
type UnimplementedActivityRPCServer struct { }
UnimplementedActivityRPCServer can be embedded to have forward compatible implementations.
func (*UnimplementedActivityRPCServer) ActivityOffline ¶
func (*UnimplementedActivityRPCServer) ActivityOnline ¶
func (*UnimplementedActivityRPCServer) TopicOffline ¶
func (*UnimplementedActivityRPCServer) TopicOnline ¶
Click to show internal directories.
Click to hide internal directories.