Documentation ¶
Index ¶
- type ClosableClient
- type GRPCClient
- func (m GRPCClient) AddUserWithFederatedID(user model.User, provider string, id, role string) (model.User, error)
- func (m GRPCClient) AddUserWithPassword(user model.User, password, role string, isAnonymous bool) (model.User, error)
- func (m GRPCClient) AllDeviceTokens(userID string) ([]string, error)
- func (m GRPCClient) AttachDeviceToken(userID, token string) error
- func (m GRPCClient) CheckPassword(id, password string) error
- func (m GRPCClient) Close()
- func (m GRPCClient) DeleteUser(id string) error
- func (m GRPCClient) DetachDeviceToken(token string) error
- func (m GRPCClient) FetchUsers(search string, skip, limit int) ([]model.User, int, error)
- func (m GRPCClient) ImportJSON(data []byte) error
- func (m GRPCClient) ResetPassword(id, password string) error
- func (m GRPCClient) UpdateLoginMetadata(userID string)
- func (m GRPCClient) UpdateUser(userID string, newUser model.User) (model.User, error)
- func (m GRPCClient) UserByEmail(email string) (model.User, error)
- func (m GRPCClient) UserByFederatedID(provider string, id string) (model.User, error)
- func (m GRPCClient) UserByID(id string) (model.User, error)
- func (m GRPCClient) UserByPhone(phone string) (model.User, error)
- func (m GRPCClient) UserByUsername(username string) (model.User, error)
- type GRPCServer
- func (m *GRPCServer) AddUserWithFederatedID(ctx context.Context, in *proto.AddUserWithFederatedIDRequest) (*proto.User, error)
- func (m *GRPCServer) AddUserWithPassword(ctx context.Context, in *proto.AddUserWithPasswordRequest) (*proto.User, error)
- func (m *GRPCServer) AllDeviceTokens(ctx context.Context, in *proto.AllDeviceTokensRequest) (*proto.AllDeviceTokensResponse, error)
- func (m *GRPCServer) AttachDeviceToken(ctx context.Context, in *proto.AttachDeviceTokenRequest) (*proto.Empty, error)
- func (m *GRPCServer) CheckPassword(ctx context.Context, in *proto.CheckPasswordRequest) (*proto.Empty, error)
- func (m *GRPCServer) Close(ctx context.Context, in *proto.CloseRequest) (*proto.Empty, error)
- func (m *GRPCServer) DeleteUser(ctx context.Context, in *proto.DeleteUserRequest) (*proto.Empty, error)
- func (m *GRPCServer) DetachDeviceToken(ctx context.Context, in *proto.DetachDeviceTokenRequest) (*proto.Empty, error)
- func (m *GRPCServer) FetchUsers(ctx context.Context, in *proto.FetchUsersRequest) (*proto.FetchUsersResponse, error)
- func (m *GRPCServer) ImportJSON(ctx context.Context, in *proto.ImportJSONRequest) (*proto.Empty, error)
- func (m *GRPCServer) ResetPassword(ctx context.Context, in *proto.ResetPasswordRequest) (*proto.Empty, error)
- func (m *GRPCServer) UpdateLoginMetadata(ctx context.Context, in *proto.UpdateLoginMetadataRequest) (*proto.Empty, error)
- func (m *GRPCServer) UpdateUser(ctx context.Context, in *proto.UpdateUserRequest) (*proto.User, error)
- func (m *GRPCServer) UserByEmail(ctx context.Context, in *proto.UserByEmailRequest) (*proto.User, error)
- func (m *GRPCServer) UserByFederatedID(ctx context.Context, in *proto.UserByFederatedIDRequest) (*proto.User, error)
- func (m *GRPCServer) UserByID(ctx context.Context, in *proto.UserByIDRequest) (*proto.User, error)
- func (m *GRPCServer) UserByPhone(ctx context.Context, in *proto.UserByPhoneRequest) (*proto.User, error)
- func (m *GRPCServer) UserByUsername(ctx context.Context, in *proto.UserByUsernameRequest) (*proto.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClosableClient ¶
type ClosableClient interface {
Close()
}
type GRPCClient ¶
type GRPCClient struct { Client proto.UserStorageClient ClosableClient ClosableClient }
GRPCClient is an implementation of KV that talks over RPC.
func (GRPCClient) AddUserWithFederatedID ¶
func (GRPCClient) AddUserWithPassword ¶
func (GRPCClient) AllDeviceTokens ¶
func (m GRPCClient) AllDeviceTokens(userID string) ([]string, error)
func (GRPCClient) AttachDeviceToken ¶
func (m GRPCClient) AttachDeviceToken(userID, token string) error
push device tokens
func (GRPCClient) CheckPassword ¶
func (m GRPCClient) CheckPassword(id, password string) error
func (GRPCClient) Close ¶
func (m GRPCClient) Close()
func (GRPCClient) DeleteUser ¶
func (m GRPCClient) DeleteUser(id string) error
func (GRPCClient) DetachDeviceToken ¶
func (m GRPCClient) DetachDeviceToken(token string) error
func (GRPCClient) FetchUsers ¶
func (GRPCClient) ResetPassword ¶
func (m GRPCClient) ResetPassword(id, password string) error
func (GRPCClient) UpdateLoginMetadata ¶
func (m GRPCClient) UpdateLoginMetadata(userID string)
func (GRPCClient) UpdateUser ¶
func (GRPCClient) UserByEmail ¶
func (m GRPCClient) UserByEmail(email string) (model.User, error)
func (GRPCClient) UserByFederatedID ¶
func (GRPCClient) UserByPhone ¶
func (m GRPCClient) UserByPhone(phone string) (model.User, error)
func (GRPCClient) UserByUsername ¶
func (m GRPCClient) UserByUsername(username string) (model.User, error)
type GRPCServer ¶
type GRPCServer struct { // This is the real implementation Impl model.UserStorage proto.UnimplementedUserStorageServer }
Here is the gRPC server that GRPCClient talks to.
func (*GRPCServer) AddUserWithFederatedID ¶
func (m *GRPCServer) AddUserWithFederatedID(ctx context.Context, in *proto.AddUserWithFederatedIDRequest) (*proto.User, error)
func (*GRPCServer) AddUserWithPassword ¶
func (m *GRPCServer) AddUserWithPassword(ctx context.Context, in *proto.AddUserWithPasswordRequest) (*proto.User, error)
func (*GRPCServer) AllDeviceTokens ¶
func (m *GRPCServer) AllDeviceTokens(ctx context.Context, in *proto.AllDeviceTokensRequest) (*proto.AllDeviceTokensResponse, error)
func (*GRPCServer) AttachDeviceToken ¶
func (m *GRPCServer) AttachDeviceToken(ctx context.Context, in *proto.AttachDeviceTokenRequest) (*proto.Empty, error)
func (*GRPCServer) CheckPassword ¶
func (m *GRPCServer) CheckPassword(ctx context.Context, in *proto.CheckPasswordRequest) (*proto.Empty, error)
func (*GRPCServer) Close ¶
func (m *GRPCServer) Close(ctx context.Context, in *proto.CloseRequest) (*proto.Empty, error)
func (*GRPCServer) DeleteUser ¶
func (m *GRPCServer) DeleteUser(ctx context.Context, in *proto.DeleteUserRequest) (*proto.Empty, error)
func (*GRPCServer) DetachDeviceToken ¶
func (m *GRPCServer) DetachDeviceToken(ctx context.Context, in *proto.DetachDeviceTokenRequest) (*proto.Empty, error)
func (*GRPCServer) FetchUsers ¶
func (m *GRPCServer) FetchUsers(ctx context.Context, in *proto.FetchUsersRequest) (*proto.FetchUsersResponse, error)
func (*GRPCServer) ImportJSON ¶
func (m *GRPCServer) ImportJSON(ctx context.Context, in *proto.ImportJSONRequest) (*proto.Empty, error)
func (*GRPCServer) ResetPassword ¶
func (m *GRPCServer) ResetPassword(ctx context.Context, in *proto.ResetPasswordRequest) (*proto.Empty, error)
func (*GRPCServer) UpdateLoginMetadata ¶
func (m *GRPCServer) UpdateLoginMetadata(ctx context.Context, in *proto.UpdateLoginMetadataRequest) (*proto.Empty, error)
func (*GRPCServer) UpdateUser ¶
func (m *GRPCServer) UpdateUser(ctx context.Context, in *proto.UpdateUserRequest) (*proto.User, error)
func (*GRPCServer) UserByEmail ¶
func (m *GRPCServer) UserByEmail(ctx context.Context, in *proto.UserByEmailRequest) (*proto.User, error)
func (*GRPCServer) UserByFederatedID ¶
func (m *GRPCServer) UserByFederatedID(ctx context.Context, in *proto.UserByFederatedIDRequest) (*proto.User, error)
func (*GRPCServer) UserByID ¶
func (m *GRPCServer) UserByID(ctx context.Context, in *proto.UserByIDRequest) (*proto.User, error)
func (*GRPCServer) UserByPhone ¶
func (m *GRPCServer) UserByPhone(ctx context.Context, in *proto.UserByPhoneRequest) (*proto.User, error)
func (*GRPCServer) UserByUsername ¶
func (m *GRPCServer) UserByUsername(ctx context.Context, in *proto.UserByUsernameRequest) (*proto.User, error)
Click to show internal directories.
Click to hide internal directories.