user

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Users_Create_FullMethodName         = "/iam.user.Users/Create"
	Users_Get_FullMethodName            = "/iam.user.Users/Get"
	Users_Update_FullMethodName         = "/iam.user.Users/Update"
	Users_Login_FullMethodName          = "/iam.user.Users/Login"
	Users_Search_FullMethodName         = "/iam.user.Users/Search"
	Users_ChangePassword_FullMethodName = "/iam.user.Users/ChangePassword"
)

Variables

View Source
var File_iam_v1_user_user_proto protoreflect.FileDescriptor
View Source
var Users_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "iam.user.Users",
	HandlerType: (*UsersServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Create",
			Handler:    _Users_Create_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _Users_Get_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _Users_Update_Handler,
		},
		{
			MethodName: "Login",
			Handler:    _Users_Login_Handler,
		},
		{
			MethodName: "Search",
			Handler:    _Users_Search_Handler,
		},
		{
			MethodName: "ChangePassword",
			Handler:    _Users_ChangePassword_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "iam/v1/user/user.proto",
}

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

Functions

func RegisterUsersServer added in v1.2.0

func RegisterUsersServer(s grpc.ServiceRegistrar, srv UsersServer)

Types

type CreateUserRequest

type CreateUserRequest struct {
	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Email    string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
	FullName string `protobuf:"bytes,3,opt,name=full_name,json=fullName,proto3" json:"full_name,omitempty"`
	Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"`
	Active   string `protobuf:"bytes,5,opt,name=active,proto3" json:"active,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateUserRequest) Descriptor deprecated

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

Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead.

func (*CreateUserRequest) GetActive

func (x *CreateUserRequest) GetActive() string

func (*CreateUserRequest) GetEmail

func (x *CreateUserRequest) GetEmail() string

func (*CreateUserRequest) GetFullName

func (x *CreateUserRequest) GetFullName() string

func (*CreateUserRequest) GetPassword

func (x *CreateUserRequest) GetPassword() string

func (*CreateUserRequest) GetUsername

func (x *CreateUserRequest) GetUsername() string

func (*CreateUserRequest) ProtoMessage

func (*CreateUserRequest) ProtoMessage()

func (*CreateUserRequest) ProtoReflect

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

func (*CreateUserRequest) Reset

func (x *CreateUserRequest) Reset()

func (*CreateUserRequest) String

func (x *CreateUserRequest) String() string

type LoginRequest

type LoginRequest 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"`
	// contains filtered or unexported fields
}

func (*LoginRequest) Descriptor deprecated

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

Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.

func (*LoginRequest) GetPassword

func (x *LoginRequest) GetPassword() string

func (*LoginRequest) GetUsername

func (x *LoginRequest) GetUsername() string

func (*LoginRequest) ProtoMessage

func (*LoginRequest) ProtoMessage()

func (*LoginRequest) ProtoReflect

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

func (*LoginRequest) Reset

func (x *LoginRequest) Reset()

func (*LoginRequest) String

func (x *LoginRequest) String() string

type LoginResponse

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

func (*LoginResponse) Descriptor deprecated

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

Deprecated: Use LoginResponse.ProtoReflect.Descriptor instead.

func (*LoginResponse) GetAccessToken

func (x *LoginResponse) GetAccessToken() string

func (*LoginResponse) ProtoMessage

func (*LoginResponse) ProtoMessage()

func (*LoginResponse) ProtoReflect

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

func (*LoginResponse) Reset

func (x *LoginResponse) Reset()

func (*LoginResponse) String

func (x *LoginResponse) String() string

type Metadata

type Metadata struct {
	Pagination *Pagination `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
	// contains filtered or unexported fields
}

func (*Metadata) Descriptor deprecated

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

Deprecated: Use Metadata.ProtoReflect.Descriptor instead.

func (*Metadata) GetPagination

func (x *Metadata) GetPagination() *Pagination

func (*Metadata) ProtoMessage

func (*Metadata) ProtoMessage()

func (*Metadata) ProtoReflect

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

func (*Metadata) Reset

func (x *Metadata) Reset()

func (*Metadata) String

func (x *Metadata) String() string

type Pagination

type Pagination struct {
	TotalPage  uint32 `protobuf:"varint,1,opt,name=total_page,json=totalPage,proto3" json:"total_page,omitempty"`
	TotalItems uint32 `protobuf:"varint,2,opt,name=total_items,json=totalItems,proto3" json:"total_items,omitempty"`
	// contains filtered or unexported fields
}

func (*Pagination) Descriptor deprecated

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

Deprecated: Use Pagination.ProtoReflect.Descriptor instead.

func (*Pagination) GetTotalItems

func (x *Pagination) GetTotalItems() uint32

func (*Pagination) GetTotalPage

func (x *Pagination) GetTotalPage() uint32

func (*Pagination) ProtoMessage

func (*Pagination) ProtoMessage()

func (*Pagination) ProtoReflect

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

func (*Pagination) Reset

func (x *Pagination) Reset()

func (*Pagination) String

func (x *Pagination) String() string

type Passwords

type Passwords struct {
	UserId      string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	OldPassword string `protobuf:"bytes,2,opt,name=old_password,json=oldPassword,proto3" json:"old_password,omitempty"`
	NewPassword string `protobuf:"bytes,3,opt,name=new_password,json=newPassword,proto3" json:"new_password,omitempty"`
	// contains filtered or unexported fields
}

func (*Passwords) Descriptor deprecated

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

Deprecated: Use Passwords.ProtoReflect.Descriptor instead.

func (*Passwords) GetNewPassword

func (x *Passwords) GetNewPassword() string

func (*Passwords) GetOldPassword

func (x *Passwords) GetOldPassword() string

func (*Passwords) GetUserId

func (x *Passwords) GetUserId() string

func (*Passwords) ProtoMessage

func (*Passwords) ProtoMessage()

func (*Passwords) ProtoReflect

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

func (*Passwords) Reset

func (x *Passwords) Reset()

func (*Passwords) String

func (x *Passwords) String() string

type SearchRequest

type SearchRequest struct {
	Query    string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
	Page     uint32 `protobuf:"varint,2,opt,name=page,proto3" json:"page,omitempty"`
	PageSize uint32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// contains filtered or unexported fields
}

func (*SearchRequest) Descriptor deprecated

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

Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead.

func (*SearchRequest) GetPage

func (x *SearchRequest) GetPage() uint32

func (*SearchRequest) GetPageSize

func (x *SearchRequest) GetPageSize() uint32

func (*SearchRequest) GetQuery

func (x *SearchRequest) GetQuery() string

func (*SearchRequest) ProtoMessage

func (*SearchRequest) ProtoMessage()

func (*SearchRequest) ProtoReflect

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

func (*SearchRequest) Reset

func (x *SearchRequest) Reset()

func (*SearchRequest) String

func (x *SearchRequest) String() string

type SearchResponse

type SearchResponse struct {
	Data     []*UserResponse `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"`
	Metadata *Metadata       `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

func (*SearchResponse) Descriptor deprecated

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

Deprecated: Use SearchResponse.ProtoReflect.Descriptor instead.

func (*SearchResponse) GetData

func (x *SearchResponse) GetData() []*UserResponse

func (*SearchResponse) GetMetadata

func (x *SearchResponse) GetMetadata() *Metadata

func (*SearchResponse) ProtoMessage

func (*SearchResponse) ProtoMessage()

func (*SearchResponse) ProtoReflect

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

func (*SearchResponse) Reset

func (x *SearchResponse) Reset()

func (*SearchResponse) String

func (x *SearchResponse) String() string

type UnimplementedUsersServer added in v1.2.0

type UnimplementedUsersServer struct{}

UnimplementedUsersServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedUsersServer) ChangePassword added in v1.2.0

func (UnimplementedUsersServer) Create added in v1.2.0

func (UnimplementedUsersServer) Get added in v1.2.0

func (UnimplementedUsersServer) Login added in v1.2.0

func (UnimplementedUsersServer) Search added in v1.2.0

func (UnimplementedUsersServer) Update added in v1.2.0

type UnsafeUsersServer added in v1.2.0

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

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

type UpdateUserRequest

type UpdateUserRequest struct {
	UserId   string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	Email    string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
	FullName string `protobuf:"bytes,4,opt,name=full_name,json=fullName,proto3" json:"full_name,omitempty"`
	Password string `protobuf:"bytes,5,opt,name=password,proto3" json:"password,omitempty"`
	Active   string `protobuf:"bytes,6,opt,name=active,proto3" json:"active,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateUserRequest) Descriptor deprecated

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

Deprecated: Use UpdateUserRequest.ProtoReflect.Descriptor instead.

func (*UpdateUserRequest) GetActive

func (x *UpdateUserRequest) GetActive() string

func (*UpdateUserRequest) GetEmail

func (x *UpdateUserRequest) GetEmail() string

func (*UpdateUserRequest) GetFullName

func (x *UpdateUserRequest) GetFullName() string

func (*UpdateUserRequest) GetPassword

func (x *UpdateUserRequest) GetPassword() string

func (*UpdateUserRequest) GetUserId

func (x *UpdateUserRequest) GetUserId() string

func (*UpdateUserRequest) GetUsername

func (x *UpdateUserRequest) GetUsername() string

func (*UpdateUserRequest) ProtoMessage

func (*UpdateUserRequest) ProtoMessage()

func (*UpdateUserRequest) ProtoReflect

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

func (*UpdateUserRequest) Reset

func (x *UpdateUserRequest) Reset()

func (*UpdateUserRequest) String

func (x *UpdateUserRequest) String() string

type UserBriefRequest

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

func (*UserBriefRequest) Descriptor deprecated

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

Deprecated: Use UserBriefRequest.ProtoReflect.Descriptor instead.

func (*UserBriefRequest) GetUserId

func (x *UserBriefRequest) GetUserId() string

func (*UserBriefRequest) ProtoMessage

func (*UserBriefRequest) ProtoMessage()

func (*UserBriefRequest) ProtoReflect

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

func (*UserBriefRequest) Reset

func (x *UserBriefRequest) Reset()

func (*UserBriefRequest) String

func (x *UserBriefRequest) String() string

type UserBriefResponse

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

func (*UserBriefResponse) Descriptor deprecated

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

Deprecated: Use UserBriefResponse.ProtoReflect.Descriptor instead.

func (*UserBriefResponse) GetUserId

func (x *UserBriefResponse) GetUserId() string

func (*UserBriefResponse) ProtoMessage

func (*UserBriefResponse) ProtoMessage()

func (*UserBriefResponse) ProtoReflect

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

func (*UserBriefResponse) Reset

func (x *UserBriefResponse) Reset()

func (*UserBriefResponse) String

func (x *UserBriefResponse) String() string

type UserResponse

type UserResponse struct {
	UserId    string                 `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	Username  string                 `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	FullName  string                 `protobuf:"bytes,3,opt,name=full_name,json=fullName,proto3" json:"full_name,omitempty"`
	Email     string                 `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"`
	Active    string                 `protobuf:"bytes,5,opt,name=active,proto3" json:"active,omitempty"`
	LastLogin *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=last_login,json=lastLogin,proto3" json:"last_login,omitempty"`
	Groups    []string               `protobuf:"bytes,7,rep,name=groups,proto3" json:"groups,omitempty"`
	// contains filtered or unexported fields
}

func (*UserResponse) Descriptor deprecated

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

Deprecated: Use UserResponse.ProtoReflect.Descriptor instead.

func (*UserResponse) GetActive

func (x *UserResponse) GetActive() string

func (*UserResponse) GetEmail

func (x *UserResponse) GetEmail() string

func (*UserResponse) GetFullName

func (x *UserResponse) GetFullName() string

func (*UserResponse) GetGroups added in v1.1.1

func (x *UserResponse) GetGroups() []string

func (*UserResponse) GetLastLogin

func (x *UserResponse) GetLastLogin() *timestamppb.Timestamp

func (*UserResponse) GetUserId

func (x *UserResponse) GetUserId() string

func (*UserResponse) GetUsername

func (x *UserResponse) GetUsername() string

func (*UserResponse) ProtoMessage

func (*UserResponse) ProtoMessage()

func (*UserResponse) ProtoReflect

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

func (*UserResponse) Reset

func (x *UserResponse) Reset()

func (*UserResponse) String

func (x *UserResponse) String() string

type UsersClient added in v1.2.0

type UsersClient interface {
	Create(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*UserBriefResponse, error)
	Get(ctx context.Context, in *UserBriefRequest, opts ...grpc.CallOption) (*UserResponse, error)
	Update(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error)
	Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error)
	ChangePassword(ctx context.Context, in *Passwords, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

UsersClient is the client API for Users 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 NewUsersClient added in v1.2.0

func NewUsersClient(cc grpc.ClientConnInterface) UsersClient

type UsersServer added in v1.2.0

type UsersServer interface {
	Create(context.Context, *CreateUserRequest) (*UserBriefResponse, error)
	Get(context.Context, *UserBriefRequest) (*UserResponse, error)
	Update(context.Context, *UpdateUserRequest) (*emptypb.Empty, error)
	Login(context.Context, *LoginRequest) (*LoginResponse, error)
	Search(context.Context, *SearchRequest) (*SearchResponse, error)
	ChangePassword(context.Context, *Passwords) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

UsersServer is the server API for Users service. All implementations must embed UnimplementedUsersServer for forward compatibility.

Jump to

Keyboard shortcuts

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