pb

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2024 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Overview

Package pb is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package pb is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package pb is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	Auth_Login_FullMethodName  = "/ceph.Auth/Login"
	Auth_Logout_FullMethodName = "/ceph.Auth/Logout"
	Auth_Check_FullMethodName  = "/ceph.Auth/Check"
)
View Source
const (
	Cluster_GetStatus_FullMethodName    = "/ceph.Cluster/GetStatus"
	Cluster_UpdateStatus_FullMethodName = "/ceph.Cluster/UpdateStatus"
	Cluster_GetUsers_FullMethodName     = "/ceph.Cluster/GetUsers"
	Cluster_UpdateUser_FullMethodName   = "/ceph.Cluster/UpdateUser"
	Cluster_CreateUser_FullMethodName   = "/ceph.Cluster/CreateUser"
	Cluster_ExportUser_FullMethodName   = "/ceph.Cluster/ExportUser"
	Cluster_DeleteUser_FullMethodName   = "/ceph.Cluster/DeleteUser"
)
View Source
const (
	Users_ListUsers_FullMethodName          = "/ceph.Users/ListUsers"
	Users_GetUser_FullMethodName            = "/ceph.Users/GetUser"
	Users_CreateUser_FullMethodName         = "/ceph.Users/CreateUser"
	Users_DeleteUser_FullMethodName         = "/ceph.Users/DeleteUser"
	Users_UpdateUser_FullMethodName         = "/ceph.Users/UpdateUser"
	Users_UserChangePassword_FullMethodName = "/ceph.Users/UserChangePassword"
	Users_ListRoles_FullMethodName          = "/ceph.Users/ListRoles"
	Users_GetRole_FullMethodName            = "/ceph.Users/GetRole"
	Users_CreateRole_FullMethodName         = "/ceph.Users/CreateRole"
	Users_DeleteRole_FullMethodName         = "/ceph.Users/DeleteRole"
	Users_UpdateRole_FullMethodName         = "/ceph.Users/UpdateRole"
	Users_CloneRole_FullMethodName          = "/ceph.Users/CloneRole"
)

Variables

View Source
var (
	ClusterStatus_Status_name = map[int32]string{
		0: "INSTALLED",
		1: "POST_INSTALLED",
	}
	ClusterStatus_Status_value = map[string]int32{
		"INSTALLED":      0,
		"POST_INSTALLED": 1,
	}
)

Enum value maps for ClusterStatus_Status.

View Source
var Auth_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "ceph.Auth",
	HandlerType: (*AuthServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Login",
			Handler:    _Auth_Login_Handler,
		},
		{
			MethodName: "Logout",
			Handler:    _Auth_Logout_Handler,
		},
		{
			MethodName: "Check",
			Handler:    _Auth_Check_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "auth.proto",
}

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

View Source
var Cluster_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "ceph.Cluster",
	HandlerType: (*ClusterServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetStatus",
			Handler:    _Cluster_GetStatus_Handler,
		},
		{
			MethodName: "UpdateStatus",
			Handler:    _Cluster_UpdateStatus_Handler,
		},
		{
			MethodName: "GetUsers",
			Handler:    _Cluster_GetUsers_Handler,
		},
		{
			MethodName: "UpdateUser",
			Handler:    _Cluster_UpdateUser_Handler,
		},
		{
			MethodName: "CreateUser",
			Handler:    _Cluster_CreateUser_Handler,
		},
		{
			MethodName: "ExportUser",
			Handler:    _Cluster_ExportUser_Handler,
		},
		{
			MethodName: "DeleteUser",
			Handler:    _Cluster_DeleteUser_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "cluster.proto",
}

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

