Versions in this module Expand all Collapse all v0 v0.5.2 Jul 27, 2023 v0.5.1 Jul 27, 2023 Changes in this version + const Bcrypt + const MD5 + const Name + const Plain + const SHA256 + var DefaultConfig = Config + var File_account_proto protoreflect.FileDescriptor + var ValidateHashType = []string + func New(config config.Config) (server.Plugin, error) + func RegisterAccountServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error + func RegisterAccountServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AccountServiceClient) error + func RegisterAccountServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error) + func RegisterAccountServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AccountServiceServer) error + func RegisterAccountServiceServer(s grpc.ServiceRegistrar, srv AccountServiceServer) + type Account struct + Password string + Username string + func (*Account) Descriptor() ([]byte, []int) + func (*Account) ProtoMessage() + func (x *Account) GetPassword() string + func (x *Account) GetUsername() string + func (x *Account) ProtoReflect() protoreflect.Message + func (x *Account) Reset() + func (x *Account) String() string + type AccountServiceClient interface + Delete func(ctx context.Context, in *DeleteAccountRequest, opts ...grpc.CallOption) (*empty.Empty, error) + Get func(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponse, error) + List func(ctx context.Context, in *ListAccountsRequest, opts ...grpc.CallOption) (*ListAccountsResponse, error) + Update func(ctx context.Context, in *UpdateAccountRequest, opts ...grpc.CallOption) (*empty.Empty, error) + func NewAccountServiceClient(cc grpc.ClientConnInterface) AccountServiceClient + type AccountServiceServer interface + Delete func(context.Context, *DeleteAccountRequest) (*empty.Empty, error) + Get func(context.Context, *GetAccountRequest) (*GetAccountResponse, error) + List func(context.Context, *ListAccountsRequest) (*ListAccountsResponse, error) + Update func(context.Context, *UpdateAccountRequest) (*empty.Empty, error) + type Auth struct + func (a *Auth) Delete(ctx context.Context, req *DeleteAccountRequest) (resp *empty.Empty, err error) + func (a *Auth) Get(ctx context.Context, req *GetAccountRequest) (resp *GetAccountResponse, err error) + func (a *Auth) HookWrapper() server.HookWrapper + func (a *Auth) List(ctx context.Context, req *ListAccountsRequest) (resp *ListAccountsResponse, err error) + func (a *Auth) Load(service server.Server) error + func (a *Auth) Name() string + func (a *Auth) OnBasicAuthWrapper(pre server.OnBasicAuth) server.OnBasicAuth + func (a *Auth) Unload() error + func (a *Auth) Update(ctx context.Context, req *UpdateAccountRequest) (resp *empty.Empty, err error) + type Config struct + Hash string + PasswordFile string + func (c *Config) UnmarshalYAML(unmarshal func(interface{}) error) error + func (c *Config) Validate() error + type DeleteAccountRequest struct + Username string + func (*DeleteAccountRequest) Descriptor() ([]byte, []int) + func (*DeleteAccountRequest) ProtoMessage() + func (x *DeleteAccountRequest) GetUsername() string + func (x *DeleteAccountRequest) ProtoReflect() protoreflect.Message + func (x *DeleteAccountRequest) Reset() + func (x *DeleteAccountRequest) String() string + type GetAccountRequest struct + Username string + func (*GetAccountRequest) Descriptor() ([]byte, []int) + func (*GetAccountRequest) ProtoMessage() + func (x *GetAccountRequest) GetUsername() string + func (x *GetAccountRequest) ProtoReflect() protoreflect.Message + func (x *GetAccountRequest) Reset() + func (x *GetAccountRequest) String() string + type GetAccountResponse struct + Account *Account + func (*GetAccountResponse) Descriptor() ([]byte, []int) + func (*GetAccountResponse) ProtoMessage() + func (x *GetAccountResponse) GetAccount() *Account + func (x *GetAccountResponse) ProtoReflect() protoreflect.Message + func (x *GetAccountResponse) Reset() + func (x *GetAccountResponse) String() string + type ListAccountsRequest struct + Page uint32 + PageSize uint32 + func (*ListAccountsRequest) Descriptor() ([]byte, []int) + func (*ListAccountsRequest) ProtoMessage() + func (x *ListAccountsRequest) GetPage() uint32 + func (x *ListAccountsRequest) GetPageSize() uint32 + func (x *ListAccountsRequest) ProtoReflect() protoreflect.Message + func (x *ListAccountsRequest) Reset() + func (x *ListAccountsRequest) String() string + type ListAccountsResponse struct + Accounts []*Account + TotalCount uint32 + func (*ListAccountsResponse) Descriptor() ([]byte, []int) + func (*ListAccountsResponse) ProtoMessage() + func (x *ListAccountsResponse) GetAccounts() []*Account + func (x *ListAccountsResponse) GetTotalCount() uint32 + func (x *ListAccountsResponse) ProtoReflect() protoreflect.Message + func (x *ListAccountsResponse) Reset() + func (x *ListAccountsResponse) String() string + type MockAccountServiceClient struct + func NewMockAccountServiceClient(ctrl *gomock.Controller) *MockAccountServiceClient + func (m *MockAccountServiceClient) Delete(ctx context.Context, in *DeleteAccountRequest, opts ...grpc.CallOption) (*empty.Empty, error) + func (m *MockAccountServiceClient) EXPECT() *MockAccountServiceClientMockRecorder + func (m *MockAccountServiceClient) Get(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponse, error) + func (m *MockAccountServiceClient) List(ctx context.Context, in *ListAccountsRequest, opts ...grpc.CallOption) (*ListAccountsResponse, error) + func (m *MockAccountServiceClient) Update(ctx context.Context, in *UpdateAccountRequest, opts ...grpc.CallOption) (*empty.Empty, error) + type MockAccountServiceClientMockRecorder struct + func (mr *MockAccountServiceClientMockRecorder) Delete(ctx, in interface{}, opts ...interface{}) *gomock.Call + func (mr *MockAccountServiceClientMockRecorder) Get(ctx, in interface{}, opts ...interface{}) *gomock.Call + func (mr *MockAccountServiceClientMockRecorder) List(ctx, in interface{}, opts ...interface{}) *gomock.Call + func (mr *MockAccountServiceClientMockRecorder) Update(ctx, in interface{}, opts ...interface{}) *gomock.Call + type MockAccountServiceServer struct + func NewMockAccountServiceServer(ctrl *gomock.Controller) *MockAccountServiceServer + func (m *MockAccountServiceServer) Delete(arg0 context.Context, arg1 *DeleteAccountRequest) (*empty.Empty, error) + func (m *MockAccountServiceServer) EXPECT() *MockAccountServiceServerMockRecorder + func (m *MockAccountServiceServer) Get(arg0 context.Context, arg1 *GetAccountRequest) (*GetAccountResponse, error) + func (m *MockAccountServiceServer) List(arg0 context.Context, arg1 *ListAccountsRequest) (*ListAccountsResponse, error) + func (m *MockAccountServiceServer) Update(arg0 context.Context, arg1 *UpdateAccountRequest) (*empty.Empty, error) + type MockAccountServiceServerMockRecorder struct + func (mr *MockAccountServiceServerMockRecorder) Delete(arg0, arg1 interface{}) *gomock.Call + func (mr *MockAccountServiceServerMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call + func (mr *MockAccountServiceServerMockRecorder) List(arg0, arg1 interface{}) *gomock.Call + func (mr *MockAccountServiceServerMockRecorder) Update(arg0, arg1 interface{}) *gomock.Call + type MockUnsafeAccountServiceServer struct + func NewMockUnsafeAccountServiceServer(ctrl *gomock.Controller) *MockUnsafeAccountServiceServer + func (m *MockUnsafeAccountServiceServer) EXPECT() *MockUnsafeAccountServiceServerMockRecorder + type MockUnsafeAccountServiceServerMockRecorder struct + type UnimplementedAccountServiceServer struct + func (UnimplementedAccountServiceServer) Delete(context.Context, *DeleteAccountRequest) (*empty.Empty, error) + func (UnimplementedAccountServiceServer) Get(context.Context, *GetAccountRequest) (*GetAccountResponse, error) + func (UnimplementedAccountServiceServer) List(context.Context, *ListAccountsRequest) (*ListAccountsResponse, error) + func (UnimplementedAccountServiceServer) Update(context.Context, *UpdateAccountRequest) (*empty.Empty, error) + type UnsafeAccountServiceServer interface + type UpdateAccountRequest struct + Password string + Username string + func (*UpdateAccountRequest) Descriptor() ([]byte, []int) + func (*UpdateAccountRequest) ProtoMessage() + func (x *UpdateAccountRequest) GetPassword() string + func (x *UpdateAccountRequest) GetUsername() string + func (x *UpdateAccountRequest) ProtoReflect() protoreflect.Message + func (x *UpdateAccountRequest) Reset() + func (x *UpdateAccountRequest) String() string