Documentation
¶
Index ¶
- type CreateGroupRequest
- type Group
- type Repository
- type Service
- func (s *Service) AddMember(ctx context.Context, groupName string, userUID uuid.UUID) error
- func (s *Service) AddMemberByAccessKey(ctx context.Context, groupName, accessKey string) error
- func (s *Service) AttachPolicy(ctx context.Context, groupName, policyName string) error
- func (s *Service) Create(ctx context.Context, req *CreateGroupRequest) (*iam.Group, error)
- func (s *Service) Delete(ctx context.Context, name string) error
- func (s *Service) DetachPolicy(ctx context.Context, groupName, policyName string) error
- func (s *Service) Get(ctx context.Context, name string) (*iam.Group, error)
- func (s *Service) GetMemberAccessKeys(ctx context.Context, groupName string) ([]string, error)
- func (s *Service) List(ctx context.Context) ([]string, error)
- func (s *Service) RemoveMember(ctx context.Context, groupName string, userUID uuid.UUID) error
- func (s *Service) RemoveMemberByAccessKey(ctx context.Context, groupName, accessKey string) error
- func (s *Service) SetStatus(ctx context.Context, groupName string, status iam.GroupStatus) error
- type UpdateGroupMembersRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateGroupRequest ¶
type CreateGroupRequest struct {
Name string
}
CreateGroupRequest represents a request to create a new group
type Repository ¶
type Repository interface {
CreateGroup(ctx context.Context, groupName string) error
GetGroup(ctx context.Context, groupName string) (*metadata.Group, error)
DeleteGroup(ctx context.Context, groupName string) error
ListGroupNames(ctx context.Context) ([]string, error)
GetUser(ctx context.Context, userUID uuid.UUID) (*metadata.User, error)
GetUserByAccessKey(ctx context.Context, accessKey string) (*metadata.User, error)
AddUserToGroup(ctx context.Context, groupName string, userUID uuid.UUID) error
RemoveUserFromGroup(ctx context.Context, groupName string, userUID uuid.UUID) error
AttachPolicyToGroup(ctx context.Context, groupName, policyName string) error
DetachPolicyFromGroup(ctx context.Context, groupName, policyName string) error
SetGroupStatus(ctx context.Context, groupName string, status iam.GroupStatus) error
GetPolicy(ctx context.Context, name string) (*metadata.Policy, error)
}
Repository is the persistence interface required by the group Service.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides group management operations
func (*Service) AddMemberByAccessKey ¶
AddMemberByAccessKey resolves an access key to a UUID and adds the user to the group.
func (*Service) AttachPolicy ¶
AttachPolicy attaches a policy to a group (idempotent)
func (*Service) DetachPolicy ¶
DetachPolicy detaches a policy from a group
func (*Service) GetMemberAccessKeys ¶
GetMemberAccessKeys returns the access keys for all members of the group, resolving the stored UUIDs via the metadata manager.
func (*Service) RemoveMember ¶
RemoveMember removes a user from a group.
func (*Service) RemoveMemberByAccessKey ¶
RemoveMemberByAccessKey resolves an access key to a UUID and removes the user from the group.
type UpdateGroupMembersRequest ¶
type UpdateGroupMembersRequest struct {
GroupName string
Members []string
IsRemove bool // true = remove members, false = add members
}
UpdateGroupMembersRequest represents a request to add or remove members from a group