Documentation ¶
Index ¶
- func RegisterChatServer(s *grpc.Server, srv ChatServer)
- type ChatClient
- type ChatServer
- type Chat_ChannelClient
- type Chat_ChannelServer
- type Confirm
- func (*Confirm) Descriptor() ([]byte, []int)
- func (m *Confirm) GetError() bool
- func (m *Confirm) GetMessage() string
- func (*Confirm) ProtoMessage()
- func (m *Confirm) Reset()
- func (m *Confirm) String() string
- func (m *Confirm) XXX_DiscardUnknown()
- func (m *Confirm) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Confirm) XXX_Merge(src proto.Message)
- func (m *Confirm) XXX_Size() int
- func (m *Confirm) XXX_Unmarshal(b []byte) error
- type ConnectRequest
- func (*ConnectRequest) Descriptor() ([]byte, []int)
- func (m *ConnectRequest) GetUsername() string
- func (*ConnectRequest) ProtoMessage()
- func (m *ConnectRequest) Reset()
- func (m *ConnectRequest) String() string
- func (m *ConnectRequest) XXX_DiscardUnknown()
- func (m *ConnectRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *ConnectRequest) XXX_Merge(src proto.Message)
- func (m *ConnectRequest) XXX_Size() int
- func (m *ConnectRequest) XXX_Unmarshal(b []byte) error
- type Empty
- func (*Empty) Descriptor() ([]byte, []int)
- func (*Empty) ProtoMessage()
- func (m *Empty) Reset()
- func (m *Empty) String() string
- func (m *Empty) XXX_DiscardUnknown()
- func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Empty) XXX_Merge(src proto.Message)
- func (m *Empty) XXX_Size() int
- func (m *Empty) XXX_Unmarshal(b []byte) error
- type Text
- func (*Text) Descriptor() ([]byte, []int)
- func (m *Text) GetMessage() string
- func (m *Text) GetUsername() string
- func (*Text) ProtoMessage()
- func (m *Text) Reset()
- func (m *Text) String() string
- func (m *Text) XXX_DiscardUnknown()
- func (m *Text) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Text) XXX_Merge(src proto.Message)
- func (m *Text) XXX_Size() int
- func (m *Text) XXX_Unmarshal(b []byte) error
- type User
- func (*User) Descriptor() ([]byte, []int)
- func (m *User) GetName() string
- func (*User) ProtoMessage()
- func (m *User) Reset()
- func (m *User) String() string
- func (m *User) XXX_DiscardUnknown()
- func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *User) XXX_Merge(src proto.Message)
- func (m *User) XXX_Size() int
- func (m *User) XXX_Unmarshal(b []byte) error
- type UserList
- func (*UserList) Descriptor() ([]byte, []int)
- func (m *UserList) GetUsers() []*User
- func (*UserList) ProtoMessage()
- func (m *UserList) Reset()
- func (m *UserList) String() string
- func (m *UserList) XXX_DiscardUnknown()
- func (m *UserList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *UserList) XXX_Merge(src proto.Message)
- func (m *UserList) XXX_Size() int
- func (m *UserList) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterChatServer ¶
func RegisterChatServer(s *grpc.Server, srv ChatServer)
Types ¶
type ChatClient ¶
type ChatClient interface { Say(ctx context.Context, in *Text, opts ...grpc.CallOption) (*Confirm, error) Version(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Confirm, error) Users(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*UserList, error) Channel(ctx context.Context, in *ConnectRequest, opts ...grpc.CallOption) (Chat_ChannelClient, error) }
ChatClient is the client API for Chat service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewChatClient ¶
func NewChatClient(cc *grpc.ClientConn) ChatClient
type ChatServer ¶
type ChatServer interface { Say(context.Context, *Text) (*Confirm, error) Version(context.Context, *Empty) (*Confirm, error) Users(context.Context, *Empty) (*UserList, error) Channel(*ConnectRequest, Chat_ChannelServer) error }
ChatServer is the server API for Chat service.
type Chat_ChannelClient ¶
type Chat_ChannelClient interface { Recv() (*Text, error) grpc.ClientStream }
type Chat_ChannelServer ¶
type Chat_ChannelServer interface { Send(*Text) error grpc.ServerStream }
type Confirm ¶
type Confirm struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` Error bool `protobuf:"varint,2,opt,name=error,proto3" json:"error,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Confirm) Descriptor ¶
func (*Confirm) GetMessage ¶
func (*Confirm) ProtoMessage ¶
func (*Confirm) ProtoMessage()
func (*Confirm) XXX_DiscardUnknown ¶
func (m *Confirm) XXX_DiscardUnknown()
func (*Confirm) XXX_Marshal ¶
func (*Confirm) XXX_Unmarshal ¶
type ConnectRequest ¶
type ConnectRequest struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ConnectRequest) Descriptor ¶
func (*ConnectRequest) Descriptor() ([]byte, []int)
func (*ConnectRequest) GetUsername ¶
func (m *ConnectRequest) GetUsername() string
func (*ConnectRequest) ProtoMessage ¶
func (*ConnectRequest) ProtoMessage()
func (*ConnectRequest) Reset ¶
func (m *ConnectRequest) Reset()
func (*ConnectRequest) String ¶
func (m *ConnectRequest) String() string
func (*ConnectRequest) XXX_DiscardUnknown ¶
func (m *ConnectRequest) XXX_DiscardUnknown()
func (*ConnectRequest) XXX_Marshal ¶
func (m *ConnectRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ConnectRequest) XXX_Merge ¶
func (dst *ConnectRequest) XXX_Merge(src proto.Message)
func (*ConnectRequest) XXX_Size ¶
func (m *ConnectRequest) XXX_Size() int
func (*ConnectRequest) XXX_Unmarshal ¶
func (m *ConnectRequest) XXX_Unmarshal(b []byte) error
type Empty ¶
type Empty struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Empty) Descriptor ¶
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) XXX_DiscardUnknown ¶
func (m *Empty) XXX_DiscardUnknown()
func (*Empty) XXX_Marshal ¶
func (*Empty) XXX_Unmarshal ¶
type Text ¶
type Text struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Text) Descriptor ¶
func (*Text) GetMessage ¶
func (*Text) GetUsername ¶
func (*Text) ProtoMessage ¶
func (*Text) ProtoMessage()
func (*Text) XXX_DiscardUnknown ¶
func (m *Text) XXX_DiscardUnknown()
func (*Text) XXX_Unmarshal ¶
type User ¶
type User struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*User) Descriptor ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) XXX_DiscardUnknown ¶
func (m *User) XXX_DiscardUnknown()
func (*User) XXX_Unmarshal ¶
type UserList ¶
type UserList struct { Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*UserList) Descriptor ¶
func (*UserList) ProtoMessage ¶
func (*UserList) ProtoMessage()
func (*UserList) XXX_DiscardUnknown ¶
func (m *UserList) XXX_DiscardUnknown()
func (*UserList) XXX_Marshal ¶
func (*UserList) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.