service

package
v0.0.0-...-877b449 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_filesService_proto protoreflect.FileDescriptor
View Source
var File_userModel_proto protoreflect.FileDescriptor
View Source
var File_userService_proto protoreflect.FileDescriptor

Functions

func NewFileServiceEndpoints

func NewFileServiceEndpoints() []*api.Endpoint

func NewUserServiceEndpoints

func NewUserServiceEndpoints() []*api.Endpoint

func RegisterFileServiceHandler

func RegisterFileServiceHandler(s server.Server, hdlr FileServiceHandler, opts ...server.HandlerOption) error

func RegisterUserServiceHandler

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

Types

type FileDetails

type FileDetails struct {
	ID           int32  `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	ParentDictId int32  `protobuf:"varint,2,opt,name=ParentDictId,proto3" json:"ParentDictId,omitempty"`
	FileName     string `protobuf:"bytes,3,opt,name=FileName,proto3" json:"FileName,omitempty"`
	EncryptedKey string `protobuf:"bytes,4,opt,name=EncryptedKey,proto3" json:"EncryptedKey,omitempty"`
	FileType     string `protobuf:"bytes,5,opt,name=FileType,proto3" json:"FileType,omitempty"`
	// contains filtered or unexported fields
}

func (*FileDetails) Descriptor deprecated

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

Deprecated: Use FileDetails.ProtoReflect.Descriptor instead.

func (*FileDetails) GetEncryptedKey

func (x *FileDetails) GetEncryptedKey() string

func (*FileDetails) GetFileName

func (x *FileDetails) GetFileName() string

func (*FileDetails) GetFileType

func (x *FileDetails) GetFileType() string

func (*FileDetails) GetID

func (x *FileDetails) GetID() int32

func (*FileDetails) GetParentDictId

func (x *FileDetails) GetParentDictId() int32

func (*FileDetails) ProtoMessage

func (*FileDetails) ProtoMessage()

func (*FileDetails) ProtoReflect

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

func (*FileDetails) Reset

func (x *FileDetails) Reset()

func (*FileDetails) String

func (x *FileDetails) String() string

type FileRequest

type FileRequest struct {
	ID           int32  `protobuf:"varint,1,opt,name=ID,json=id,proto3" json:"ID,omitempty"`
	UserID       int32  `protobuf:"varint,2,opt,name=UserID,json=user_id,proto3" json:"UserID,omitempty"`
	ParentDictId int32  `protobuf:"varint,3,opt,name=ParentDictId,json=parent_dict_id,proto3" json:"ParentDictId,omitempty"`
	PageNum      int32  `protobuf:"varint,4,opt,name=PageNum,json=page_num,proto3" json:"PageNum,omitempty"`
	PageSize     int32  `protobuf:"varint,5,opt,name=PageSize,json=page_size,proto3" json:"PageSize,omitempty"`
	EncryptedKey string `protobuf:"bytes,6,opt,name=EncryptedKey,json=encrypted_key,proto3" json:"EncryptedKey,omitempty"`
	//文件上传
	FileName string `protobuf:"bytes,7,opt,name=FileName,proto3" json:"FileName,omitempty"`
	Size     int32  `protobuf:"varint,8,opt,name=Size,proto3" json:"Size,omitempty"`
	Data     []byte `protobuf:"bytes,9,opt,name=Data,proto3" json:"Data,omitempty"`
	// contains filtered or unexported fields
}

func (*FileRequest) Descriptor deprecated

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

Deprecated: Use FileRequest.ProtoReflect.Descriptor instead.

func (*FileRequest) GetData

func (x *FileRequest) GetData() []byte

func (*FileRequest) GetEncryptedKey

func (x *FileRequest) GetEncryptedKey() string

func (*FileRequest) GetFileName

func (x *FileRequest) GetFileName() string

func (*FileRequest) GetID

func (x *FileRequest) GetID() int32

func (*FileRequest) GetPageNum

func (x *FileRequest) GetPageNum() int32

func (*FileRequest) GetPageSize

func (x *FileRequest) GetPageSize() int32

func (*FileRequest) GetParentDictId

func (x *FileRequest) GetParentDictId() int32

func (*FileRequest) GetSize

func (x *FileRequest) GetSize() int32

func (*FileRequest) GetUserID

func (x *FileRequest) GetUserID() int32

func (*FileRequest) ProtoMessage

func (*FileRequest) ProtoMessage()

func (*FileRequest) ProtoReflect

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

func (*FileRequest) Reset

func (x *FileRequest) Reset()

func (*FileRequest) String

func (x *FileRequest) String() string

type FileResponse

type FileResponse struct {
	ID         int32          `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	RootDictID int32          `protobuf:"varint,2,opt,name=RootDictID,proto3" json:"RootDictID,omitempty"`
	TotalFile  int32          `protobuf:"varint,3,opt,name=TotalFile,proto3" json:"TotalFile,omitempty"`
	ParentId   int32          `protobuf:"varint,4,opt,name=ParentId,proto3" json:"ParentId,omitempty"`
	Files      []*FileDetails `protobuf:"bytes,5,rep,name=files,proto3" json:"files,omitempty"`
	FileAddr   string         `protobuf:"bytes,6,opt,name=FileAddr,proto3" json:"FileAddr,omitempty"`
	// contains filtered or unexported fields
}

