Documentation ¶
Index ¶
- type ConfigureArg
- type ConfigureReply
- type FindUsersArg
- type FindUsersReply
- type GetUserArg
- type GetUserByClaimArg
- type GetUserByClaimReply
- type GetUserGroupsArg
- type GetUserGroupsReply
- type GetUserReply
- type Manager
- type ProviderPlugin
- type RPCClient
- func (m *RPCClient) Configure(ml map[string]interface{}) error
- func (m *RPCClient) FindUsers(ctx context.Context, query string) ([]*userpb.User, error)
- func (m *RPCClient) GetUser(ctx context.Context, uid *userpb.UserId) (*userpb.User, error)
- func (m *RPCClient) GetUserByClaim(ctx context.Context, claim, value string) (*userpb.User, error)
- func (m *RPCClient) GetUserGroups(ctx context.Context, user *userpb.UserId) ([]string, error)
- type RPCServer
- func (m *RPCServer) Configure(args ConfigureArg, resp *ConfigureReply) error
- func (m *RPCServer) FindUsers(args FindUsersArg, resp *FindUsersReply) error
- func (m *RPCServer) GetUser(args GetUserArg, resp *GetUserReply) error
- func (m *RPCServer) GetUserByClaim(args GetUserByClaimArg, resp *GetUserByClaimReply) error
- func (m *RPCServer) GetUserGroups(args GetUserGroupsArg, resp *GetUserGroupsReply) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FindUsersArg ¶
type FindUsersArg struct { Ctx map[interface{}]interface{} Query string }
FindUsersArg for RPC
type FindUsersReply ¶
FindUsersReply for RPC
type GetUserArg ¶
GetUserArg for RPC
type GetUserByClaimArg ¶
GetUserByClaimArg for RPC
type GetUserByClaimReply ¶
GetUserByClaimReply for RPC
type GetUserGroupsArg ¶
GetUserGroupsArg for RPC
type GetUserGroupsReply ¶
GetUserGroupsReply for RPC
type Manager ¶
type Manager interface { plugin.Plugin GetUser(ctx context.Context, uid *userpb.UserId) (*userpb.User, error) GetUserByClaim(ctx context.Context, claim, value string) (*userpb.User, error) GetUserGroups(ctx context.Context, uid *userpb.UserId) ([]string, error) FindUsers(ctx context.Context, query string) ([]*userpb.User, error) }
Manager is the interface to implement to manipulate users.
type ProviderPlugin ¶
type ProviderPlugin struct {
Impl Manager
}
ProviderPlugin is the implementation of plugin.Plugin so we can serve/consume this.
type RPCClient ¶
RPCClient is an implementation of Manager that talks over RPC.
func (*RPCClient) GetUserByClaim ¶
GetUserByClaim RPCClient GetUserByClaim method
type RPCServer ¶
type RPCServer struct { // This is the real implementation Impl Manager }
RPCServer is the server that RPCClient talks to, conforming to the requirements of net/rpc
func (*RPCServer) Configure ¶
func (m *RPCServer) Configure(args ConfigureArg, resp *ConfigureReply) error
Configure RPCServer Configure method
func (*RPCServer) FindUsers ¶
func (m *RPCServer) FindUsers(args FindUsersArg, resp *FindUsersReply) error
FindUsers RPCServer FindUsers method
func (*RPCServer) GetUser ¶
func (m *RPCServer) GetUser(args GetUserArg, resp *GetUserReply) error
GetUser RPCServer GetUser method
func (*RPCServer) GetUserByClaim ¶
func (m *RPCServer) GetUserByClaim(args GetUserByClaimArg, resp *GetUserByClaimReply) error
GetUserByClaim RPCServer GetUserByClaim method
func (*RPCServer) GetUserGroups ¶
func (m *RPCServer) GetUserGroups(args GetUserGroupsArg, resp *GetUserGroupsReply) error
GetUserGroups RPCServer GetUserGroups method