View Source
var File_cluster_proto protoreflect.FileDescriptor
View Source
var File_users_proto protoreflect.FileDescriptor
View Source
var Users_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "ceph.Users",
	HandlerType: (*UsersServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListUsers",
			Handler:    _Users_ListUsers_Handler,
		},
		{
			MethodName: "GetUser",
			Handler:    _Users_GetUser_Handler,
		},
		{
			MethodName: "CreateUser",
			Handler:    _Users_CreateUser_Handler,
		},
		{
			MethodName: "DeleteUser",
			Handler:    _Users_DeleteUser_Handler,
		},
		{
			MethodName: "UpdateUser",
			Handler:    _Users_UpdateUser_Handler,
		},
		{
			MethodName: "UserChangePassword",
			Handler:    _Users_UserChangePassword_Handler,
		},
		{
			MethodName: "ListRoles",
			Handler:    _Users_ListRoles_Handler,
		},
		{
			MethodName: "GetRole",
			Handler:    _Users_GetRole_Handler,
		},
		{
			MethodName: "CreateRole",
			Handler:    _Users_CreateRole_Handler,
		},
		{
			MethodName: "DeleteRole",
			Handler:    _Users_DeleteRole_Handler,
		},
		{
			MethodName: "UpdateRole",
			Handler:    _Users_UpdateRole_Handler,
		},
		{
			MethodName: "CloneRole",
			Handler:    _Users_CloneRole_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "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 RegisterAuthHandler

func RegisterAuthHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterAuthHandler registers the http handlers for service Auth to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterAuthHandlerClient

func RegisterAuthHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthClient) error

RegisterAuthHandlerClient registers the http handlers for service Auth to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AuthClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AuthClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AuthClient" to call the correct interceptors.

func RegisterAuthHandlerFromEndpoint

func RegisterAuthHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterAuthHandlerFromEndpoint is same as RegisterAuthHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterAuthHandlerServer

func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AuthServer) error

RegisterAuthHandlerServer registers the http handlers for service Auth to "mux". UnaryRPC :call AuthServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAuthHandlerFromEndpoint instead.

func RegisterAuthServer

func RegisterAuthServer(s grpc.ServiceRegistrar, srv AuthServer)

func RegisterClusterHandler

func RegisterClusterHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterClusterHandler registers the http handlers for service Cluster to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterClusterHandlerClient

func RegisterClusterHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ClusterClient) error

RegisterClusterHandlerClient registers the http handlers for service Cluster to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ClusterClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ClusterClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ClusterClient" to call the correct interceptors.

func RegisterClusterHandlerFromEndpoint

func RegisterClusterHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterClusterHandlerFromEndpoint is same as RegisterClusterHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterClusterHandlerServer

func RegisterClusterHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ClusterServer) error

RegisterClusterHandlerServer registers the http handlers for service Cluster to "mux". UnaryRPC :call ClusterServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterClusterHandlerFromEndpoint instead.

func RegisterClusterServer

func RegisterClusterServer(s grpc.ServiceRegistrar, srv ClusterServer)

func RegisterUsersHandler

func RegisterUsersHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterUsersHandler registers the http handlers for service Users to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterUsersHandlerClient

func RegisterUsersHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UsersClient) error

RegisterUsersHandlerClient registers the http handlers for service Users to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "UsersClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "UsersClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "UsersClient" to call the correct interceptors.

func RegisterUsersHandlerFromEndpoint

func RegisterUsersHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterUsersHandlerFromEndpoint is same as RegisterUsersHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterUsersHandlerServer

func RegisterUsersHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UsersServer) error

RegisterUsersHandlerServer registers the http handlers for service Users to "mux". UnaryRPC :call UsersServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterUsersHandlerFromEndpoint instead.

func RegisterUsersServer

func RegisterUsersServer(s grpc.ServiceRegistrar, srv UsersServer)

Types

type AuthClient

