Documentation ¶
Index ¶
- func CreateUserModelFromCS3(u *cs3.User) *libregraph.User
- type Backend
- type CS3
- func (i *CS3) AddMembersToGroup(ctx context.Context, groupID string, memberID []string) error
- func (i *CS3) CreateGroup(ctx context.Context, group libregraph.Group) (*libregraph.Group, error)
- func (i *CS3) CreateUser(ctx context.Context, user libregraph.User) (*libregraph.User, error)
- func (i *CS3) DeleteGroup(ctx context.Context, id string) error
- func (i *CS3) DeleteUser(ctx context.Context, nameOrID string) error
- func (i *CS3) GetGroup(ctx context.Context, groupID string, queryParam url.Values) (*libregraph.Group, error)
- func (i *CS3) GetGroupMembers(ctx context.Context, groupID string) ([]*libregraph.User, error)
- func (i *CS3) GetGroups(ctx context.Context, queryParam url.Values) ([]*libregraph.Group, error)
- func (i *CS3) GetUser(ctx context.Context, userID string, queryParam url.Values) (*libregraph.User, error)
- func (i *CS3) GetUsers(ctx context.Context, queryParam url.Values) ([]*libregraph.User, error)
- func (i *CS3) RemoveMemberFromGroup(ctx context.Context, groupID string, memberID string) error
- func (i *CS3) UpdateUser(ctx context.Context, nameOrID string, user libregraph.User) (*libregraph.User, error)
- type LDAP
- func (i *LDAP) AddMembersToGroup(ctx context.Context, groupID string, memberIDs []string) error
- func (i *LDAP) CreateGroup(ctx context.Context, group libregraph.Group) (*libregraph.Group, error)
- func (i *LDAP) CreateUser(ctx context.Context, user libregraph.User) (*libregraph.User, error)
- func (i *LDAP) DeleteGroup(ctx context.Context, id string) error
- func (i *LDAP) DeleteUser(ctx context.Context, nameOrID string) error
- func (i *LDAP) GetGroup(ctx context.Context, nameOrID string, queryParam url.Values) (*libregraph.Group, error)
- func (i *LDAP) GetGroupMembers(ctx context.Context, groupID string) ([]*libregraph.User, error)
- func (i *LDAP) GetGroups(ctx context.Context, queryParam url.Values) ([]*libregraph.Group, error)
- func (i *LDAP) GetUser(ctx context.Context, nameOrID string, queryParam url.Values) (*libregraph.User, error)
- func (i *LDAP) GetUsers(ctx context.Context, queryParam url.Values) ([]*libregraph.User, error)
- func (i *LDAP) RemoveMemberFromGroup(ctx context.Context, groupID string, memberID string) error
- func (i *LDAP) UpdateUser(ctx context.Context, nameOrID string, user libregraph.User) (*libregraph.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateUserModelFromCS3 ¶
func CreateUserModelFromCS3(u *cs3.User) *libregraph.User
Types ¶
type Backend ¶
type Backend interface { // CreateUser creates a given user in the identity backend. CreateUser(ctx context.Context, user libregraph.User) (*libregraph.User, error) // DeleteUser deletes a given user, identified by username or id, from the backend DeleteUser(ctx context.Context, nameOrID string) error // UpdateUser applies changes to given user, identified by username or id UpdateUser(ctx context.Context, nameOrID string, user libregraph.User) (*libregraph.User, error) GetUser(ctx context.Context, nameOrID string, queryParam url.Values) (*libregraph.User, error) GetUsers(ctx context.Context, queryParam url.Values) ([]*libregraph.User, error) // CreateGroup creates the supplied group in the identity backend. CreateGroup(ctx context.Context, group libregraph.Group) (*libregraph.Group, error) // DeleteGroup deletes a given group, identified by id DeleteGroup(ctx context.Context, id string) error GetGroup(ctx context.Context, nameOrID string, queryParam url.Values) (*libregraph.Group, error) GetGroups(ctx context.Context, queryParam url.Values) ([]*libregraph.Group, error) GetGroupMembers(ctx context.Context, id string) ([]*libregraph.User, error) // AddMembersToGroup adds new members (reference by a slice of IDs) to supplied group in the identity backend. AddMembersToGroup(ctx context.Context, groupID string, memberID []string) error // RemoveMemberFromGroup removes a single member (by ID) from a group RemoveMemberFromGroup(ctx context.Context, groupID string, memberID string) error }
type CS3 ¶
func (*CS3) AddMembersToGroup ¶
AddMembersToGroup implements the Backend Interface. It's currently not supported for the CS3 backend
func (*CS3) CreateGroup ¶
func (i *CS3) CreateGroup(ctx context.Context, group libregraph.Group) (*libregraph.Group, error)
CreateGroup implements the Backend Interface. It's currently not supported for the CS3 backend
func (*CS3) CreateUser ¶
func (i *CS3) CreateUser(ctx context.Context, user libregraph.User) (*libregraph.User, error)
CreateUser implements the Backend Interface. It's currently not supported for the CS3 backend
func (*CS3) DeleteGroup ¶
DeleteGroup implements the Backend Interface. It's currently not supported for the CS3 backend
func (*CS3) DeleteUser ¶
DeleteUser implements the Backend Interface. It's currently not supported for the CS3 backend
func (*CS3) GetGroupMembers ¶
GetGroupMembers implements the Backend Interface. It's currently not supported for the CS3 backend
func (*CS3) RemoveMemberFromGroup ¶
RemoveMemberFromGroup implements the Backend Interface. It's currently not supported for the CS3 backend
func (*CS3) UpdateUser ¶
func (i *CS3) UpdateUser(ctx context.Context, nameOrID string, user libregraph.User) (*libregraph.User, error)
UpdateUser implements the Backend Interface. It's currently not suported for the CS3 backend
type LDAP ¶
type LDAP struct {
// contains filtered or unexported fields
}
func NewLDAPBackend ¶
func (*LDAP) AddMembersToGroup ¶
AddMembersToGroup implements the Backend Interface for the LDAP backend. Currently it is limited to adding Users as Group members. Adding other groups as members is not yet implemented
func (*LDAP) CreateGroup ¶
func (i *LDAP) CreateGroup(ctx context.Context, group libregraph.Group) (*libregraph.Group, error)
CreateGroup implements the Backend Interface for the LDAP Backend It is currently restricted to managing groups based on the "groupOfNames" ObjectClass. As "groupOfNames" requires a "member" Attribute to be present. Empty Groups (groups without a member) a represented by adding an empty DN as the single member.
func (*LDAP) CreateUser ¶
func (i *LDAP) CreateUser(ctx context.Context, user libregraph.User) (*libregraph.User, error)
CreateUser implements the Backend Interface. It converts the libregraph.User into an LDAP User Entry (using the inetOrgPerson LDAP Objectclass) add adds that to the configured LDAP server
func (*LDAP) DeleteGroup ¶
DeleteGroup implements the Backend Interface.
func (*LDAP) DeleteUser ¶
DeleteUser implements the Backend Interface. It permanently deletes a User identified by name or id from the LDAP server
func (*LDAP) GetGroupMembers ¶
GetGroupMembers implements the Backend Interface for the LDAP Backend
func (*LDAP) RemoveMemberFromGroup ¶
RemoveMemberFromGroup implements the Backend Interface.
func (*LDAP) UpdateUser ¶
func (i *LDAP) UpdateUser(ctx context.Context, nameOrID string, user libregraph.User) (*libregraph.User, error)
UpdateUser implements the Backend Interface for the LDAP Backend