rpc

package
v0.0.0-...-3bbbf02 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

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) Descriptor() ([]byte, []int)

func (*Event) GetEndTime

func (m *Event) GetEndTime() int64

func (*Event) GetGoodsList

func (m *Event) GetGoodsList() []*Goods

func (*Event) GetId

func (m *Event) GetId() int32

func (*Event) GetLimit

func (m *Event) GetLimit() int32

func (*Event) GetStartTime

func (m *Event) GetStartTime() int64

func (*Event) GetTopicId

func (m *Event) GetTopicId() int32

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) Reset

func (m *Event) Reset()

func (*Event) String

func (m *Event) String() string

func (*Event) XXX_DiscardUnknown

func (m *Event) XXX_DiscardUnknown()

func (*Event) XXX_Marshal

func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Event) XXX_Merge

func (m *Event) XXX_Merge(src proto.Message)

func (*Event) XXX_Size

func (m *Event) XXX_Size() int

func (*Event) XXX_Unmarshal

func (m *Event) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*Goods) GetDesc

func (m *Goods) GetDesc() string

func (*Goods) GetEventPrice

func (m *Goods) GetEventPrice() string

func (*Goods) GetEventStock

func (m *Goods) GetEventStock() int32

func (*Goods) GetId

func (m *Goods) GetId() int32

func (*Goods) GetImg

func (m *Goods) GetImg() string

func (*Goods) GetPrice

func (m *Goods) GetPrice() string

func (*Goods) ProtoMessage

func (*Goods) ProtoMessage()

func (*Goods) Reset

func (m *Goods) Reset()

func (*Goods) String

func (m *Goods) String() string

func (*Goods) XXX_DiscardUnknown

func (m *Goods) XXX_DiscardUnknown()

func (*Goods) XXX_Marshal

func (m *Goods) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Goods) XXX_Merge

func (m *Goods) XXX_Merge(src proto.Message)

func (*Goods) XXX_Size

func (m *Goods) XXX_Size() int

func (*Goods) XXX_Unmarshal

func (m *Goods) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*Response) GetCode

func (m *Response) GetCode() int32

func (*Response) GetMsg

func (m *Response) GetMsg() string

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) Reset

func (m *Response) Reset()

func (*Response) String

func (m *Response) String() string

func (*Response) XXX_DiscardUnknown

func (m *Response) XXX_DiscardUnknown()

func (*Response) XXX_Marshal

func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Response) XXX_Merge

func (m *Response) XXX_Merge(src proto.Message)

func (*Response) XXX_Size

func (m *Response) XXX_Size() int

func (*Response) XXX_Unmarshal

func (m *Response) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*Topic) GetBanner

func (m *Topic) GetBanner() string

func (*Topic) GetDesc

func (m *Topic) GetDesc() string

func (*Topic) GetEndTime

func (m *Topic) GetEndTime() int64

func (*Topic) GetId

func (m *Topic) GetId() int32

func (*Topic) GetStartTime

func (m *Topic) GetStartTime() int64

func (*Topic) GetTitle

func (m *Topic) GetTitle() string

func (*Topic) ProtoMessage

func (*Topic) ProtoMessage()

func (*Topic) Reset

func (m *Topic) Reset()

func (*Topic) String

func (m *Topic) String() string

func (*Topic) XXX_DiscardUnknown

func (m *Topic) XXX_DiscardUnknown()

func (*Topic) XXX_Marshal

func (m *Topic) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Topic) XXX_Merge

func (m *Topic) XXX_Merge(src proto.Message)

func (*Topic) XXX_Size

func (m *Topic) XXX_Size() int

func (*Topic) XXX_Unmarshal

func (m *Topic) XXX_Unmarshal(b []byte) error

type UnimplementedEventRPCServer

type UnimplementedEventRPCServer struct {
}

UnimplementedEventRPCServer can be embedded to have forward compatible implementations.

func (*UnimplementedEventRPCServer) EventOffline

func (*UnimplementedEventRPCServer) EventOffline(ctx context.Context, req *Event) (*Response, error)

func (*UnimplementedEventRPCServer) EventOnline

func (*UnimplementedEventRPCServer) EventOnline(ctx context.Context, req *Event) (*Response, error)

func (*UnimplementedEventRPCServer) TopicOffline

func (*UnimplementedEventRPCServer) TopicOffline(ctx context.Context, req *Topic) (*Response, error)

func (*UnimplementedEventRPCServer) TopicOnline

func (*UnimplementedEventRPCServer) TopicOnline(ctx context.Context, req *Topic) (*Response, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL