user

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	User_CreateUser_FullMethodName             = "/api.user.User/CreateUser"
	User_GetUserInfo_FullMethodName            = "/api.user.User/GetUserInfo"
	User_GetUserInfoByName_FullMethodName      = "/api.user.User/GetUserInfoByName"
	User_GetUserId_FullMethodName              = "/api.user.User/GetUserId"
	User_ValidateUserPassword_FullMethodName   = "/api.user.User/ValidateUserPassword"
	User_GetUserPasswordVersion_FullMethodName = "/api.user.User/GetUserPasswordVersion"
	User_SetUserPassword_FullMethodName        = "/api.user.User/SetUserPassword"
	User_SetUserRole_FullMethodName            = "/api.user.User/SetUserRole"
	User_SetUserStatus_FullMethodName          = "/api.user.User/SetUserStatus"
	User_SetUserName_FullMethodName            = "/api.user.User/SetUserName"
	User_ListUser_FullMethodName               = "/api.user.User/ListUser"
)
View Source
const OperationUserCreateUser = "/api.user.User/CreateUser"
View Source
const OperationUserGetUserId = "/api.user.User/GetUserId"
View Source
const OperationUserGetUserInfo = "/api.user.User/GetUserInfo"
View Source
const OperationUserGetUserInfoByName = "/api.user.User/GetUserInfoByName"
View Source
const OperationUserGetUserPasswordVersion = "/api.user.User/GetUserPasswordVersion"
View Source
const OperationUserListUser = "/api.user.User/ListUser"
View Source
const OperationUserSetUserName = "/api.user.User/SetUserName"
View Source
const OperationUserSetUserPassword = "/api.user.User/SetUserPassword"
View Source
const OperationUserSetUserRole = "/api.user.User/SetUserRole"
View Source
const OperationUserSetUserStatus = "/api.user.User/SetUserStatus"
View Source
const OperationUserValidateUserPassword = "/api.user.User/ValidateUserPassword"

Variables

View Source
var (
	Role_name = map[int32]string{
		0: "USER",
		1: "ADMIN",
	}
	Role_value = map[string]int32{
		"USER":  0,
		"ADMIN": 1,
	}
)

Enum value maps for Role.

View Source
var (
	Status_name = map[int32]string{
		0: "ACTIVE",
		1: "INACTIVE",
	}
	Status_value = map[string]int32{
		"ACTIVE":   0,
		"INACTIVE": 1,
	}
)

Enum value maps for Status.

View Source
var File_user_user_proto protoreflect.FileDescriptor
View Source
var User_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.user.User",
	HandlerType: (*UserServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateUser",
			Handler:    _User_CreateUser_Handler,
		},
		{
			MethodName: "GetUserInfo",
			Handler:    _User_GetUserInfo_Handler,
		},
		{
			MethodName: "GetUserInfoByName",
			Handler:    _User_GetUserInfoByName_Handler,
		},
		{
			MethodName: "GetUserId",
			Handler:    _User_GetUserId_Handler,
		},
		{
			MethodName: "ValidateUserPassword",
			Handler:    _User_ValidateUserPassword_Handler,
		},
		{
			MethodName: "GetUserPasswordVersion",
			Handler:    _User_GetUserPasswordVersion_Handler,
		},
		{
			MethodName: "SetUserPassword",
			Handler:    _User_SetUserPassword_Handler,
		},
		{
			MethodName: "SetUserRole",
			Handler:    _User_SetUserRole_Handler,
		},
		{
			MethodName: "SetUserStatus",
			Handler:    _User_SetUserStatus_Handler,
		},
		{
			MethodName: "SetUserName",
			Handler:    _User_SetUserName_Handler,
		},
		{
			MethodName: "ListUser",
			Handler:    _User_ListUser_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "user/user.proto",
}

User_ServiceDesc is the grpc.ServiceDesc for User service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterUserHTTPServer

func RegisterUserHTTPServer(s *http.Server, srv UserHTTPServer)

func RegisterUserServer

func RegisterUserServer(s grpc.ServiceRegistrar, srv UserServer)

Types

type CreateUserReq

type CreateUserReq 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"`
	Role     Role   `protobuf:"varint,3,opt,name=role,proto3,enum=api.user.Role" json:"role,omitempty"`
	Status   Status `protobuf:"varint,4,opt,name=status,proto3,enum=api.user.Status" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateUserReq) Descriptor deprecated

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

Deprecated: Use CreateUserReq.ProtoReflect.Descriptor instead.

func (*CreateUserReq) GetName

func (x *CreateUserReq) GetName() string

func (*CreateUserReq) GetPassword

func (x *CreateUserReq) GetPassword() string

func (*CreateUserReq) GetRole

func (x *CreateUserReq) GetRole() Role

func (*CreateUserReq) GetStatus

func (x *CreateUserReq) GetStatus() Status

func (*CreateUserReq) ProtoMessage

func (*CreateUserReq) ProtoMessage()

func (*CreateUserReq) ProtoReflect

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

func (*CreateUserReq) Reset

func (x *CreateUserReq) Reset()

func (*CreateUserReq) String

func (x *CreateUserReq) String() string

type Empty

type Empty struct {
	// contains filtered or unexported fields
}

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type GetUserIdReq

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

func (*GetUserIdReq) Descriptor deprecated

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

Deprecated: Use GetUserIdReq.ProtoReflect.Descriptor instead.

func (*GetUserIdReq) GetName

func (x *GetUserIdReq) GetName() string

func (*GetUserIdReq) ProtoMessage

func (*GetUserIdReq) ProtoMessage()

func (*GetUserIdReq) ProtoReflect

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

func (*GetUserIdReq) Reset

func (x *GetUserIdReq) Reset()

func (*GetUserIdReq) String

func (x *GetUserIdReq) String() string

type GetUserIdResp

type GetUserIdResp struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserIdResp) Descriptor deprecated

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

Deprecated: Use GetUserIdResp.ProtoReflect.Descriptor instead.

func (*GetUserIdResp) GetId

func (x *GetUserIdResp) GetId() string

func (*GetUserIdResp) ProtoMessage

func (*GetUserIdResp) ProtoMessage()

func (*GetUserIdResp) ProtoReflect

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

func (*GetUserIdResp) Reset

func (x *GetUserIdResp) Reset()

func (*GetUserIdResp) String

func (x *GetUserIdResp) String() string

type GetUserInfoByNameReq

type GetUserInfoByNameReq struct {
	Name   string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Fields []string `protobuf:"bytes,2,rep,name=fields,proto3" json:"fields,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserInfoByNameReq) Descriptor deprecated

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

Deprecated: Use GetUserInfoByNameReq.ProtoReflect.Descriptor instead.

func (*GetUserInfoByNameReq) GetFields

func (x *GetUserInfoByNameReq) GetFields() []string

func (*GetUserInfoByNameReq) GetName

func (x *GetUserInfoByNameReq) GetName() string

func (*GetUserInfoByNameReq) ProtoMessage

func (*GetUserInfoByNameReq) ProtoMessage()

func (*GetUserInfoByNameReq) ProtoReflect

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

func (*GetUserInfoByNameReq) Reset

func (x *GetUserInfoByNameReq) Reset()

func (*GetUserInfoByNameReq) String

func (x *GetUserInfoByNameReq) String() string

type GetUserInfoReq

type GetUserInfoReq struct {
	Id     string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Fields []string `protobuf:"bytes,2,rep,name=fields,proto3" json:"fields,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserInfoReq) Descriptor deprecated

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

Deprecated: Use GetUserInfoReq.ProtoReflect.Descriptor instead.

func (*GetUserInfoReq) GetFields

func (x *GetUserInfoReq) GetFields() []string

func (*GetUserInfoReq) GetId

func (x *GetUserInfoReq) GetId() string

func (*GetUserInfoReq) ProtoMessage

func (*GetUserInfoReq) ProtoMessage()

func (*GetUserInfoReq) ProtoReflect

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

func (*GetUserInfoReq) Reset

func (x *GetUserInfoReq) Reset()

func (*GetUserInfoReq) String

func (x *GetUserInfoReq) String() string

type GetUserPasswordVersionReq

type GetUserPasswordVersionReq struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserPasswordVersionReq) Descriptor deprecated

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

Deprecated: Use GetUserPasswordVersionReq.ProtoReflect.Descriptor instead.

func (*GetUserPasswordVersionReq) GetId

func (x *GetUserPasswordVersionReq) GetId() string

func (*GetUserPasswordVersionReq) ProtoMessage

func (*GetUserPasswordVersionReq) ProtoMessage()

func (*GetUserPasswordVersionReq) ProtoReflect

func (*GetUserPasswordVersionReq) Reset

func (x *GetUserPasswordVersionReq) Reset()

func (*GetUserPasswordVersionReq) String

func (x *GetUserPasswordVersionReq) String() string

type GetUserPasswordVersionResp

type GetUserPasswordVersionResp struct {
	Version uint32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserPasswordVersionResp) Descriptor deprecated

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

Deprecated: Use GetUserPasswordVersionResp.ProtoReflect.Descriptor instead.

func (*GetUserPasswordVersionResp) GetVersion

func (x *GetUserPasswordVersionResp) GetVersion() uint32

func (*GetUserPasswordVersionResp) ProtoMessage

func (*GetUserPasswordVersionResp) ProtoMessage()

func (*GetUserPasswordVersionResp) ProtoReflect

func (*GetUserPasswordVersionResp) Reset

func (x *GetUserPasswordVersionResp) Reset()

func (*GetUserPasswordVersionResp) String

func (x *GetUserPasswordVersionResp) String() string

type ListUserReq

type ListUserReq struct {
	Page   int32   `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"`
	Size   int32   `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
	Id     *string `protobuf:"bytes,3,opt,name=id,proto3,oneof" json:"id,omitempty"`
	Name   *string `protobuf:"bytes,4,opt,name=name,proto3,oneof" json:"name,omitempty"`
	Role   *Role   `protobuf:"varint,5,opt,name=role,proto3,enum=api.user.Role,oneof" json:"role,omitempty"`
	Status *Status `protobuf:"varint,6,opt,name=status,proto3,enum=api.user.Status,oneof" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*ListUserReq) Descriptor deprecated

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

Deprecated: Use ListUserReq.ProtoReflect.Descriptor instead.

func (*ListUserReq) GetId

func (x *ListUserReq) GetId() string

func (*ListUserReq) GetName

func (x *ListUserReq) GetName() string

func (*ListUserReq) GetPage

func (x *ListUserReq) GetPage() int32

func (*ListUserReq) GetRole

func (x *ListUserReq) GetRole() Role

func (*ListUserReq) GetSize

func (x *ListUserReq) GetSize() int32

func (*ListUserReq) GetStatus

func (x *ListUserReq) GetStatus() Status

func (*ListUserReq) ProtoMessage

func (*ListUserReq) ProtoMessage()

func (*ListUserReq) ProtoReflect

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

func (*ListUserReq) Reset

func (x *ListUserReq) Reset()

func (*ListUserReq) String

func (x *ListUserReq) String() string

type ListUserResp

type ListUserResp struct {
	Users []*UserInfo `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
	Total int32       `protobuf:"varint,4,opt,name=total,proto3" json:"total,omitempty"`
	// contains filtered or unexported fields
}

func (*ListUserResp) Descriptor deprecated

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

Deprecated: Use ListUserResp.ProtoReflect.Descriptor instead.

func (*ListUserResp) GetTotal

func (x *ListUserResp) GetTotal() int32

func (*ListUserResp) GetUsers

func (x *ListUserResp) GetUsers() []*UserInfo

func (*ListUserResp) ProtoMessage

func (*ListUserResp) ProtoMessage()

func (*ListUserResp) ProtoReflect

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

func (*ListUserResp) Reset

func (x *ListUserResp) Reset()

func (*ListUserResp) String

func (x *ListUserResp) String() string

type Role

type Role int32
const (
	Role_USER  Role = 0
	Role_ADMIN Role = 1
)

func (Role) Descriptor

func (Role) Descriptor() protoreflect.EnumDescriptor

func (Role) Enum

func (x Role) Enum() *Role

func (Role) EnumDescriptor deprecated

func (Role) EnumDescriptor() ([]byte, []int)

Deprecated: Use Role.Descriptor instead.

func (Role) IsAdmin

func (u Role) IsAdmin() bool

func (Role) MarshalBinary

func (u Role) MarshalBinary() ([]byte, error)

func (Role) Number

func (x Role) Number() protoreflect.EnumNumber

func (*Role) ScanRedis

func (u *Role) ScanRedis(s string) error

func (Role) String

func (x Role) String() string

func (Role) Type

func (Role) Type() protoreflect.EnumType

type SetUserNameReq

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

func (*SetUserNameReq) Descriptor deprecated

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

Deprecated: Use SetUserNameReq.ProtoReflect.Descriptor instead.

func (*SetUserNameReq) GetId

func (x *SetUserNameReq) GetId() string

func (*SetUserNameReq) GetName

func (x *SetUserNameReq) GetName() string

func (*SetUserNameReq) ProtoMessage

func (*SetUserNameReq) ProtoMessage()

func (*SetUserNameReq) ProtoReflect

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

func (*SetUserNameReq) Reset

func (x *SetUserNameReq) Reset()

func (*SetUserNameReq) String

func (x *SetUserNameReq) String() string

type SetUserNameResp

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

func (*SetUserNameResp) Descriptor deprecated

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

Deprecated: Use SetUserNameResp.ProtoReflect.Descriptor instead.

func (*SetUserNameResp) GetName

func (x *SetUserNameResp) GetName() string

func (*SetUserNameResp) ProtoMessage

func (*SetUserNameResp) ProtoMessage()

func (*SetUserNameResp) ProtoReflect

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

func (*SetUserNameResp) Reset

func (x *SetUserNameResp) Reset()

func (*SetUserNameResp) String

func (x *SetUserNameResp) String() string

type SetUserPasswordReq

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

func (*SetUserPasswordReq) Descriptor deprecated

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

Deprecated: Use SetUserPasswordReq.ProtoReflect.Descriptor instead.

func (*SetUserPasswordReq) GetId

func (x *SetUserPasswordReq) GetId() string

func (*SetUserPasswordReq) GetPassword

func (x *SetUserPasswordReq) GetPassword() string

func (*SetUserPasswordReq) ProtoMessage

func (*SetUserPasswordReq) ProtoMessage()

func (*SetUserPasswordReq) ProtoReflect

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

func (*SetUserPasswordReq) Reset

func (x *SetUserPasswordReq) Reset()

func (*SetUserPasswordReq) String

func (x *SetUserPasswordReq) String() string

type SetUserRoleReq

type SetUserRoleReq struct {
	Id   string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Role Role   `protobuf:"varint,2,opt,name=role,proto3,enum=api.user.Role" json:"role,omitempty"`
	// contains filtered or unexported fields
}

func (*SetUserRoleReq) Descriptor deprecated

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

Deprecated: Use SetUserRoleReq.ProtoReflect.Descriptor instead.

func (*SetUserRoleReq) GetId

func (x *SetUserRoleReq) GetId() string

func (*SetUserRoleReq) GetRole

func (x *SetUserRoleReq) GetRole() Role

func (*SetUserRoleReq) ProtoMessage

func (*SetUserRoleReq) ProtoMessage()

func (*SetUserRoleReq) ProtoReflect

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

func (*SetUserRoleReq) Reset

func (x *SetUserRoleReq) Reset()

func (*SetUserRoleReq) String

func (x *SetUserRoleReq) String() string

type SetUserStatusReq

type SetUserStatusReq struct {
	Id     string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Status Status `protobuf:"varint,2,opt,name=status,proto3,enum=api.user.Status" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*SetUserStatusReq) Descriptor deprecated

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

Deprecated: Use SetUserStatusReq.ProtoReflect.Descriptor instead.

func (*SetUserStatusReq) GetId

func (x *SetUserStatusReq) GetId() string

func (*SetUserStatusReq) GetStatus

func (x *SetUserStatusReq) GetStatus() Status

func (*SetUserStatusReq) ProtoMessage

