user

package
v0.6.6 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package user is a generated protocol buffer package.

It is generated from these files:

user.proto

It has these top-level messages:

UserRequest
UserResponse
LoginRequest
LoginResponse

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AcceptUserServiceClient

func AcceptUserServiceClient(lis net.Listener, x UserService)

AcceptUserServiceClient accepts connections on the listener and serves requests for each incoming connection. Accept blocks; the caller typically invokes it in a go statement.

func GetUserByToken

func GetUserByToken(dbname, token string, url ...string) (map[string]string, error)

func ListenAndServeUserService

func ListenAndServeUserService(network, addr string, x UserService) error

ListenAndServeUserService listen announces on the local network address laddr and serves the given UserService implementation.

func Login

func Login(dbname, account, password string, url ...string) (map[string]string, error)

func NewUserServiceServer

func NewUserServiceServer(x UserService) *rpc.Server

NewUserServiceServer returns a new UserService Server.

func RegisterUserService

func RegisterUserService(srv *rpc.Server, x UserService) error

RegisterUserService publish the given UserService implementation on the server.

Types

type LoginRequest

type LoginRequest struct {
	Dbname           *string `protobuf:"bytes,1,opt,name=dbname" json:"dbname,omitempty"`
	Account          *string `protobuf:"bytes,2,opt,name=account" json:"account,omitempty"`
	Password         *string `protobuf:"bytes,3,opt,name=password" json:"password,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

用户登录请求结构

func (*LoginRequest) GetAccount

func (m *LoginRequest) GetAccount() string

func (*LoginRequest) GetDbname

func (m *LoginRequest) GetDbname() string

func (*LoginRequest) GetPassword

func (m *LoginRequest) GetPassword() string

func (*LoginRequest) ProtoMessage

func (*LoginRequest) ProtoMessage()

func (*LoginRequest) Reset

func (m *LoginRequest) Reset()

func (*LoginRequest) String

func (m *LoginRequest) String() string

type LoginResponse

type LoginResponse struct {
	UserId           *string `protobuf:"bytes,1,opt,name=user_id" json:"user_id,omitempty"`
	Username         *string `protobuf:"bytes,2,opt,name=username" json:"username,omitempty"`
	Nickname         *string `protobuf:"bytes,3,opt,name=nickname" json:"nickname,omitempty"`
	Mobile           *string `protobuf:"bytes,4,opt,name=mobile" json:"mobile,omitempty"`
	Email            *string `protobuf:"bytes,5,opt,name=email" json:"email,omitempty"`
	Status           *string `protobuf:"bytes,6,opt,name=status" json:"status,omitempty"`
	BusinessId       *string `protobuf:"bytes,7,opt,name=business_id" json:"business_id,omitempty"`
	StoreId          *string `protobuf:"bytes,8,opt,name=store_id" json:"store_id,omitempty"`
	FansTo           *string `protobuf:"bytes,9,opt,name=fans_to" json:"fans_to,omitempty"`
	IsVip            *string `protobuf:"bytes,10,opt,name=is_vip" json:"is_vip,omitempty"`
	Token            *string `protobuf:"bytes,11,opt,name=token" json:"token,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

使用token查询用户信息响应结构

func (*LoginResponse) GetBusinessId

func (m *LoginResponse) GetBusinessId() string

func (*LoginResponse) GetEmail

func (m *LoginResponse) GetEmail() string

func (*LoginResponse) GetFansTo

func (m *LoginResponse) GetFansTo() string

func (*LoginResponse) GetIsVip

func (m *LoginResponse) GetIsVip() string

func (*LoginResponse) GetMobile

func (m *LoginResponse) GetMobile() string

func (*LoginResponse) GetNickname

func (m *LoginResponse) GetNickname() string

func (*LoginResponse) GetStatus

func (m *LoginResponse) GetStatus() string

func (*LoginResponse) GetStoreId

func (m *LoginResponse) GetStoreId() string

func (*LoginResponse) GetToken

func (m *LoginResponse) GetToken() string

func (*LoginResponse) GetUserId

func (m *LoginResponse) GetUserId() string

func (*LoginResponse) GetUsername

func (m *LoginResponse) GetUsername() string

func (*LoginResponse) ProtoMessage

func (*LoginResponse) ProtoMessage()

func (*LoginResponse) Reset

func (m *LoginResponse) Reset()

func (*LoginResponse) String

func (m *LoginResponse) String() string

type UserRequest

type UserRequest struct {
	Dbname           *string `protobuf:"bytes,1,opt,name=dbname" json:"dbname,omitempty"`
	Token            *string `protobuf:"bytes,2,opt,name=token" json:"token,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

使用token查询用户信息请求结构

func (*UserRequest) GetDbname

func (m *UserRequest) GetDbname() string

func (*UserRequest) GetToken

func (m *UserRequest) GetToken() string

func (*UserRequest) ProtoMessage

func (*UserRequest) ProtoMessage()

func (*UserRequest) Reset

func (m *UserRequest) Reset()

func (*UserRequest) String

func (m *UserRequest) String() string

type UserResponse

type UserResponse struct {
	UserId           *string `protobuf:"bytes,1,opt,name=user_id" json:"user_id,omitempty"`
	Username         *string `protobuf:"bytes,2,opt,name=username" json:"username,omitempty"`
	Nickname         *string `protobuf:"bytes,3,opt,name=nickname" json:"nickname,omitempty"`
	Mobile           *string `protobuf:"bytes,4,opt,name=mobile" json:"mobile,omitempty"`
	Email            *string `protobuf:"bytes,5,opt,name=email" json:"email,omitempty"`
	Status           *string `protobuf:"bytes,6,opt,name=status" json:"status,omitempty"`
	BusinessId       *string `protobuf:"bytes,7,opt,name=business_id" json:"business_id,omitempty"`
	StoreId          *string `protobuf:"bytes,8,opt,name=store_id" json:"store_id,omitempty"`
	FansTo           *string `protobuf:"bytes,9,opt,name=fans_to" json:"fans_to,omitempty"`
	IsVip            *string `protobuf:"bytes,10,opt,name=is_vip" json:"is_vip,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

使用token查询用户信息响应结构

func (*UserResponse) GetBusinessId

func (m *UserResponse) GetBusinessId() string

func (*UserResponse) GetEmail

func (m *UserResponse) GetEmail() string

func (*UserResponse) GetFansTo

func (m *UserResponse) GetFansTo() string

func (*UserResponse) GetIsVip

func (m *UserResponse) GetIsVip() string

func (*UserResponse) GetMobile

func (m *UserResponse) GetMobile() string

func (*UserResponse) GetNickname

func (m *UserResponse) GetNickname() string

func (*UserResponse) GetStatus

func (m *UserResponse) GetStatus() string

func (*UserResponse) GetStoreId

func (m *UserResponse) GetStoreId() string

func (*UserResponse) GetUserId

func (m *UserResponse) GetUserId() string

func (*UserResponse) GetUsername

func (m *UserResponse) GetUsername() string

func (*UserResponse) ProtoMessage

func (*UserResponse) ProtoMessage()

func (*UserResponse) Reset

func (m *UserResponse) Reset()

func (*UserResponse) String

func (m *UserResponse) String() string

type UserService

type UserService interface {
	GetByToken(in *UserRequest, out *UserResponse) error
	Login(in *LoginRequest, out *LoginResponse) error
}

type UserServiceClient

type UserServiceClient struct {
	*rpc.Client
}

func DialUserService

func DialUserService(network, addr string) (*UserServiceClient, *rpc.Client, error)

DialUserService connects to an UserService at the specified network address.

func DialUserServiceTimeout

func DialUserServiceTimeout(network, addr string,
	timeout time.Duration) (*UserServiceClient, *rpc.Client, error)

DialUserServiceTimeout connects to an UserService at the specified network address.

func NewUserServiceClient

func NewUserServiceClient(conn io.ReadWriteCloser) (*UserServiceClient, *rpc.Client)

NewUserServiceClient returns a UserService rpc.Client and stub to handle requests to the set of UserService at the other end of the connection.

func (*UserServiceClient) GetByToken

func (c *UserServiceClient) GetByToken(in *UserRequest, out *UserResponse) error

func (*UserServiceClient) Login

func (c *UserServiceClient) Login(in *LoginRequest, out *LoginResponse) error

Jump to

Keyboard shortcuts

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