Documentation
¶
Overview ¶
Package store provides SCIM Store implementations.
Index ¶
- type Config
- type EntStore
- func (s *EntStore) AddMemberToGroup(ctx context.Context, groupID, userID string) error
- func (s *EntStore) CreateGroup(ctx context.Context, scimGroup *scim.Group) (*scim.Group, error)
- func (s *EntStore) CreateUser(ctx context.Context, scimUser *scim.User) (*scim.User, error)
- func (s *EntStore) DeleteGroup(ctx context.Context, id string) error
- func (s *EntStore) DeleteUser(ctx context.Context, id string) error
- func (s *EntStore) GetGroupByDisplayName(ctx context.Context, displayName string) (*scim.Group, error)
- func (s *EntStore) GetGroupByExternalID(ctx context.Context, externalID string) (*scim.Group, error)
- func (s *EntStore) GetGroupByID(ctx context.Context, id string) (*scim.Group, error)
- func (s *EntStore) GetGroupsForUser(ctx context.Context, userID string) ([]scim.GroupRef, error)
- func (s *EntStore) GetMembersForGroup(ctx context.Context, groupID string) ([]scim.MemberRef, error)
- func (s *EntStore) GetUserByExternalID(ctx context.Context, externalID string) (*scim.User, error)
- func (s *EntStore) GetUserByID(ctx context.Context, id string) (*scim.User, error)
- func (s *EntStore) GetUserByUserName(ctx context.Context, userName string) (*scim.User, error)
- func (s *EntStore) ListGroups(ctx context.Context, opts scim.ListOptions) ([]*scim.Group, int, error)
- func (s *EntStore) ListUsers(ctx context.Context, opts scim.ListOptions) ([]*scim.User, int, error)
- func (s *EntStore) RemoveMemberFromGroup(ctx context.Context, groupID, userID string) error
- func (s *EntStore) UpdateGroup(ctx context.Context, id string, scimGroup *scim.Group) (*scim.Group, error)
- func (s *EntStore) UpdateUser(ctx context.Context, id string, scimUser *scim.User) (*scim.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// BaseURL is the base URL for SCIM resources.
BaseURL string
// DefaultRole is the default role for new group members.
DefaultRole string
}
Config holds configuration for the Ent store.
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig returns the default store configuration.
type EntStore ¶
type EntStore struct {
// contains filtered or unexported fields
}
EntStore implements the scim.Store interface using Ent ORM.
func NewEntStore ¶
NewEntStore creates a new Ent-backed SCIM store.
func (*EntStore) AddMemberToGroup ¶
AddMemberToGroup adds a user to a group.
func (*EntStore) CreateGroup ¶
CreateGroup creates a new group.
func (*EntStore) CreateUser ¶
CreateUser creates a new user.
func (*EntStore) DeleteGroup ¶
DeleteGroup deletes a group.
func (*EntStore) DeleteUser ¶
DeleteUser deletes a user.
func (*EntStore) GetGroupByDisplayName ¶
func (s *EntStore) GetGroupByDisplayName(ctx context.Context, displayName string) (*scim.Group, error)
GetGroupByDisplayName retrieves a group by displayName.
func (*EntStore) GetGroupByExternalID ¶
func (s *EntStore) GetGroupByExternalID(ctx context.Context, externalID string) (*scim.Group, error)
GetGroupByExternalID retrieves a group by externalId.
func (*EntStore) GetGroupByID ¶
GetGroupByID retrieves a group by SCIM ID.
func (*EntStore) GetGroupsForUser ¶
GetGroupsForUser returns all groups a user belongs to.
func (*EntStore) GetMembersForGroup ¶
func (s *EntStore) GetMembersForGroup(ctx context.Context, groupID string) ([]scim.MemberRef, error)
GetMembersForGroup returns all members of a group.
func (*EntStore) GetUserByExternalID ¶
GetUserByExternalID retrieves a user by externalId. Since CoreForge doesn't have an externalId field, we return not found.
func (*EntStore) GetUserByID ¶
GetUserByID retrieves a user by SCIM ID.
func (*EntStore) GetUserByUserName ¶
GetUserByUserName retrieves a user by userName (email).
func (*EntStore) ListGroups ¶
func (s *EntStore) ListGroups(ctx context.Context, opts scim.ListOptions) ([]*scim.Group, int, error)
ListGroups lists groups with filtering and pagination.
func (*EntStore) RemoveMemberFromGroup ¶
RemoveMemberFromGroup removes a user from a group.