func (*FileResponse) Descriptor deprecated

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

Deprecated: Use FileResponse.ProtoReflect.Descriptor instead.

func (*FileResponse) GetFileAddr

func (x *FileResponse) GetFileAddr() string

func (*FileResponse) GetFiles

func (x *FileResponse) GetFiles() []*FileDetails

func (*FileResponse) GetID

func (x *FileResponse) GetID() int32

func (*FileResponse) GetParentId

func (x *FileResponse) GetParentId() int32

func (*FileResponse) GetRootDictID

func (x *FileResponse) GetRootDictID() int32

func (*FileResponse) GetTotalFile

func (x *FileResponse) GetTotalFile() int32

func (*FileResponse) ProtoMessage

func (*FileResponse) ProtoMessage()

func (*FileResponse) ProtoReflect

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

func (*FileResponse) Reset

func (x *FileResponse) Reset()

func (*FileResponse) String

func (x *FileResponse) String() string

type FileService

type FileService interface {
	CreateNewFileRoot(ctx context.Context, in *FileRequest, opts ...client.CallOption) (*FileResponse, error)
	GetFilesByParentDictId(ctx context.Context, in *FileRequest, opts ...client.CallOption) (*FileResponse, error)
	AddFile(ctx context.Context, in *FileRequest, opts ...client.CallOption) (*FileResponse, error)
	AddDict(ctx context.Context, in *FileRequest, opts ...client.CallOption) (*FileResponse, error)
	DeleteFile(ctx context.Context, in *FileRequest, opts ...client.CallOption) (*FileResponse, error)
	GetFile(ctx context.Context, in *FileRequest, opts ...client.CallOption) (*FileResponse, error)
}

func NewFileService

func NewFileService(name string, c client.Client) FileService

type FileServiceHandler

type FileServiceHandler interface {
	CreateNewFileRoot(context.Context, *FileRequest, *FileResponse) error
	GetFilesByParentDictId(context.Context, *FileRequest, *FileResponse) error
	AddFile(context.Context, *FileRequest, *FileResponse) error
	AddDict(context.Context, *FileRequest, *FileResponse) error
	DeleteFile(context.Context, *FileRequest, *FileResponse) error
	GetFile(context.Context, *FileRequest, *FileResponse) error
}

type UserDetailResponse

type UserDetailResponse struct {
	UserDetail   *UserModel    `protobuf:"bytes,1,opt,name=UserDetail,proto3" json:"UserDetail,omitempty"`
	FileResponse *FileResponse `protobuf:"bytes,2,opt,name=FileResponse,proto3" json:"FileResponse,omitempty"`
	Token        string        `protobuf:"bytes,3,opt,name=Token,proto3" json:"Token,omitempty"`
	Code         uint32        `protobuf:"varint,4,opt,name=Code,proto3" json:"Code,omitempty"`
	Msg          string        `protobuf:"bytes,5,opt,name=Msg,proto3" json:"Msg,omitempty"`
	// contains filtered or unexported fields
}

func (*UserDetailResponse) Descriptor deprecated

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

Deprecated: Use UserDetailResponse.ProtoReflect.Descriptor instead.

func (*UserDetailResponse) GetCode

func (x *UserDetailResponse) GetCode() uint32

func (*UserDetailResponse) GetFileResponse

func (x *UserDetailResponse) GetFileResponse() *FileResponse

func (*UserDetailResponse) GetMsg

func (x *UserDetailResponse) GetMsg() string

func (*UserDetailResponse) GetToken

func (x *UserDetailResponse) GetToken() string

func (*UserDetailResponse) GetUserDetail

func (x *UserDetailResponse) GetUserDetail() *UserModel

func (*UserDetailResponse) ProtoMessage

func (*UserDetailResponse) ProtoMessage()

func (*UserDetailResponse) ProtoReflect

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

func (*UserDetailResponse) Reset

func (x *UserDetailResponse) Reset()

func (*UserDetailResponse) String

func (x *UserDetailResponse) String() string

type UserModel

