pb

package
v0.62.1 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_admin_v1_users_proto protoreflect.FileDescriptor
View Source
var Users_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "admin.v1.Users",
	HandlerType: (*UsersServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateUser",
			Handler:    _Users_CreateUser_Handler,
		},
		{
			MethodName: "ChangeUserPassword",
			Handler:    _Users_ChangeUserPassword_Handler,
		},
		{
			MethodName: "DeleteUser",
			Handler:    _Users_DeleteUser_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/admin/v1/users.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

func RegisterUsersServer(s grpc.ServiceRegistrar, srv UsersServer)

Types

type ChangeUserPasswordRequest

type ChangeUserPasswordRequest struct {

	// username is the name of the user to whom we want to change the password.
	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	// new_password is the new desired password.
	NewPassword string `protobuf:"bytes,2,opt,name=new_password,json=newPassword,proto3" json:"new_password,omitempty"`
	// contains filtered or unexported fields
}

ChangeUserPasswordRequest is the parameter message for ChangeUserPassword rpc.

func (*ChangeUserPasswordRequest) Descriptor deprecated

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

Deprecated: Use ChangeUserPasswordRequest.ProtoReflect.Descriptor instead.

func (*ChangeUserPasswordRequest) GetNewPassword

func (x *ChangeUserPasswordRequest) GetNewPassword() string

func (*ChangeUserPasswordRequest) GetUsername

func (x *ChangeUserPasswordRequest) GetUsername() string

func (*ChangeUserPasswordRequest) ProtoMessage

func (*ChangeUserPasswordRequest) ProtoMessage()

func (*ChangeUserPasswordRequest) ProtoReflect

func (*ChangeUserPasswordRequest) Reset

func (x *ChangeUserPasswordRequest) Reset()

func (*ChangeUserPasswordRequest) String

func (x *ChangeUserPasswordRequest) String() string

type ChangeUserPasswordResponse

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

ChangePasswordResponse is the response returned by ChangeUserPassword rpc.

func (*ChangeUserPasswordResponse) Descriptor deprecated

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

Deprecated: Use ChangeUserPasswordResponse.ProtoReflect.Descriptor instead.

func (*ChangeUserPasswordResponse) ProtoMessage

func (*ChangeUserPasswordResponse) ProtoMessage()

func (*ChangeUserPasswordResponse) ProtoReflect

func (*ChangeUserPasswordResponse) Reset

func (x *ChangeUserPasswordResponse) Reset()

func (*ChangeUserPasswordResponse) String

func (x *ChangeUserPasswordResponse) String() string

type CreateUserRequest

type CreateUserRequest struct {

	// username defines new created user name.
	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	// password is the user desired password.
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

CreateUserRequest is the parameter message for CreateUser rpc.

func (*CreateUserRequest) Descriptor deprecated

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

Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead.

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 CreateUserResponse

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

CreateUserResponse is the response returned by CreateUser rpc.

func (*CreateUserResponse) Descriptor deprecated

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

Deprecated: Use CreateUserResponse.ProtoReflect.Descriptor instead.

func (*CreateUserResponse) ProtoMessage

func (*CreateUserResponse) ProtoMessage()

func (*CreateUserResponse) ProtoReflect

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

func (*CreateUserResponse) Reset

func (x *CreateUserResponse) Reset()

func (*CreateUserResponse) String

func (x *CreateUserResponse) String() string

type DeleteUserRequest

type DeleteUserRequest struct {

	// username defines the username we want to delete.
	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	// contains filtered or unexported fields
}

DeleteUserRequest is the parameter message for DeleteUser rpc.

func (*DeleteUserRequest) Descriptor deprecated

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

Deprecated: Use DeleteUserRequest.ProtoReflect.Descriptor instead.

func (*DeleteUserRequest) GetUsername

func (x *DeleteUserRequest) GetUsername() string

func (*DeleteUserRequest) ProtoMessage

func (*DeleteUserRequest) ProtoMessage()

func (*DeleteUserRequest) ProtoReflect

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

func (*DeleteUserRequest) Reset

func (x *DeleteUserRequest) Reset()

func (*DeleteUserRequest) String

func (x *DeleteUserRequest) String() string

type DeleteUserResponse

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

DeleteUserResponse is the response returned by DeleteUser rpc.

func (*DeleteUserResponse) Descriptor deprecated

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

Deprecated: Use DeleteUserResponse.ProtoReflect.Descriptor instead.

func (*DeleteUserResponse) ProtoMessage

func (*DeleteUserResponse) ProtoMessage()

func (*DeleteUserResponse) ProtoReflect

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

func (*DeleteUserResponse) Reset

func (x *DeleteUserResponse) Reset()

func (*DeleteUserResponse) String

func (x *DeleteUserResponse) String() string

type UnimplementedUsersServer

type UnimplementedUsersServer struct {
}

UnimplementedUsersServer must be embedded to have forward compatible implementations.

func (UnimplementedUsersServer) CreateUser

func (UnimplementedUsersServer) DeleteUser

type UnsafeUsersServer added in v0.56.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 UsersClient

type UsersClient interface {
	// CreateUser creates a new user given a username and password.
	//
	// Return status codes (https://github.com/grpc/grpc/blob/master/doc/statuscodes.md):
	// - ALREADY_EXISTS(6):  When a users already exists.
	// - INTERNAL(13): When an internal problem happens.
	CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*CreateUserResponse, error)
	// ChangeUserPassword updates the password of an existing user.
	//
	// Return status codes (https://github.com/grpc/grpc/blob/master/doc/statuscodes.md):
	// - NOT_FOUND(5):  When user does not exist.
	// - INTERNAL(13): When an internal problem happens.
	ChangeUserPassword(ctx context.Context, in *ChangeUserPasswordRequest, opts ...grpc.CallOption) (*ChangeUserPasswordResponse, error)
	// DeleteUser removes a previously registered user.
	//
	// Return status codes (https://github.com/grpc/grpc/blob/master/doc/statuscodes.md):
	// - NOT_FOUND(5):  When user does not exist.
	// - INTERNAL(13): When an internal problem happens.
	DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*DeleteUserResponse, 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

func NewUsersClient(cc grpc.ClientConnInterface) UsersClient

type UsersServer

type UsersServer interface {
	// CreateUser creates a new user given a username and password.
	//
	// Return status codes (https://github.com/grpc/grpc/blob/master/doc/statuscodes.md):
	// - ALREADY_EXISTS(6):  When a users already exists.
	// - INTERNAL(13): When an internal problem happens.
	CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error)
	// ChangeUserPassword updates the password of an existing user.
	//
	// Return status codes (https://github.com/grpc/grpc/blob/master/doc/statuscodes.md):
	// - NOT_FOUND(5):  When user does not exist.
	// - INTERNAL(13): When an internal problem happens.
	ChangeUserPassword(context.Context, *ChangeUserPasswordRequest) (*ChangeUserPasswordResponse, error)
	// DeleteUser removes a previously registered user.
	//
	// Return status codes (https://github.com/grpc/grpc/blob/master/doc/statuscodes.md):
	// - NOT_FOUND(5):  When user does not exist.
	// - INTERNAL(13): When an internal problem happens.
	DeleteUser(context.Context, *DeleteUserRequest) (*DeleteUserResponse, 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