protos

package
v0.0.0-...-730ae67 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_userModels_proto protoreflect.FileDescriptor
View Source
var File_userService_proto protoreflect.FileDescriptor

Functions

func NewUserServiceEndpoints

func NewUserServiceEndpoints() []*api.Endpoint

func RegisterUserServiceHandler

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

Types

type UserDetailResponse

type UserDetailResponse struct {
	UserDetail *UserModel `protobuf:"bytes,1,opt,name=UserDetail,proto3" json:"UserDetail,omitempty"`
	Code       uint32     `protobuf:"varint,2,opt,name=Code,proto3" json:"Code,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) 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,proto3" json:"ID,omitempty"`
	// @inject_tag: json:"user_name"
	UserName string `protobuf:"bytes,2,opt,name=UserName,proto3" json:"UserName,omitempty"`
	// @inject_tag: json:"created_at"
	CreatedAt int64 `protobuf:"varint,3,opt,name=CreatedAt,proto3" json:"CreatedAt,omitempty"`
	// @inject_tag: json:"updated_at"
	UpdatedAt int64 `protobuf:"varint,4,opt,name=UpdatedAt,proto3" json:"UpdatedAt,omitempty"`
	// @inject_tag: json:"deleted_at"
	DeletedAt int64 `protobuf:"varint,5,opt,name=DeletedAt,proto3" json:"DeletedAt,omitempty"`
	// contains filtered or unexported fields
}

func (*UserModel) Descriptor deprecated

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

Deprecated: Use UserModel.ProtoReflect.Descriptor instead.

func (*UserModel) GetCreatedAt

func (x *UserModel) GetCreatedAt() int64

func (*UserModel) GetDeletedAt

func (x *UserModel) GetDeletedAt() int64

func (*UserModel) GetID

func (x *UserModel) GetID() uint32

func (*UserModel) GetUpdatedAt

func (x *UserModel) GetUpdatedAt() 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 {

	// @inject_tag: json:"user_name" form:"user_name" uri:"user_name"
	UserName string `protobuf:"bytes,1,opt,name=UserName,proto3" json:"UserName,omitempty"`
	// @inject_tag: json:"password" form:"password" uri:"password"
	Password string `protobuf:"bytes,2,opt,name=Password,proto3" json:"Password,omitempty"`
	// @inject_tag: json:"password_confirm" form:"password_confirm" uri:"password_confirm"
	PasswordConfirm string `protobuf:"bytes,3,opt,name=PasswordConfirm,proto3" json:"PasswordConfirm,omitempty"`
	// contains filtered or unexported fields
}

func (*UserRequest) Descriptor deprecated

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

Deprecated: Use UserRequest.ProtoReflect.Descriptor instead.

func (*UserRequest) GetPassword

func (x *UserRequest) GetPassword() string

func (*UserRequest) GetPasswordConfirm

func (x *UserRequest) GetPasswordConfirm() string

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 {
	UserLogin(ctx context.Context, in *UserRequest, opts ...client.CallOption) (*UserDetailResponse, error)
	UserRegister(ctx context.Context, in *UserRequest, opts ...client.CallOption) (*UserDetailResponse, error)
}

func NewUserService

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

type UserServiceHandler

type UserServiceHandler interface {
	UserLogin(context.Context, *UserRequest, *UserDetailResponse) error
	UserRegister(context.Context, *UserRequest, *UserDetailResponse) error
}

Jump to

Keyboard shortcuts

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