go_micro_service_user

package
v0.0.0-...-a949f40 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterUserServiceHandler

func RegisterUserServiceHandler(s server.Server, hdlr UserServiceHandler, opts ...server.HandlerOption) error

Types

type ReqSignin

type ReqSignin struct {
	Username             string   `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Password             string   `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ReqSignin) Descriptor

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

func (*ReqSignin) GetPassword

func (m *ReqSignin) GetPassword() string

func (*ReqSignin) GetUsername

func (m *ReqSignin) GetUsername() string

func (*ReqSignin) ProtoMessage

func (*ReqSignin) ProtoMessage()

func (*ReqSignin) Reset

func (m *ReqSignin) Reset()

func (*ReqSignin) String

func (m *ReqSignin) String() string

func (*ReqSignin) XXX_DiscardUnknown

func (m *ReqSignin) XXX_DiscardUnknown()

func (*ReqSignin) XXX_Marshal

func (m *ReqSignin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ReqSignin) XXX_Merge

func (m *ReqSignin) XXX_Merge(src proto.Message)

func (*ReqSignin) XXX_Size

func (m *ReqSignin) XXX_Size() int

func (*ReqSignin) XXX_Unmarshal

func (m *ReqSignin) XXX_Unmarshal(b []byte) error

type ReqSignup

type ReqSignup struct {
	Username             string   `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Password             string   `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ReqSignup) Descriptor

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

func (*ReqSignup) GetPassword

func (m *ReqSignup) GetPassword() string

func (*ReqSignup) GetUsername

func (m *ReqSignup) GetUsername() string

func (*ReqSignup) ProtoMessage

func (*ReqSignup) ProtoMessage()

func (*ReqSignup) Reset

func (m *ReqSignup) Reset()

func (*ReqSignup) String

func (m *ReqSignup) String() string

func (*ReqSignup) XXX_DiscardUnknown

func (m *ReqSignup) XXX_DiscardUnknown()

func (*ReqSignup) XXX_Marshal

func (m *ReqSignup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ReqSignup) XXX_Merge

func (m *ReqSignup) XXX_Merge(src proto.Message)

func (*ReqSignup) XXX_Size

func (m *ReqSignup) XXX_Size() int

func (*ReqSignup) XXX_Unmarshal

func (m *ReqSignup) XXX_Unmarshal(b []byte) error

type ReqUserFile

type ReqUserFile struct {
	Username             string   `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Limit                int32    `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ReqUserFile) Descriptor

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

func (*ReqUserFile) GetLimit

func (m *ReqUserFile) GetLimit() int32

func (*ReqUserFile) GetUsername

func (m *ReqUserFile) GetUsername() string

func (*ReqUserFile) ProtoMessage

func (*ReqUserFile) ProtoMessage()

func (*ReqUserFile) Reset

func (m *ReqUserFile) Reset()

func (*ReqUserFile) String

func (m *ReqUserFile) String() string

func (*ReqUserFile) XXX_DiscardUnknown

func (m *ReqUserFile) XXX_DiscardUnknown()

func (*ReqUserFile) XXX_Marshal

func (m *ReqUserFile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ReqUserFile) XXX_Merge

func (m *ReqUserFile) XXX_Merge(src proto.Message)

func (*ReqUserFile) XXX_Size

func (m *ReqUserFile) XXX_Size() int

func (*ReqUserFile) XXX_Unmarshal

func (m *ReqUserFile) XXX_Unmarshal(b []byte) error

type ReqUserFileRename

type ReqUserFileRename struct {
	Username             string   `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Filehash             string   `protobuf:"bytes,2,opt,name=filehash,proto3" json:"filehash,omitempty"`
	NewFileName          string   `protobuf:"bytes,3,opt,name=newFileName,proto3" json:"newFileName,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ReqUserFileRename) Descriptor

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

func (*ReqUserFileRename) GetFilehash

func (m *ReqUserFileRename) GetFilehash() string

func (*ReqUserFileRename) GetNewFileName

func (m *ReqUserFileRename) GetNewFileName() string

func (*ReqUserFileRename) GetUsername

func (m *ReqUserFileRename) GetUsername() string

func (*ReqUserFileRename) ProtoMessage

func (*ReqUserFileRename) ProtoMessage()

func (*ReqUserFileRename) Reset

func (m *ReqUserFileRename) Reset()

func (*ReqUserFileRename) String

func (m *ReqUserFileRename) String() string

func (*ReqUserFileRename) XXX_DiscardUnknown

func (m *ReqUserFileRename) XXX_DiscardUnknown()

func (*ReqUserFileRename) XXX_Marshal

func (m *ReqUserFileRename) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ReqUserFileRename) XXX_Merge

func (m *ReqUserFileRename) XXX_Merge(src proto.Message)

