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 ConfigureArg ¶ added in v0.0.2
type ConfigureArg struct {
Ml map[string]interface{}
}
ConfigureArg for RPC
type ConfigureReply ¶ added in v0.0.2
type ConfigureReply struct {
Err error
}
ConfigureReply for RPC
type FindUsersArg ¶ added in v0.0.2
FindUsersArg for RPC
type FindUsersReply ¶ added in v0.0.2
FindUsersReply for RPC
type GetUserArg ¶ added in v0.0.2
type GetUserArg struct { Ctx map[interface{}]interface{} UID *userpb.UserId SkipFetchingGroups bool }
GetUserArg for RPC
type GetUserByClaimArg ¶ added in v0.0.2
type GetUserByClaimArg struct { Ctx map[interface{}]interface{} Claim string Value string SkipFetchingGroups bool }
GetUserByClaimArg for RPC
type GetUserByClaimReply ¶ added in v0.0.2
GetUserByClaimReply for RPC
type GetUserGroupsArg ¶ added in v0.0.2
GetUserGroupsArg for RPC
type GetUserGroupsReply ¶ added in v0.0.2
GetUserGroupsReply for RPC
type GetUserReply ¶ added in v0.0.2
GetUserReply 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 ¶ added in v0.0.2
type ProviderPlugin struct {
Impl Manager
}
ProviderPlugin is the implementation of plugin.Plugin so we can serve/consume this.
type RPCClient ¶ added in v0.0.2
RPCClient is an implementation of Manager that talks over RPC.
func (*RPCClient) FindUsers ¶ added in v0.0.2
func (m *RPCClient) FindUsers(ctx context.Context, query string, skipFetchingGroups bool) ([]*userpb.User, error)
FindUsers RPCClient FindUsers method
func (*RPCClient) GetUser ¶ added in v0.0.2
func (m *RPCClient) GetUser(ctx context.Context, uid *userpb.UserId, skipFetchingGroups bool) (*userpb.User, error)
GetUser RPCClient GetUser method
type RPCServer ¶ added in v0.0.2
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 ¶ added in v0.0.2
func (m *RPCServer) Configure(args ConfigureArg, resp *ConfigureReply) error
Configure RPCServer Configure method
func (*RPCServer) FindUsers ¶ added in v0.0.2
func (m *RPCServer) FindUsers(args FindUsersArg, resp *FindUsersReply) error
FindUsers RPCServer FindUsers method
func (*RPCServer) GetUser ¶ added in v0.0.2
func (m *RPCServer) GetUser(args GetUserArg, resp *GetUserReply) error
GetUser RPCServer GetUser method
func (*RPCServer) GetUserByClaim ¶ added in v0.0.2
func (m *RPCServer) GetUserByClaim(args GetUserByClaimArg, resp *GetUserByClaimReply) error
GetUserByClaim RPCServer GetUserByClaim method
func (*RPCServer) GetUserGroups ¶ added in v0.0.2
func (m *RPCServer) GetUserGroups(args GetUserGroupsArg, resp *GetUserGroupsReply) error
GetUserGroups RPCServer GetUserGroups method