func (*SetUserStatusReq) ProtoMessage()

func (*SetUserStatusReq) ProtoReflect

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

func (*SetUserStatusReq) Reset

func (x *SetUserStatusReq) Reset()

func (*SetUserStatusReq) String

func (x *SetUserStatusReq) String() string

type Status

type Status int32
const (
	Status_ACTIVE   Status = 0
	Status_INACTIVE Status = 1
)

func (Status) Descriptor

func (Status) Descriptor() protoreflect.EnumDescriptor

func (Status) Enum

func (x Status) Enum() *Status

func (Status) EnumDescriptor deprecated

func (Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use Status.Descriptor instead.

func (Status) IsActice

func (u Status) IsActice() bool

func (Status) IsInActive

func (u Status) IsInActive() bool

func (Status) MarshalBinary

func (u Status) MarshalBinary() ([]byte, error)

func (Status) Number

func (x Status) Number() protoreflect.EnumNumber

func (*Status) ScanRedis

func (u *Status) ScanRedis(s string) error

func (Status) String

func (x Status) String() string

func (Status) Type

func (Status) Type() protoreflect.EnumType

type UnimplementedUserServer

type UnimplementedUserServer struct {
}

UnimplementedUserServer must be embedded to have forward compatible implementations.

func (UnimplementedUserServer) CreateUser

func (UnimplementedUserServer) GetUserId

func (UnimplementedUserServer) GetUserInfo

func (UnimplementedUserServer) GetUserInfoByName

func (UnimplementedUserServer) ListUser

func (UnimplementedUserServer) SetUserName

func (UnimplementedUserServer) SetUserPassword

func (UnimplementedUserServer) SetUserRole

func (UnimplementedUserServer) SetUserStatus

func (UnimplementedUserServer) ValidateUserPassword

type UnsafeUserServer

type UnsafeUserServer interface {
	// contains filtered or unexported methods
}

UnsafeUserServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserServer will result in compilation errors.

type UserClient

type UserClient interface {
	CreateUser(ctx context.Context, in *CreateUserReq, opts ...grpc.CallOption) (*UserInfo, error)
	GetUserInfo(ctx context.Context, in *GetUserInfoReq, opts ...grpc.CallOption) (*UserInfo, error)
	GetUserInfoByName(ctx context.Context, in *GetUserInfoByNameReq, opts ...grpc.CallOption) (*UserInfo, error)
	GetUserId(ctx context.Context, in *GetUserIdReq, opts ...grpc.CallOption) (*GetUserIdResp, error)
	ValidateUserPassword(ctx context.Context, in *ValidateUserPasswordReq, opts ...grpc.CallOption) (*ValidateUserPasswordResp, error)
	GetUserPasswordVersion(ctx context.Context, in *GetUserPasswordVersionReq, opts ...grpc.CallOption) (*GetUserPasswordVersionResp, error)
	SetUserPassword(ctx context.Context, in *SetUserPasswordReq, opts ...grpc.CallOption) (*Empty, error)
	SetUserRole(ctx context.Context, in *SetUserRoleReq, opts ...grpc.CallOption) (*Empty, error)
	SetUserStatus(ctx context.Context, in *SetUserStatusReq, opts ...grpc.CallOption) (*Empty, error)
	SetUserName(ctx context.Context, in *SetUserNameReq, opts ...grpc.CallOption) (*SetUserNameResp, error)
	ListUser(ctx context.Context, in *ListUserReq, opts ...grpc.CallOption) (*ListUserResp, error)
}

UserClient is the client API for User service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewUserClient

func NewUserClient(cc grpc.ClientConnInterface) UserClient

type UserHTTPClient

type UserHTTPClient interface {
	CreateUser(ctx context.Context, req *CreateUserReq, opts ...http.CallOption) (rsp *UserInfo, err error)
	GetUserId(ctx context.Context, req *GetUserIdReq, opts ...http.CallOption) (rsp *GetUserIdResp, err error)
	GetUserInfo(ctx context.Context, req *GetUserInfoReq, opts ...http.CallOption) (rsp *UserInfo, err error)
	GetUserInfoByName(ctx context.Context, req *GetUserInfoByNameReq, opts ...http.CallOption) (rsp *UserInfo, err error)
	GetUserPasswordVersion(ctx context.Context, req *GetUserPasswordVersionReq, opts ...http.CallOption) (rsp *GetUserPasswordVersionResp, err error)
	ListUser(ctx context.Context, req *ListUserReq, opts ...http.CallOption) (rsp *ListUserResp, err error)
	SetUserName(ctx context.Context, req *SetUserNameReq, opts ...http.CallOption) (rsp *SetUserNameResp, err error)
	SetUserPassword(ctx context.Context, req *SetUserPasswordReq, opts ...http.CallOption) (rsp *Empty, err error)
	SetUserRole(ctx context.Context, req *SetUserRoleReq, opts ...http.CallOption) (rsp *Empty, err error)
	SetUserStatus(ctx context.Context, req *SetUserStatusReq, opts ...http.CallOption) (rsp *Empty, err error)
	ValidateUserPassword(ctx context.Context, req *ValidateUserPasswordReq, opts ...http.CallOption) (rsp *ValidateUserPasswordResp, err error)
}

func NewUserHTTPClient

func NewUserHTTPClient(client *http.Client) UserHTTPClient

type UserHTTPClientImpl

type UserHTTPClientImpl struct {
	// contains filtered or unexported fields
}

func (*UserHTTPClientImpl) CreateUser

func (c *UserHTTPClientImpl) CreateUser(ctx context.Context, in *CreateUserReq, opts ...http.CallOption) (*UserInfo, error)

func (*UserHTTPClientImpl) GetUserId

func (c *UserHTTPClientImpl) GetUserId(ctx context.Context, in *GetUserIdReq, opts ...http.CallOption) (*GetUserIdResp, error)

func (*UserHTTPClientImpl) GetUserInfo

func (c *UserHTTPClientImpl) GetUserInfo(ctx context.Context, in *GetUserInfoReq, opts ...http.CallOption) (*UserInfo, error)

func (*UserHTTPClientImpl) GetUserInfoByName

func (c *UserHTTPClientImpl) GetUserInfoByName(ctx context.Context, in *GetUserInfoByNameReq, opts ...http.CallOption) (*UserInfo, error)

func (*UserHTTPClientImpl) GetUserPasswordVersion

func (*UserHTTPClientImpl) ListUser

func (c *UserHTTPClientImpl) ListUser(ctx context.Context, in *ListUserReq, opts ...http.CallOption) (*ListUserResp, error)

func (*UserHTTPClientImpl) SetUserName

func (c *UserHTTPClientImpl) SetUserName(ctx context.Context, in *SetUserNameReq, opts ...http.CallOption) (*SetUserNameResp, error)

func (*UserHTTPClientImpl) SetUserPassword

func (c *UserHTTPClientImpl) SetUserPassword(ctx context.Context, in *SetUserPasswordReq, opts ...http.CallOption) (*Empty, error)

func (*UserHTTPClientImpl) SetUserRole

func (c *UserHTTPClientImpl) SetUserRole(ctx context.Context, in *SetUserRoleReq, opts ...http.CallOption) (*Empty, error)

func (*UserHTTPClientImpl) SetUserStatus

func (c *UserHTTPClientImpl) SetUserStatus(ctx context.Context, in *SetUserStatusReq, opts ...http.CallOption) (*Empty, error)

func (*UserHTTPClientImpl) ValidateUserPassword

type UserInfo

type UserInfo struct {
	Id        string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" redis:"id"`                                         // @gotags: redis:"id"
	CreatedAt int64  `protobuf:"varint,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty" redis:"created_at"` // @gotags: redis:"created_at"
	UpdatedAt int64  `protobuf:"varint,3,opt,name=updated_at,json=updatedAt,proto3" json:"-" redis:"-"`                             // @gotags: redis:"-" json:"-"`
	Name      string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty" redis:"name"`                                   // @gotags: redis:"name"
	Role      Role   `protobuf:"varint,5,opt,name=role,proto3,enum=api.user.Role" json:"role" redis:"role,omitempty"`               // @gotags: redis:"role,omitempty" json:"role"
	Status    Status `protobuf:"varint,6,opt,name=status,proto3,enum=api.user.Status" json:"status" redis:"status,omitempty"`       // @gotags: redis:"status,omitempty" json:"status"
	// contains filtered or unexported fields
}

func (*UserInfo) Descriptor deprecated

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

Deprecated: Use UserInfo.ProtoReflect.Descriptor instead.

func (*UserInfo) GetCreatedAt

func (x *UserInfo) GetCreatedAt() int64

func (*UserInfo) GetId

func (x *UserInfo) GetId() string

func (*UserInfo) GetName

func (x *UserInfo) GetName() string

func (*UserInfo) GetRole

func (x *UserInfo) GetRole() Role

func (*UserInfo) GetStatus

func (x *UserInfo) GetStatus() Status

func (*UserInfo) GetUpdatedAt

func (x *UserInfo) GetUpdatedAt() int64

func (*UserInfo) ProtoMessage

func (*UserInfo) ProtoMessage()

func (*UserInfo) ProtoReflect

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

func (*UserInfo) Reset

func (x *UserInfo) Reset()

func (*UserInfo) String

func (x *UserInfo) String() string

type UserServer

type UserServer interface {
	CreateUser(context.Context, *CreateUserReq) (*UserInfo, error)
	GetUserInfo(context.Context, *GetUserInfoReq) (*UserInfo, error)
	GetUserInfoByName(context.Context, *GetUserInfoByNameReq) (*UserInfo, error)
	GetUserId(context.Context, *GetUserIdReq) (*GetUserIdResp, error)
	ValidateUserPassword(context.Context, *ValidateUserPasswordReq) (*ValidateUserPasswordResp, error)
	GetUserPasswordVersion(context.Context, *GetUserPasswordVersionReq) (*GetUserPasswordVersionResp, error)
	SetUserPassword(context.Context, *SetUserPasswordReq) (*Empty, error)
	SetUserRole(context.Context, *SetUserRoleReq) (*Empty, error)
	SetUserStatus(context.Context, *SetUserStatusReq) (*Empty, error)
	SetUserName(context.Context, *SetUserNameReq) (*SetUserNameResp, error)
	ListUser(context.Context, *ListUserReq) (*ListUserResp, error)
	// contains filtered or unexported methods
}

UserServer is the server API for User service. All implementations must embed UnimplementedUserServer for forward compatibility

type ValidateUserPasswordReq

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

func (*ValidateUserPasswordReq) Descriptor deprecated

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

Deprecated: Use ValidateUserPasswordReq.ProtoReflect.Descriptor instead.

func (*ValidateUserPasswordReq) GetId

func (x *ValidateUserPasswordReq) GetId() string

func (*ValidateUserPasswordReq) GetPassword

func (x *ValidateUserPasswordReq) GetPassword() string

func (*ValidateUserPasswordReq) ProtoMessage

func (*ValidateUserPasswordReq) ProtoMessage()

func (*ValidateUserPasswordReq) ProtoReflect

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

func (*ValidateUserPasswordReq) Reset

func (x *ValidateUserPasswordReq) Reset()

func (*ValidateUserPasswordReq) String

func (x *ValidateUserPasswordReq) String() string

type ValidateUserPasswordResp

type ValidateUserPasswordResp struct {
	Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"`
	// contains filtered or unexported fields
}

func (*ValidateUserPasswordResp) Descriptor deprecated

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

Deprecated: Use ValidateUserPasswordResp.ProtoReflect.Descriptor instead.

func (*ValidateUserPasswordResp) GetValid

func (x *ValidateUserPasswordResp) GetValid() bool

func (*ValidateUserPasswordResp) ProtoMessage

func (*ValidateUserPasswordResp) ProtoMessage()

func (*ValidateUserPasswordResp) ProtoReflect

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

func (*ValidateUserPasswordResp) Reset

func (x *ValidateUserPasswordResp) Reset()

func (*ValidateUserPasswordResp) String

func (x *ValidateUserPasswordResp) String() string

Jump to

Keyboard shortcuts

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