func (*ReqUserFileRename) XXX_Size

func (m *ReqUserFileRename) XXX_Size() int

func (*ReqUserFileRename) XXX_Unmarshal

func (m *ReqUserFileRename) XXX_Unmarshal(b []byte) error

type ReqUserInfo

type ReqUserInfo 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 (*ReqUserInfo) Descriptor

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

func (*ReqUserInfo) GetUsername

func (m *ReqUserInfo) GetUsername() string

func (*ReqUserInfo) ProtoMessage

func (*ReqUserInfo) ProtoMessage()

func (*ReqUserInfo) Reset

func (m *ReqUserInfo) Reset()

func (*ReqUserInfo) String

func (m *ReqUserInfo) String() string

func (*ReqUserInfo) XXX_DiscardUnknown

func (m *ReqUserInfo) XXX_DiscardUnknown()

func (*ReqUserInfo) XXX_Marshal

func (m *ReqUserInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ReqUserInfo) XXX_Merge

func (m *ReqUserInfo) XXX_Merge(src proto.Message)

func (*ReqUserInfo) XXX_Size

func (m *ReqUserInfo) XXX_Size() int

func (*ReqUserInfo) XXX_Unmarshal

func (m *ReqUserInfo) XXX_Unmarshal(b []byte) error

type RespSignin