type AuthClient interface {
	Login(ctx context.Context, in *LoginReq, opts ...grpc.CallOption) (*LoginResp, error)
	Logout(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
	Check(ctx context.Context, in *TokenCheckReq, opts ...grpc.CallOption) (*TokenCheckResp, error)
}

AuthClient is the client API for Auth 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 NewAuthClient

func NewAuthClient(cc grpc.ClientConnInterface) AuthClient

type AuthServer

type AuthServer interface {
	Login(context.Context, *LoginReq) (*LoginResp, error)
	Logout(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	Check(context.Context, *TokenCheckReq) (*TokenCheckResp, error)
}

AuthServer is the server API for Auth service. All implementations should embed UnimplementedAuthServer for forward compatibility

type CloneRoleReq

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

func (*CloneRoleReq) Descriptor deprecated

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

Deprecated: Use CloneRoleReq.ProtoReflect.Descriptor instead.

func (*CloneRoleReq) GetName

func (x *CloneRoleReq) GetName() string

func (*CloneRoleReq) GetNewName

func (x *CloneRoleReq) GetNewName() string

func (*CloneRoleReq) ProtoMessage

func (*CloneRoleReq) ProtoMessage()

func (*CloneRoleReq) ProtoReflect

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

func (*CloneRoleReq) Reset

func (x *CloneRoleReq) Reset()

func (*CloneRoleReq) String

func (x *CloneRoleReq) String() string

type ClusterClient

type ClusterClient interface {
	// Get cluster status
	GetStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ClusterStatus, error)
	// Update cluster status
	UpdateStatus(ctx context.Context, in *ClusterStatus, opts ...grpc.CallOption) (*emptypb.Empty, error)
	GetUsers(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ClusterUsers, error)
	UpdateUser(ctx context.Context, in *UpdateClusterUserReq, opts ...grpc.CallOption) (*emptypb.Empty, error)
	CreateUser(ctx context.Context, in *CreateClusterUserReq, opts ...grpc.CallOption) (*emptypb.Empty, error)
	ExportUser(ctx context.Context, in *ExportClusterUserReq, opts ...grpc.CallOption) (*ExportClusterUserResp, error)
	DeleteUser(ctx context.Context, in *DeleteClusterUserReq, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

ClusterClient is the client API for Cluster 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 NewClusterClient

func NewClusterClient(cc grpc.ClientConnInterface) ClusterClient

type ClusterServer

type ClusterServer interface {
	// Get cluster status
	GetStatus(context.Context, *emptypb.Empty) (*ClusterStatus, error)
	// Update cluster status
	UpdateStatus(context.Context, *ClusterStatus) (*emptypb.Empty, error)
	GetUsers(context.Context, *emptypb.Empty) (*ClusterUsers, error)
	UpdateUser(context.Context, *UpdateClusterUserReq) (*emptypb.Empty, error)
	CreateUser(context.Context, *CreateClusterUserReq) (*emptypb.Empty, error)
	ExportUser(context.Context, *ExportClusterUserReq) (*ExportClusterUserResp, error)
	DeleteUser(context.Context, *DeleteClusterUserReq) (*emptypb.Empty, error)
}

ClusterServer is the server API for Cluster service. All implementations should embed UnimplementedClusterServer for forward compatibility

type ClusterStatus

type ClusterStatus struct {
	Status ClusterStatus_Status `protobuf:"varint,1,opt,name=status,proto3,enum=ceph.ClusterStatus_Status" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*ClusterStatus) Descriptor deprecated

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

Deprecated: Use ClusterStatus.ProtoReflect.Descriptor instead.

func (*ClusterStatus) GetStatus

func (x *ClusterStatus) GetStatus() ClusterStatus_Status

func (*ClusterStatus) ProtoMessage

func (*ClusterStatus) ProtoMessage()

func (*ClusterStatus) ProtoReflect

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

func (*ClusterStatus) Reset

func (x *ClusterStatus) Reset()

func (*ClusterStatus) String

func (x *ClusterStatus) String() string

type ClusterStatus_Status

type ClusterStatus_Status int32
const (
	ClusterStatus_INSTALLED      ClusterStatus_Status = 0
	ClusterStatus_POST_INSTALLED ClusterStatus_Status = 1
)

func (ClusterStatus_Status) Descriptor

func (ClusterStatus_Status) Enum

func (ClusterStatus_Status) EnumDescriptor deprecated

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

Deprecated: Use ClusterStatus_Status.Descriptor instead.

func (ClusterStatus_Status) Number

func (ClusterStatus_Status) String

func (x ClusterStatus_Status) String() string

func (ClusterStatus_Status) Type

type ClusterUser

type ClusterUser struct {

	// entity, e.g: "client.admin"
	Entity string `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"`
	// user capabilities, e.g: {"mon": "allow r","osd":"allow rw pool=liverpool"}
	Caps map[string]string `` /* 149-byte string literal not displayed */
	// keyring
	Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
	// contains filtered or unexported fields
}

func (*ClusterUser) Descriptor deprecated

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

Deprecated: Use ClusterUser.ProtoReflect.Descriptor instead.

func (*ClusterUser) GetCaps

func (x *ClusterUser) GetCaps() map[string]string

func (*ClusterUser) GetEntity

func (x *ClusterUser) GetEntity() string

func (*ClusterUser) GetKey

func (x *ClusterUser) GetKey() string

func (*ClusterUser) ProtoMessage

func (*ClusterUser) ProtoMessage()

func (*ClusterUser) ProtoReflect

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

func (*ClusterUser) Reset

func (x *ClusterUser) Reset()

func (*ClusterUser) String

func (x *ClusterUser) String() string

type ClusterUsers

type ClusterUsers struct {
	Users []*ClusterUser `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
	// contains filtered or unexported fields
}

func (*ClusterUsers) Descriptor deprecated

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

Deprecated: Use ClusterUsers.ProtoReflect.Descriptor instead.

func (*ClusterUsers) GetUsers

func (x *ClusterUsers) GetUsers() []*ClusterUser

func (*ClusterUsers) ProtoMessage

func (*ClusterUsers) ProtoMessage()

func (*ClusterUsers) ProtoReflect

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

func (*ClusterUsers) Reset

func (x *ClusterUsers) Reset()

func (*ClusterUsers) String

func (x *ClusterUsers) String() string

type CreateClusterUserReq

type CreateClusterUserReq struct {

	// user capabilities, e.g: {"mon": "allow r","osd":"allow rw pool=liverpool"}
	Capabilities map[string]string `` /* 165-byte string literal not displayed */
	// entity, e.g: "client.admin"
	UserEntity string `protobuf:"bytes,2,opt,name=user_entity,proto3" json:"user_entity,omitempty"`
	// keyring file format - if import_data is set then other fields ignored
	ImportData []byte `protobuf:"bytes,3,opt,name=import_data,proto3" json:"import_data,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateClusterUserReq) Descriptor deprecated

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

Deprecated: Use CreateClusterUserReq.ProtoReflect.Descriptor instead.

func (*CreateClusterUserReq) GetCapabilities

func (x *CreateClusterUserReq) GetCapabilities() map[string]string

func (*CreateClusterUserReq) GetImportData

func (x *CreateClusterUserReq) GetImportData() []byte

func (*CreateClusterUserReq) GetUserEntity

func (x *CreateClusterUserReq) GetUserEntity() string

func (*CreateClusterUserReq) ProtoMessage

func (*CreateClusterUserReq) ProtoMessage()

func (*CreateClusterUserReq) ProtoReflect

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

func (*CreateClusterUserReq) Reset

func (x *CreateClusterUserReq) Reset()

func (*CreateClusterUserReq) String

func (x *CreateClusterUserReq) String() string

type CreateUserReq

type CreateUserReq struct {
	Email             *string                `protobuf:"bytes,1,opt,name=email,proto3,oneof" json:"email,omitempty"`
	Enabled           bool                   `protobuf:"varint,2,opt,name=enabled,proto3" json:"enabled,omitempty"`
	Name              *string                `protobuf:"bytes,3,opt,name=name,proto3,oneof" json:"name,omitempty"`
	Password          string                 `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"`
	PwdExpirationDate *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=pwd_expiration_date,json=pwdExpirationDate,proto3,oneof" json:"pwd_expiration_date,omitempty"`
	PwdUpdateRequired bool                   `protobuf:"varint,6,opt,name=pwd_update_required,json=pwdUpdateRequired,proto3" json:"pwd_update_required,omitempty"`
	Roles             []string               `protobuf:"bytes,7,rep,name=roles,proto3" json:"roles,omitempty"`
	Username          string                 `protobuf:"bytes,8,opt,name=username,proto3" json:"username,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateUserReq) Descriptor deprecated

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

Deprecated: Use CreateUserReq.ProtoReflect.Descriptor instead.

func (*CreateUserReq) GetEmail

func (x *CreateUserReq) GetEmail() string

func (*CreateUserReq) GetEnabled

func (x *CreateUserReq) GetEnabled() bool

func (*CreateUserReq) GetName

func (x *CreateUserReq) GetName() string

func (*CreateUserReq) GetPassword

func (x *CreateUserReq) GetPassword() string

func (*CreateUserReq) GetPwdExpirationDate

func (x *CreateUserReq) GetPwdExpirationDate() *timestamppb.Timestamp

func (*CreateUserReq) GetPwdUpdateRequired

func (x *CreateUserReq) GetPwdUpdateRequired() bool

func (*CreateUserReq) GetRoles

func (x *CreateUserReq) GetRoles() []string

func (*CreateUserReq) GetUsername

func (x *CreateUserReq) GetUsername() string

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 DeleteClusterUserReq

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

func (*DeleteClusterUserReq) Descriptor deprecated

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

Deprecated: Use DeleteClusterUserReq.ProtoReflect.Descriptor instead.

func (*DeleteClusterUserReq) GetUserEntity

func (x *DeleteClusterUserReq) GetUserEntity() string

func (*DeleteClusterUserReq) ProtoMessage

func (*DeleteClusterUserReq) ProtoMessage()

func (*DeleteClusterUserReq) ProtoReflect

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

func (*DeleteClusterUserReq) Reset

func (x *DeleteClusterUserReq) Reset()

func (*DeleteClusterUserReq) String

func (x *DeleteClusterUserReq) String() string

type ExportClusterUserReq

type ExportClusterUserReq struct {
	Entities []string `protobuf:"bytes,1,rep,name=entities,proto3" json:"entities,omitempty"`
	// contains filtered or unexported fields
}

func (*ExportClusterUserReq) Descriptor deprecated

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

Deprecated: Use ExportClusterUserReq.ProtoReflect.Descriptor instead.

func (*ExportClusterUserReq) GetEntities

func (x *ExportClusterUserReq) GetEntities() []string

func (*ExportClusterUserReq) ProtoMessage

func (*ExportClusterUserReq) ProtoMessage()

func (*ExportClusterUserReq) ProtoReflect

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

func (*ExportClusterUserReq) Reset

func (x *ExportClusterUserReq) Reset()

func (*ExportClusterUserReq) String

func (x *ExportClusterUserReq) String() string

type ExportClusterUserResp

type ExportClusterUserResp struct {

	// User key and capabilities in Ceph config file format
	Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*ExportClusterUserResp) Descriptor deprecated

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

Deprecated: Use ExportClusterUserResp.ProtoReflect.Descriptor instead.

func (*ExportClusterUserResp) GetData

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

func (*ExportClusterUserResp) ProtoMessage

func (*ExportClusterUserResp) ProtoMessage()

func (*ExportClusterUserResp) ProtoReflect

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

func (*ExportClusterUserResp) Reset

func (x *ExportClusterUserResp) Reset()

func (*ExportClusterUserResp) String

func (x *ExportClusterUserResp) String() string

type GetRoleReq

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

func (*GetRoleReq) Descriptor deprecated

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

Deprecated: Use GetRoleReq.ProtoReflect.Descriptor instead.

func (*GetRoleReq) GetName

func (x *GetRoleReq) GetName() string

func (*GetRoleReq) ProtoMessage

func (*GetRoleReq) ProtoMessage()

func (*GetRoleReq) ProtoReflect

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

func (*GetRoleReq) Reset

func (x *GetRoleReq) Reset()

func (*GetRoleReq) String

func (x *GetRoleReq) String() string

type GetUserReq

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

func (*GetUserReq) Descriptor deprecated

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

Deprecated: Use GetUserReq.ProtoReflect.Descriptor instead.

func (*GetUserReq) GetUsername

func (x *GetUserReq) GetUsername() string

func (*GetUserReq) ProtoMessage

func (*GetUserReq) ProtoMessage()

func (*GetUserReq) ProtoReflect

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

func (*GetUserReq) Reset

func (x *GetUserReq) Reset()

func (*GetUserReq) String

func (x *GetUserReq) String() string

type LoginReq

type LoginReq 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 (*LoginReq) Descriptor deprecated

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

Deprecated: Use LoginReq.ProtoReflect.Descriptor instead.

func (*LoginReq) GetPassword

func (x *LoginReq) GetPassword() string

func (*LoginReq) GetUsername

func (x *LoginReq) GetUsername() string

func (*LoginReq) ProtoMessage

func (*LoginReq) ProtoMessage()

func (*LoginReq) ProtoReflect

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

func (*LoginReq) Reset

func (x *LoginReq) Reset()

func (*LoginReq) String

func (x *LoginReq) String() string

type LoginResp

type LoginResp struct {
	Token             string                         `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	Username          string                         `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	PwdUpdateRequired bool                           `protobuf:"varint,3,opt,name=pwd_update_required,json=pwdUpdateRequired,proto3" json:"pwd_update_required,omitempty"`
	PwdExpirationDate *timestamppb.Timestamp         `protobuf:"bytes,4,opt,name=pwd_expiration_date,json=pwdExpirationDate,proto3,oneof" json:"pwd_expiration_date,omitempty"`
	Sso               bool                           `protobuf:"varint,5,opt,name=sso,proto3" json:"sso,omitempty"`
	Permissions       map[string]*structpb.ListValue `` /* 163-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*LoginResp) Descriptor deprecated

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

Deprecated: Use LoginResp.ProtoReflect.Descriptor instead.

func (*LoginResp) GetPermissions

func (x *LoginResp) GetPermissions() map[string]*structpb.ListValue

func (*LoginResp) GetPwdExpirationDate

func (x *LoginResp) GetPwdExpirationDate() *timestamppb.Timestamp

func (*LoginResp) GetPwdUpdateRequired

func (x *LoginResp) GetPwdUpdateRequired() bool

func (*LoginResp) GetSso

func (x *LoginResp) GetSso() bool

func (*LoginResp) GetToken

func (x *LoginResp) GetToken() string

func (*LoginResp) GetUsername

func (x *LoginResp) GetUsername() string

func (*LoginResp) ProtoMessage

func (*LoginResp) ProtoMessage()

func (*LoginResp) ProtoReflect

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

func (*LoginResp) Reset

func (x *LoginResp) Reset()

func (*LoginResp) String

func (x *LoginResp) String() string

type Role

type Role struct {
	Name              string                         `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Description       *string                        `protobuf:"bytes,2,opt,name=description,proto3,oneof" json:"description,omitempty"`
	ScopesPermissions map[string]*structpb.ListValue `` /* 177-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Role) Descriptor deprecated

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

Deprecated: Use Role.ProtoReflect.Descriptor instead.

func (*Role) GetDescription

func (x *Role) GetDescription() string

func (*Role) GetName

func (x *Role) GetName() string

func (*Role) GetScopesPermissions

func (x *Role) GetScopesPermissions() map[string]*structpb.ListValue

func (*Role) ProtoMessage

func (*Role) ProtoMessage()

func (*Role) ProtoReflect

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

func (*Role) Reset

func (x *Role) Reset()

func (*Role) String

func (x *Role) String() string

type RolesResp

type RolesResp struct {
	Roles []*Role `protobuf:"bytes,1,rep,name=roles,proto3" json:"roles,omitempty"`
	// contains filtered or unexported fields
}

func (*RolesResp) Descriptor deprecated

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

Deprecated: Use RolesResp.ProtoReflect.Descriptor instead.

func (*RolesResp) GetRoles

func (x *RolesResp) GetRoles() []*Role

func (*RolesResp) ProtoMessage

func (*RolesResp) ProtoMessage()

func (*RolesResp) ProtoReflect

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

func (*RolesResp) Reset

func (x *RolesResp) Reset()

func (*RolesResp) String

func (x *RolesResp) String() string

type TokenCheckReq

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

func (*TokenCheckReq) Descriptor deprecated

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

Deprecated: Use TokenCheckReq.ProtoReflect.Descriptor instead.

func (*TokenCheckReq) GetToken

func (x *TokenCheckReq) GetToken() string

func (*TokenCheckReq) ProtoMessage

func (*TokenCheckReq) ProtoMessage()

func (*TokenCheckReq) ProtoReflect

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

func (*TokenCheckReq) Reset

func (x *TokenCheckReq) Reset()

func (*TokenCheckReq) String

func (x *TokenCheckReq) String() string

type TokenCheckResp

type TokenCheckResp struct {
	Username          string                         `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	PwdUpdateRequired bool                           `protobuf:"varint,2,opt,name=pwd_update_required,json=pwdUpdateRequired,proto3" json:"pwd_update_required,omitempty"`
	PwdExpirationDate *timestamppb.Timestamp         `protobuf:"bytes,3,opt,name=pwd_expiration_date,json=pwdExpirationDate,proto3,oneof" json:"pwd_expiration_date,omitempty"`
	Sso               bool                           `protobuf:"varint,4,opt,name=sso,proto3" json:"sso,omitempty"`
	Permissions       map[string]*structpb.ListValue `` /* 163-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*TokenCheckResp) Descriptor deprecated

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

Deprecated: Use TokenCheckResp.ProtoReflect.Descriptor instead.

func (*TokenCheckResp) GetPermissions

func (x *TokenCheckResp) GetPermissions() map[string]*structpb.ListValue

func (*TokenCheckResp) GetPwdExpirationDate

func (x *TokenCheckResp) GetPwdExpirationDate() *timestamppb.Timestamp

func (*TokenCheckResp) GetPwdUpdateRequired

func (x *TokenCheckResp) GetPwdUpdateRequired() bool

func (*TokenCheckResp) GetSso

func (x *TokenCheckResp) GetSso() bool

func (*TokenCheckResp) GetUsername

func (x *TokenCheckResp) GetUsername() string

func (*TokenCheckResp) ProtoMessage

func (*TokenCheckResp) ProtoMessage()

func (*TokenCheckResp) ProtoReflect

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

func (*TokenCheckResp) Reset

func (x *TokenCheckResp) Reset()

func (*TokenCheckResp) String

func (x *TokenCheckResp) String() string

type UnimplementedAuthServer

type UnimplementedAuthServer struct {
}

UnimplementedAuthServer should be embedded to have forward compatible implementations.

func (UnimplementedAuthServer) Check

func (UnimplementedAuthServer) Login

func (UnimplementedAuthServer) Logout

type UnimplementedClusterServer

type UnimplementedClusterServer struct {
}

UnimplementedClusterServer should be embedded to have forward compatible implementations.

func (UnimplementedClusterServer) CreateUser

func (UnimplementedClusterServer) DeleteUser

func (UnimplementedClusterServer) ExportUser

func (UnimplementedClusterServer) GetStatus

func (UnimplementedClusterServer) GetUsers

func (UnimplementedClusterServer) UpdateStatus

func (UnimplementedClusterServer) UpdateUser

type UnimplementedUsersServer

type UnimplementedUsersServer struct {
}

UnimplementedUsersServer should be embedded to have forward compatible implementations.

func (UnimplementedUsersServer) CloneRole

func (UnimplementedUsersServer) CreateRole

func (UnimplementedUsersServer) CreateUser

func (UnimplementedUsersServer) DeleteRole

func (UnimplementedUsersServer) DeleteUser

func (UnimplementedUsersServer) GetRole

func (UnimplementedUsersServer) GetUser

func (UnimplementedUsersServer) ListRoles

func (UnimplementedUsersServer) ListUsers

func (UnimplementedUsersServer) UpdateRole

func (UnimplementedUsersServer) UpdateUser

func (UnimplementedUsersServer) UserChangePassword

type UnsafeAuthServer

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

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

type UnsafeClusterServer

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

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

type UnsafeUsersServer

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 UpdateClusterUserReq

type UpdateClusterUserReq struct {

	// user capabilities, e.g: {"mon": "allow r","osd":"allow rw pool=liverpool"}
	Capabilities map[string]string `` /* 165-byte string literal not displayed */
	// entity, e.g: "client.admin"
	UserEntity string `protobuf:"bytes,2,opt,name=user_entity,proto3" json:"user_entity,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateClusterUserReq) Descriptor deprecated

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

Deprecated: Use UpdateClusterUserReq.ProtoReflect.Descriptor instead.

func (*UpdateClusterUserReq) GetCapabilities

func (x *UpdateClusterUserReq) GetCapabilities() map[string]string

func (*UpdateClusterUserReq) GetUserEntity

func (x *UpdateClusterUserReq) GetUserEntity() string

func (*UpdateClusterUserReq) ProtoMessage

func (*UpdateClusterUserReq) ProtoMessage()

func (*UpdateClusterUserReq) ProtoReflect

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

func (*UpdateClusterUserReq) Reset

func (x *UpdateClusterUserReq) Reset()

func (*UpdateClusterUserReq) String

func (x *UpdateClusterUserReq) String() string

type User

type User struct {
	Email             *string                `protobuf:"bytes,1,opt,name=email,proto3,oneof" json:"email,omitempty"`
	Enabled           bool                   `protobuf:"varint,2,opt,name=enabled,proto3" json:"enabled,omitempty"`
	Name              *string                `protobuf:"bytes,3,opt,name=name,proto3,oneof" json:"name,omitempty"`
	LastUpdate        *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=last_update,json=lastUpdate,proto3" json:"last_update,omitempty"`
	PwdExpirationDate *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=pwd_expiration_date,json=pwdExpirationDate,proto3,oneof" json:"pwd_expiration_date,omitempty"`
	PwdUpdateRequired bool                   `protobuf:"varint,6,opt,name=pwd_update_required,json=pwdUpdateRequired,proto3" json:"pwd_update_required,omitempty"`
	Roles             []string               `protobuf:"bytes,7,rep,name=roles,proto3" json:"roles,omitempty"`
	Username          string                 `protobuf:"bytes,8,opt,name=username,proto3" json:"username,omitempty"`
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetEmail

func (x *User) GetEmail() string

func (*User) GetEnabled

func (x *User) GetEnabled() bool

func (*User) GetLastUpdate

func (x *User) GetLastUpdate() *timestamppb.Timestamp

func (*User) GetName

func (x *User) GetName() string

func (*User) GetPwdExpirationDate

func (x *User) GetPwdExpirationDate() *timestamppb.Timestamp

func (*User) GetPwdUpdateRequired

func (x *User) GetPwdUpdateRequired() bool

func (*User) GetRoles

func (x *User) GetRoles() []string

func (*User) GetUsername

func (x *User) GetUsername() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

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

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

type UserChangePasswordReq

type UserChangePasswordReq struct {
	Username    string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	OldPassword string `protobuf:"bytes,2,opt,name=old_password,proto3" json:"old_password,omitempty"`
	NewPassword string `protobuf:"bytes,3,opt,name=new_password,proto3" json:"new_password,omitempty"`
	// contains filtered or unexported fields
}

func (*UserChangePasswordReq) Descriptor deprecated

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

Deprecated: Use UserChangePasswordReq.ProtoReflect.Descriptor instead.

func (*UserChangePasswordReq) GetNewPassword

func (x *UserChangePasswordReq) GetNewPassword() string

func (*UserChangePasswordReq) GetOldPassword

func (x *UserChangePasswordReq) GetOldPassword() string

func (*UserChangePasswordReq) GetUsername

func (x *UserChangePasswordReq) GetUsername() string

func (*UserChangePasswordReq) ProtoMessage

func (*UserChangePasswordReq) ProtoMessage()

func (*UserChangePasswordReq) ProtoReflect

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

func (*UserChangePasswordReq) Reset

func (x *UserChangePasswordReq) Reset()

func (*UserChangePasswordReq) String

func (x *UserChangePasswordReq) String() string

type UsersClient

type UsersClient interface {
	ListUsers(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*UsersResp, error)
	GetUser(ctx context.Context, in *GetUserReq, opts ...grpc.CallOption) (*User, error)
	CreateUser(ctx context.Context, in *CreateUserReq, opts ...grpc.CallOption) (*emptypb.Empty, error)
	DeleteUser(ctx context.Context, in *GetUserReq, opts ...grpc.CallOption) (*emptypb.Empty, error)
	UpdateUser(ctx context.Context, in *CreateUserReq, opts ...grpc.CallOption) (*emptypb.Empty, error)
	UserChangePassword(ctx context.Context, in *UserChangePasswordReq, opts ...grpc.CallOption) (*emptypb.Empty, error)
	ListRoles(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*RolesResp, error)
	GetRole(ctx context.Context, in *GetRoleReq, opts ...grpc.CallOption) (*Role, error)
	CreateRole(ctx context.Context, in *Role, opts ...grpc.CallOption) (*emptypb.Empty, error)
	DeleteRole(ctx context.Context, in *GetRoleReq, opts ...grpc.CallOption) (*emptypb.Empty, error)
	UpdateRole(ctx context.Context, in *Role, opts ...grpc.CallOption) (*emptypb.Empty, error)
	CloneRole(ctx context.Context, in *CloneRoleReq, 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

func NewUsersClient(cc grpc.ClientConnInterface) UsersClient

type UsersResp

type UsersResp struct {
	Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
	// contains filtered or unexported fields
}

func (*UsersResp) Descriptor deprecated

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

Deprecated: Use UsersResp.ProtoReflect.Descriptor instead.

func (*UsersResp) GetUsers

func (x *UsersResp) GetUsers() []*User

func (*UsersResp) ProtoMessage

func (*UsersResp) ProtoMessage()

func (*UsersResp) ProtoReflect

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

func (*UsersResp) Reset

func (x *UsersResp) Reset()

func (*UsersResp) String

func (x *UsersResp) String() string

type UsersServer

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

Jump to

Keyboard shortcuts

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