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, skipFetchingGroups bool) ([]*userpb.User, error)
- func (m *RPCClient) GetUser(ctx context.Context, uid *userpb.UserId, skipFetchingGroups bool) (*userpb.User, error)
- func (m *RPCClient) GetUserByClaim(ctx context.Context, claim, value string, skipFetchingGroups bool) (*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 ¶
FindUsersArg for RPC
type FindUsersReply ¶
FindUsersReply for RPC
type GetUserArg ¶
type GetUserArg struct { Ctx map[interface{}]interface{} UID *userpb.UserId SkipFetchingGroups bool }
GetUserArg for RPC
type GetUserByClaimArg ¶
type GetUserByClaimArg struct { Ctx map[interface{}]interface{} Claim string Value string SkipFetchingGroups bool }
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 returns the user metadata identified by a uid. // The groups of the user are omitted if specified, as these might not be required for certain operations // and might involve computational overhead. GetUser(ctx context.Context, uid *userpb.UserId, skipFetchingGroups bool) (*userpb.User, error) // GetUserByClaim returns the user identified by a specific value for a given claim. GetUserByClaim(ctx context.Context, claim, value string, skipFetchingGroups bool) (*userpb.User, error) // GetUserGroups returns the groups a user identified by a uid belongs to. GetUserGroups(ctx context.Context, uid *userpb.UserId) ([]string, error) // FindUsers returns all the user objects which match a query parameter. FindUsers(ctx context.Context, query string, skipFetchingGroups bool) ([]*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) FindUsers ¶
func (m *RPCClient) FindUsers(ctx context.Context, query string, skipFetchingGroups bool) ([]*userpb.User, error)
FindUsers RPCClient FindUsers method
func (*RPCClient) GetUser ¶
func (m *RPCClient) GetUser(ctx context.Context, uid *userpb.UserId, skipFetchingGroups bool) (*userpb.User, error)
GetUser RPCClient GetUser 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