type UserModel struct {

	// @inject_tag: json:"id"
	ID uint32 `protobuf:"varint,1,opt,name=ID,json=id,proto3" json:"ID,omitempty"`
	// @inject_tag: json:"username"
	Username string `protobuf:"bytes,2,opt,name=Username,json=username,proto3" json:"Username,omitempty"`
	// @inject_tag: json:"email"
	Email string `protobuf:"bytes,3,opt,name=Email,json=email,proto3" json:"Email,omitempty"`
	// @inject_tag: json:"client_random_value"
	ClientRandomValue string `protobuf:"bytes,4,opt,name=ClientRandomValue,json=client_random_value,proto3" json:"ClientRandomValue,omitempty"`
	// @inject_tag: json:"encrypted_master_key"
	EncryptedMasterKey string `protobuf:"bytes,5,opt,name=EncryptedMasterKey,json=encrypted_master_key,proto3" json:"EncryptedMasterKey,omitempty"`
	// @inject_tag: json:"hashed_authentication_key"
	HashedAuthenticationKey string `` /* 130-byte string literal not displayed */
	// @inject_tag: json:"regdate"
	Regdate string `protobuf:"bytes,7,opt,name=Regdate,json=reg_date,proto3" json:"Regdate,omitempty"`
	// @inject_tag: json:"logins"
	Logins int64 `protobuf:"varint,8,opt,name=Logins,proto3" json:"Logins,omitempty"`
	// @inject_tag: json:"root_dict_id"
	RootDictId int64 `protobuf:"varint,9,opt,name=RootDictId,json=root_dict_id,proto3" json:"RootDictId,omitempty"`
	// contains filtered or unexported fields
}

func (*UserModel) Descriptor deprecated

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

Deprecated: Use UserModel.ProtoReflect.Descriptor instead.

func (*UserModel) GetClientRandomValue

func (x *UserModel) GetClientRandomValue() string

func (*UserModel) GetEmail

func (x *UserModel) GetEmail() string

func (*UserModel) GetEncryptedMasterKey

func (x *UserModel) GetEncryptedMasterKey() string

func (*UserModel) GetHashedAuthenticationKey

func (x *UserModel) GetHashedAuthenticationKey() string

func (*UserModel) GetID

func (x *UserModel) GetID() uint32

func (*UserModel) GetLogins

func (x *UserModel) GetLogins() int64

func (*UserModel) GetRegdate

func (x *UserModel) GetRegdate() string

func (*UserModel) GetRootDictId

func (x *UserModel) GetRootDictId() int64

func (*UserModel) GetUsername

func (x *UserModel) GetUsername() string

func (*UserModel) ProtoMessage

func (*UserModel) ProtoMessage()

func (*UserModel) ProtoReflect

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

func (*UserModel) Reset

func (x *UserModel) Reset()

func (*UserModel) String

func (x *UserModel) String() string

type UserRequest

type UserRequest struct {
	ID int32 `protobuf:"varint,1,opt,name=ID,json=id,proto3" json:"ID,omitempty"`
	// @inject_tag: json:"username" form:"username" uri:"username"
	UserName string `protobuf:"bytes,2,opt,name=UserName,json=username,proto3" json:"UserName,omitempty"`
	// @inject_tag: json:"email" form:"email" uri:"email"
	Email string `protobuf:"bytes,3,opt,name=Email,json=email,proto3" json:"Email,omitempty"`
	// @inject_tag: json:"password" form:"password" uri:"password"
	ClientRandomValue string `protobuf:"bytes,4,opt,name=ClientRandomValue,json=client_random_value,proto3" json:"ClientRandomValue,omitempty"`
	// @inject_tag: json:"password" form:"password" uri:"password"
	EncryptedMasterKey string `protobuf:"bytes,5,opt,name=EncryptedMasterKey,json=encrypted_master_key,proto3" json:"EncryptedMasterKey,omitempty"`
	// @inject_tag: json:"password" form:"password" uri:"password"
	HashedAuthenticationKey string `` /* 130-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*UserRequest) Descriptor deprecated

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

Deprecated: Use UserRequest.ProtoReflect.Descriptor instead.

func (*UserRequest) GetClientRandomValue

func (x *UserRequest) GetClientRandomValue() string

func (*UserRequest) GetEmail

func (x *UserRequest) GetEmail() string

func (*UserRequest) GetEncryptedMasterKey

func (x *UserRequest) GetEncryptedMasterKey() string

func (*UserRequest) GetHashedAuthenticationKey

func (x *UserRequest) GetHashedAuthenticationKey() string

func (*UserRequest) GetID

func (x *UserRequest) GetID() int32

func (*UserRequest) GetUserName

func (x *UserRequest) GetUserName() string

func (*UserRequest) ProtoMessage

func (*UserRequest) ProtoMessage()

func (*UserRequest) ProtoReflect

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

func (*UserRequest) Reset

func (x *UserRequest) Reset()

func (*UserRequest) String

func (x *UserRequest) String() string

type UserService

type UserService interface {
	UserRegister(ctx context.Context, in *UserRequest, opts ...client.CallOption) (*UserDetailResponse, error)
	UserLogin(ctx context.Context, in *UserRequest, opts ...client.CallOption) (*UserDetailResponse, error)
	UserLogout(ctx context.Context, in *UserRequest, opts ...client.CallOption) (*UserDetailResponse, error)
	GetUserByName(ctx context.Context, in *UserRequest, opts ...client.CallOption) (*UserDetailResponse, error)
	GetUserByEmail(ctx context.Context, in *UserRequest, opts ...client.CallOption) (*UserDetailResponse, error)
	UpdateUser(ctx context.Context, in *UserRequest, opts ...client.CallOption) (*UserDetailResponse, error)
	DeleteUser(ctx context.Context, in *UserRequest, opts ...client.CallOption) (*UserDetailResponse, 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