Documentation ¶
Overview ¶
Package wat_api is a generated protocol buffer package.
It is generated from these files:
wat_api.proto
It has these top-level messages:
Registration RegistrationResponse ClientMessage ServerMessage Location
Index ¶
- Variables
- func RegisterWatServer(s *grpc.Server, srv WatServer)
- type ClientMessage
- type Location
- type Registration
- type RegistrationResponse
- func (*RegistrationResponse) Descriptor() ([]byte, []int)
- func (m *RegistrationResponse) GetStatus() RegistrationResponse_Status
- func (m *RegistrationResponse) GetToken() string
- func (*RegistrationResponse) ProtoMessage()
- func (m *RegistrationResponse) Reset()
- func (m *RegistrationResponse) String() string
- type RegistrationResponse_Status
- type ServerMessage
- type WatClient
- type WatServer
- type Wat_OpenChatClient
- type Wat_OpenChatServer
Constants ¶
This section is empty.
Variables ¶
View Source
var RegistrationResponse_Status_name = map[int32]string{
0: "OK",
1: "NICK_ALREADY_IN_USE",
}
View Source
var RegistrationResponse_Status_value = map[string]int32{
"OK": 0,
"NICK_ALREADY_IN_USE": 1,
}
Functions ¶
func RegisterWatServer ¶
Types ¶
type ClientMessage ¶
type ClientMessage struct {
Content string `protobuf:"bytes,2,opt,name=content" json:"content,omitempty"`
}
func (*ClientMessage) Descriptor ¶
func (*ClientMessage) Descriptor() ([]byte, []int)
func (*ClientMessage) GetContent ¶
func (m *ClientMessage) GetContent() string
func (*ClientMessage) ProtoMessage ¶
func (*ClientMessage) ProtoMessage()
func (*ClientMessage) Reset ¶
func (m *ClientMessage) Reset()
func (*ClientMessage) String ¶
func (m *ClientMessage) String() string
type Location ¶
type Location struct { City string `protobuf:"bytes,1,opt,name=city" json:"city,omitempty"` Loc string `protobuf:"bytes,2,opt,name=loc" json:"loc,omitempty"` }
func (*Location) Descriptor ¶
func (*Location) ProtoMessage ¶
func (*Location) ProtoMessage()
type Registration ¶
type Registration struct { Nick string `protobuf:"bytes,1,opt,name=nick" json:"nick,omitempty"` Location *Location `protobuf:"bytes,2,opt,name=location" json:"location,omitempty"` }
func (*Registration) Descriptor ¶
func (*Registration) Descriptor() ([]byte, []int)
func (*Registration) GetLocation ¶
func (m *Registration) GetLocation() *Location
func (*Registration) GetNick ¶
func (m *Registration) GetNick() string
func (*Registration) ProtoMessage ¶
func (*Registration) ProtoMessage()
func (*Registration) Reset ¶
func (m *Registration) Reset()
func (*Registration) String ¶
func (m *Registration) String() string
type RegistrationResponse ¶
type RegistrationResponse struct { Status RegistrationResponse_Status `protobuf:"varint,1,opt,name=status,enum=wat_api.RegistrationResponse_Status" json:"status,omitempty"` Token string `protobuf:"bytes,2,opt,name=token" json:"token,omitempty"` }
func (*RegistrationResponse) Descriptor ¶
func (*RegistrationResponse) Descriptor() ([]byte, []int)
func (*RegistrationResponse) GetStatus ¶
func (m *RegistrationResponse) GetStatus() RegistrationResponse_Status
func (*RegistrationResponse) GetToken ¶
func (m *RegistrationResponse) GetToken() string
func (*RegistrationResponse) ProtoMessage ¶
func (*RegistrationResponse) ProtoMessage()
func (*RegistrationResponse) Reset ¶
func (m *RegistrationResponse) Reset()
func (*RegistrationResponse) String ¶
func (m *RegistrationResponse) String() string
type RegistrationResponse_Status ¶
type RegistrationResponse_Status int32
const ( RegistrationResponse_OK RegistrationResponse_Status = 0 RegistrationResponse_NICK_ALREADY_IN_USE RegistrationResponse_Status = 1 )
func (RegistrationResponse_Status) EnumDescriptor ¶
func (RegistrationResponse_Status) EnumDescriptor() ([]byte, []int)
func (RegistrationResponse_Status) String ¶
func (x RegistrationResponse_Status) String() string
type ServerMessage ¶
type ServerMessage struct { Nick string `protobuf:"bytes,1,opt,name=nick" json:"nick,omitempty"` Content string `protobuf:"bytes,2,opt,name=content" json:"content,omitempty"` Location *Location `protobuf:"bytes,3,opt,name=location" json:"location,omitempty"` }
func (*ServerMessage) Descriptor ¶
func (*ServerMessage) Descriptor() ([]byte, []int)
func (*ServerMessage) GetContent ¶
func (m *ServerMessage) GetContent() string
func (*ServerMessage) GetLocation ¶
func (m *ServerMessage) GetLocation() *Location
func (*ServerMessage) GetNick ¶
func (m *ServerMessage) GetNick() string
func (*ServerMessage) ProtoMessage ¶
func (*ServerMessage) ProtoMessage()
func (*ServerMessage) Reset ¶
func (m *ServerMessage) Reset()
func (*ServerMessage) String ¶
func (m *ServerMessage) String() string
type WatClient ¶
type WatClient interface { RegisterClient(ctx context.Context, in *Registration, opts ...grpc.CallOption) (*RegistrationResponse, error) OpenChat(ctx context.Context, opts ...grpc.CallOption) (Wat_OpenChatClient, error) }
func NewWatClient ¶
func NewWatClient(cc *grpc.ClientConn) WatClient
type WatServer ¶
type WatServer interface { RegisterClient(context.Context, *Registration) (*RegistrationResponse, error) OpenChat(Wat_OpenChatServer) error }
type Wat_OpenChatClient ¶
type Wat_OpenChatClient interface { Send(*ClientMessage) error Recv() (*ServerMessage, error) grpc.ClientStream }
type Wat_OpenChatServer ¶
type Wat_OpenChatServer interface { Send(*ServerMessage) error Recv() (*ClientMessage, error) grpc.ServerStream }
Click to show internal directories.
Click to hide internal directories.