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) (*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) (*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) (*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) (*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) (*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) (*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 ¶ added in v1.17.0
AddMembersToGroup implements the Backend Interface. It's currently not supported for the CS3 backend
func (*CS3) CreateGroup ¶ added in v1.17.0
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 ¶ added in v1.17.0
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 ¶ added in v1.17.0
DeleteGroup implements the Backend Interface. It's currently not supported for the CS3 backend
func (*CS3) DeleteUser ¶ added in v1.17.0
DeleteUser implements the Backend Interface. It's currently not supported for the CS3 backend
func (*CS3) GetGroupMembers ¶ added in v1.17.0
GetGroupMembers implements the Backend Interface. It's currently not supported for the CS3 backend
func (*CS3) RemoveMemberFromGroup ¶ added in v1.17.0
RemoveMemberFromGroup implements the Backend Interface. It's currently not supported for the CS3 backend
func (*CS3) UpdateUser ¶ added in v1.17.0
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 ¶ added in v1.17.0
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 ¶ added in v1.17.0
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 ¶ added in v1.17.0
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 ¶ added in v1.17.0
DeleteGroup implements the Backend Interface.
func (*LDAP) DeleteUser ¶ added in v1.17.0
DeleteUser implements the Backend Interface. It permanently deletes a User identified by name or id from the LDAP server
func (*LDAP) GetGroupMembers ¶ added in v1.17.0
GetGroupMembers implements the Backend Interface for the LDAP Backend
func (*LDAP) RemoveMemberFromGroup ¶ added in v1.17.0
RemoveMemberFromGroup implements the Backend Interface.
func (*LDAP) UpdateUser ¶ added in v1.17.0
func (i *LDAP) UpdateUser(ctx context.Context, nameOrID string, user libregraph.User) (*libregraph.User, error)
UpdateUser implements the Backend Interface for the LDAP Backend