user

package
v0.0.0-...-00a9c49 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_user_proto protoreflect.FileDescriptor

Functions

func NewUserEndpoints

func NewUserEndpoints() []*api.Endpoint

func RegisterUserHandler

func RegisterUserHandler(s server.Server, hdlr UserHandler, opts ...server.HandlerOption) error

Types

type RequestLogin

type RequestLogin struct {
	Name     string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*RequestLogin) Descriptor deprecated

func (*RequestLogin) Descriptor() ([]byte, []int)

Deprecated: Use RequestLogin.ProtoReflect.Descriptor instead.

func (*RequestLogin) GetName

func (x *RequestLogin) GetName() string

func (*RequestLogin) GetPassword

func (x *RequestLogin) GetPassword() string

func (*RequestLogin) ProtoMessage

func (*RequestLogin) ProtoMessage()

func (*RequestLogin) ProtoReflect

func (x *RequestLogin) ProtoReflect() protoreflect.Message

func (*RequestLogin) Reset

func (x *RequestLogin) Reset()

func (*RequestLogin) String

func (x *RequestLogin) String() string

type ResponseLogin

type ResponseLogin struct {
	Code    int32  `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	UserId  int64  `protobuf:"varint,3,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// contains filtered or unexported fields
}

func (*ResponseLogin) Descriptor deprecated

func (*ResponseLogin) Descriptor() ([]byte, []int)

Deprecated: Use ResponseLogin.ProtoReflect.Descriptor instead.

func (*ResponseLogin) GetCode

func (x *ResponseLogin) GetCode() int32

func (*ResponseLogin) GetMessage

func (x *ResponseLogin) GetMessage() string

func (*ResponseLogin) GetUserId

func (x *ResponseLogin) GetUserId() int64

func (*ResponseLogin) ProtoMessage

func (*ResponseLogin) ProtoMessage()

func (*ResponseLogin) ProtoReflect

func (x *ResponseLogin) ProtoReflect() protoreflect.Message

func (*ResponseLogin) Reset

func (x *ResponseLogin) Reset()

func (*ResponseLogin) String

func (x *ResponseLogin) String() string

type UserHandler

type UserHandler interface {
	Login(context.Context, *RequestLogin, *ResponseLogin) error
	SignUp(context.Context, *RequestLogin, *ResponseLogin) error
}

type UserService

type UserService interface {
	Login(ctx context.Context, in *RequestLogin, opts ...client.CallOption) (*ResponseLogin, error)
	SignUp(ctx context.Context, in *RequestLogin, opts ...client.CallOption) (*ResponseLogin, error)
}

func NewUserService

func NewUserService(name string, c client.Client) UserService

Jump to

Keyboard shortcuts

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