Documentation ¶
Index ¶
- func RegisterEventRPCServer(s *grpc.Server, srv EventRPCServer)
- type Event
- func (*Event) Descriptor() ([]byte, []int)
- func (m *Event) GetEndTime() int64
- func (m *Event) GetGoodsList() []*Goods
- func (m *Event) GetId() int32
- func (m *Event) GetLimit() int32
- func (m *Event) GetStartTime() int64
- func (m *Event) GetTopicId() int32
- func (*Event) ProtoMessage()
- func (m *Event) Reset()
- func (m *Event) String() string
- func (m *Event) XXX_DiscardUnknown()
- func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Event) XXX_Merge(src proto.Message)
- func (m *Event) XXX_Size() int
- func (m *Event) XXX_Unmarshal(b []byte) error
- type EventRPCClient
- type EventRPCServer
- type Goods
- func (*Goods) Descriptor() ([]byte, []int)
- func (m *Goods) GetDesc() string
- func (m *Goods) GetEventPrice() string
- func (m *Goods) GetEventStock() int32
- 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 UnimplementedEventRPCServer
- func (*UnimplementedEventRPCServer) EventOffline(ctx context.Context, req *Event) (*Response, error)
- func (*UnimplementedEventRPCServer) EventOnline(ctx context.Context, req *Event) (*Response, error)
- func (*UnimplementedEventRPCServer) TopicOffline(ctx context.Context, req *Topic) (*Response, error)
- func (*UnimplementedEventRPCServer) TopicOnline(ctx context.Context, req *Topic) (*Response, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterEventRPCServer ¶
func RegisterEventRPCServer(s *grpc.Server, srv EventRPCServer)
Types ¶
type Event ¶
type Event 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 (*Event) Descriptor ¶
func (*Event) GetEndTime ¶
func (*Event) GetGoodsList ¶
func (*Event) GetStartTime ¶
func (*Event) GetTopicId ¶
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
func (*Event) XXX_DiscardUnknown ¶
func (m *Event) XXX_DiscardUnknown()
func (*Event) XXX_Marshal ¶
func (*Event) XXX_Unmarshal ¶
type EventRPCClient ¶
type EventRPCClient interface { EventOnline(ctx context.Context, in *Event, opts ...grpc.CallOption) (*Response, error) EventOffline(ctx context.Context, in *Event, 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) }
EventRPCClient is the client API for EventRPC service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewEventRPCClient ¶
func NewEventRPCClient(cc *grpc.ClientConn) EventRPCClient
type EventRPCServer ¶
type EventRPCServer interface { EventOnline(context.Context, *Event) (*Response, error) EventOffline(context.Context, *Event) (*Response, error) TopicOnline(context.Context, *Topic) (*Response, error) TopicOffline(context.Context, *Topic) (*Response, error) }
EventRPCServer is the server API for EventRPC 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"` EventPrice string `protobuf:"bytes,5,opt,name=event_price,json=eventPrice,proto3" json:"event_price,omitempty"` EventStock int32 `protobuf:"varint,6,opt,name=event_stock,json=eventStock,proto3" json:"event_stock,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Goods) Descriptor ¶
func (*Goods) GetEventPrice ¶
func (*Goods) GetEventStock ¶
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 UnimplementedEventRPCServer ¶
type UnimplementedEventRPCServer struct { }
UnimplementedEventRPCServer can be embedded to have forward compatible implementations.
func (*UnimplementedEventRPCServer) EventOffline ¶
func (*UnimplementedEventRPCServer) EventOnline ¶
func (*UnimplementedEventRPCServer) TopicOffline ¶
func (*UnimplementedEventRPCServer) TopicOnline ¶
Click to show internal directories.
Click to hide internal directories.