type RespSignin struct {
	Code                 int32    `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Token                string   `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
	Message              string   `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RespSignin) Descriptor

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

func (*RespSignin) GetCode

func (m *RespSignin) GetCode() int32

func (*RespSignin) GetMessage

func (m *RespSignin) GetMessage() string

func (*RespSignin) GetToken

func (m *RespSignin) GetToken() string

func (*RespSignin) ProtoMessage

func (*RespSignin) ProtoMessage()

func (*RespSignin) Reset

func (m *RespSignin) Reset()

func (*RespSignin) String

func (m *RespSignin) String() string

func (*RespSignin) XXX_DiscardUnknown

func (m *RespSignin) XXX_DiscardUnknown()

func (*RespSignin) XXX_Marshal

func (m *RespSignin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RespSignin) XXX_Merge

func (m *RespSignin) XXX_Merge(src proto.Message)

func (*RespSignin) XXX_Size

func (m *RespSignin) XXX_Size() int

func (*RespSignin) XXX_Unmarshal

func (m *RespSignin) XXX_Unmarshal(b []byte) error

type RespSignup

type RespSignup 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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RespSignup) Descriptor

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

func (*RespSignup) GetCode

func (m *RespSignup) GetCode() int32

func (*RespSignup) GetMessage

func (m *RespSignup) GetMessage() string

func (*RespSignup) ProtoMessage

func (*RespSignup) ProtoMessage()

func (*RespSignup) Reset

func (m *RespSignup) Reset()

func (*RespSignup) String

func (m *RespSignup) String() string

func (*RespSignup) XXX_DiscardUnknown

func (m *RespSignup) XXX_DiscardUnknown()

func (*RespSignup) XXX_Marshal

func (m *RespSignup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RespSignup) XXX_Merge

func (m *RespSignup) XXX_Merge(src proto.Message)

func (*RespSignup) XXX_Size

func (m *RespSignup) XXX_Size() int

func (*RespSignup) XXX_Unmarshal

func (m *RespSignup) XXX_Unmarshal(b []byte) error

type RespUserFile

type RespUserFile 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"`
	FileData             []byte   `protobuf:"bytes,3,opt,name=fileData,proto3" json:"fileData,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RespUserFile) Descriptor

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

func (*RespUserFile) GetCode

func (m *RespUserFile) GetCode() int32

func (*RespUserFile) GetFileData

func (m *RespUserFile) GetFileData() []byte

func (*RespUserFile) GetMessage

func (m *RespUserFile) GetMessage() string

func (*RespUserFile) ProtoMessage

func (*RespUserFile) ProtoMessage()

func (*RespUserFile) Reset

func (m *RespUserFile) Reset()

func (*RespUserFile) String

func (m *RespUserFile) String() string

func (*RespUserFile) XXX_DiscardUnknown

func (m *RespUserFile) XXX_DiscardUnknown()

func (*RespUserFile) XXX_Marshal

func (m *RespUserFile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RespUserFile) XXX_Merge

func (m *RespUserFile) XXX_Merge(src proto.Message)

func (*RespUserFile) XXX_Size

func (m *RespUserFile) XXX_Size() int

func (*RespUserFile) XXX_Unmarshal

func (m *RespUserFile) XXX_Unmarshal(b []byte) error

type RespUserFileRename

type RespUserFileRename 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"`
	FileData             []byte   `protobuf:"bytes,3,opt,name=fileData,proto3" json:"fileData,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RespUserFileRename) Descriptor

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

func (*RespUserFileRename) GetCode

func (m *RespUserFileRename) GetCode() int32

func (*RespUserFileRename) GetFileData

func (m *RespUserFileRename) GetFileData() []byte

func (*RespUserFileRename) GetMessage

func (m *RespUserFileRename) GetMessage() string

func (*RespUserFileRename) ProtoMessage

func (*RespUserFileRename) ProtoMessage()

func (*RespUserFileRename) Reset

func (m *RespUserFileRename) Reset()

func (*RespUserFileRename) String

func (m *RespUserFileRename) String() string

func (*RespUserFileRename) XXX_DiscardUnknown

func (m *RespUserFileRename) XXX_DiscardUnknown()

func (*RespUserFileRename) XXX_Marshal

func (m *RespUserFileRename) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RespUserFileRename) XXX_Merge

func (m *RespUserFileRename) XXX_Merge(src proto.Message)

func (*RespUserFileRename) XXX_Size

func (m *RespUserFileRename) XXX_Size() int

func (*RespUserFileRename) XXX_Unmarshal

func (m *RespUserFileRename) XXX_Unmarshal(b []byte) error

type RespUserInfo

type RespUserInfo 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"`
	Username             string   `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"`
	Email                string   `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"`
	Phone                string   `protobuf:"bytes,5,opt,name=phone,proto3" json:"phone,omitempty"`
	SignupAt             string   `protobuf:"bytes,6,opt,name=signupAt,proto3" json:"signupAt,omitempty"`
	LastActiveAt         string   `protobuf:"bytes,7,opt,name=lastActiveAt,proto3" json:"lastActiveAt,omitempty"`
	Status               int32    `protobuf:"varint,8,opt,name=status,proto3" json:"status,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RespUserInfo) Descriptor

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

func (*RespUserInfo) GetCode

func (m *RespUserInfo) GetCode() int32

func (*RespUserInfo) GetEmail

func (m *RespUserInfo) GetEmail() string

func (*RespUserInfo) GetLastActiveAt

func (m *RespUserInfo) GetLastActiveAt() string

func (*RespUserInfo) GetMessage

func (m *RespUserInfo) GetMessage() string

func (*RespUserInfo) GetPhone

func (m *RespUserInfo) GetPhone() string

func (*RespUserInfo) GetSignupAt

func (m *RespUserInfo) GetSignupAt() string

func (*RespUserInfo) GetStatus

func (m *RespUserInfo) GetStatus() int32

func (*RespUserInfo) GetUsername

func (m *RespUserInfo) GetUsername() string

func (*RespUserInfo) ProtoMessage

func (*RespUserInfo) ProtoMessage()

func (*RespUserInfo) Reset

func (m *RespUserInfo) Reset()

func (*RespUserInfo) String

func (m *RespUserInfo) String() string

func (*RespUserInfo) XXX_DiscardUnknown

func (m *RespUserInfo) XXX_DiscardUnknown()

func (*RespUserInfo) XXX_Marshal

func (m *RespUserInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RespUserInfo) XXX_Merge

func (m *RespUserInfo) XXX_Merge(src proto.Message)

func (*RespUserInfo) XXX_Size

func (m *RespUserInfo) XXX_Size() int

func (*RespUserInfo) XXX_Unmarshal

func (m *RespUserInfo) XXX_Unmarshal(b []byte) error

type UserService

type UserService interface {
	// 用户注册
	Signup(ctx context.Context, in *ReqSignup, opts ...client.CallOption) (*RespSignup, error)
	// 用户登录
	Signin(ctx context.Context, in *ReqSignin, opts ...client.CallOption) (*RespSignin, error)
	// 获取用户信息
	UserInfo(ctx context.Context, in *ReqUserInfo, opts ...client.CallOption) (*RespUserInfo, error)
	// 获取用户文件
	UserFiles(ctx context.Context, in *ReqUserFile, opts ...client.CallOption) (*RespUserFile, error)
	// 获取用户文件
	UserFileRename(ctx context.Context, in *ReqUserFileRename, opts ...client.CallOption) (*RespUserFileRename, error)
}

func NewUserService

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

type UserServiceHandler

type UserServiceHandler interface {
	// 用户注册
	Signup(context.Context, *ReqSignup, *RespSignup) error
	// 用户登录
	Signin(context.Context, *ReqSignin, *RespSignin) error
	// 获取用户信息
	UserInfo(context.Context, *ReqUserInfo, *RespUserInfo) error
	// 获取用户文件
	UserFiles(context.Context, *ReqUserFile, *RespUserFile) error
	// 获取用户文件
	UserFileRename(context.Context, *ReqUserFileRename, *RespUserFileRename) error
}

Jump to

Keyboard shortcuts

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