Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterUserServer ¶
func RegisterUserServer(s *grpc.Server, srv UserServer)
Types ¶
type Request ¶
type Request struct { Username string `protobuf:"bytes,1,opt,name=username" json:"username,omitempty"` Password string `protobuf:"bytes,2,opt,name=password" json:"password,omitempty"` }
func (*Request) Descriptor ¶
func (*Request) GetPassword ¶
func (*Request) GetUsername ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
type Result ¶
type Result struct {
Correct bool `protobuf:"varint,1,opt,name=correct" json:"correct,omitempty"`
}
func (*Result) Descriptor ¶
func (*Result) GetCorrect ¶
func (*Result) ProtoMessage ¶
func (*Result) ProtoMessage()
type UserClient ¶
type UserClient interface { // CheckUser returns whether the username and password are correct CheckUser(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Result, error) }
UserClient is the client API for User service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewUserClient ¶
func NewUserClient(cc *grpc.ClientConn) UserClient
Click to show internal directories.
Click to hide internal directories.