Documentation ¶
Index ¶
- func GenerateCreateGroupInput(cr *v1alpha1.Group) (*sdkgo.Group, sets.Set[string], sets.Set[v1alpha1.ResourceShare])
- func GenerateUpdateGroupInput(cr *v1alpha1.Group, observedMemberIDs []string, ...) (*sdkgo.Group, MembersUpdateOp, SharesUpdateOp)
- func IsGroupUpToDate(cr *v1alpha1.Group, observed sdkgo.Group) bool
- type APIClient
- func (cp *APIClient) AddGroupMember(ctx context.Context, groupID, userID string) (*sdkgo.APIResponse, error)
- func (cp *APIClient) AddResourceShare(ctx context.Context, groupID string, share v1alpha1.ResourceShare) (*sdkgo.APIResponse, error)
- func (cp *APIClient) CheckDuplicateGroup(ctx context.Context, groupName string) (string, error)
- func (cp *APIClient) CreateGroup(ctx context.Context, group sdkgo.Group) (sdkgo.Group, *sdkgo.APIResponse, error)
- func (cp *APIClient) DeleteGroup(ctx context.Context, groupID string) (*sdkgo.APIResponse, error)
- func (cp *APIClient) GetAPIClient() *sdkgo.APIClient
- func (cp *APIClient) GetGroup(ctx context.Context, groupID string) (sdkgo.Group, *sdkgo.APIResponse, error)
- func (cp *APIClient) GetGroupMembers(ctx context.Context, groupID string) ([]string, *sdkgo.APIResponse, error)
- func (cp *APIClient) GetGroupResourceShares(ctx context.Context, groupID string) ([]v1alpha1.ResourceShare, *sdkgo.APIResponse, error)
- func (cp *APIClient) RemoveGroupMember(ctx context.Context, groupID, userID string) (*sdkgo.APIResponse, error)
- func (cp *APIClient) RemoveResourceShare(ctx context.Context, groupID string, share v1alpha1.ResourceShare) (*sdkgo.APIResponse, error)
- func (cp *APIClient) UpdateGroup(ctx context.Context, groupID string, group sdkgo.Group) (sdkgo.Group, *sdkgo.APIResponse, error)
- func (cp *APIClient) UpdateGroupMembers(ctx context.Context, groupID string, membersIn MembersUpdateOp) error
- func (cp *APIClient) UpdateGroupResourceShares(ctx context.Context, groupID string, sharesIn SharesUpdateOp) error
- func (cp *APIClient) UpdateResourceShare(ctx context.Context, groupID string, share v1alpha1.ResourceShare) (*sdkgo.APIResponse, error)
- type Client
- type MembersUpdateOp
- type SharesUpdateOp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateCreateGroupInput ¶
func GenerateCreateGroupInput(cr *v1alpha1.Group) (*sdkgo.Group, sets.Set[string], sets.Set[v1alpha1.ResourceShare])
GenerateCreateGroupInput returns sdkgo.Group and members that need to be added based on CR
func GenerateUpdateGroupInput ¶
func GenerateUpdateGroupInput(cr *v1alpha1.Group, observedMemberIDs []string, observedShares []v1alpha1.ResourceShare) (*sdkgo.Group, MembersUpdateOp, SharesUpdateOp)
GenerateUpdateGroupInput returns sdkgo.Group and members that need to be added and deleted based or CR and observed member IDs
Types ¶
type APIClient ¶
type APIClient struct {
*clients.IonosServices
}
APIClient is a wrapper around IONOS Service
func (*APIClient) AddGroupMember ¶
func (cp *APIClient) AddGroupMember(ctx context.Context, groupID, userID string) (*sdkgo.APIResponse, error)
AddGroupMember adds the User referenced by userID to the Group with groupID
func (*APIClient) AddResourceShare ¶
func (cp *APIClient) AddResourceShare(ctx context.Context, groupID string, share v1alpha1.ResourceShare) (*sdkgo.APIResponse, error)
AddResourceShare adds a ResourceShare to the Group with groupID
func (*APIClient) CheckDuplicateGroup ¶
CheckDuplicateGroup based on groupName, returns the ID of the duplicate group if any, or an error if multiple duplicate name groups are found
func (*APIClient) CreateGroup ¶
func (cp *APIClient) CreateGroup(ctx context.Context, group sdkgo.Group) (sdkgo.Group, *sdkgo.APIResponse, error)
CreateGroup based on Group properties
func (*APIClient) DeleteGroup ¶
DeleteGroup based on groupID
func (*APIClient) GetAPIClient ¶
GetAPIClient gets the APIClient
func (*APIClient) GetGroup ¶
func (cp *APIClient) GetGroup(ctx context.Context, groupID string) (sdkgo.Group, *sdkgo.APIResponse, error)
GetGroup based on groupID
func (*APIClient) GetGroupMembers ¶
func (cp *APIClient) GetGroupMembers(ctx context.Context, groupID string) ([]string, *sdkgo.APIResponse, error)
GetGroupMembers retrieves users that are added to the group
func (*APIClient) GetGroupResourceShares ¶
func (cp *APIClient) GetGroupResourceShares(ctx context.Context, groupID string) ([]v1alpha1.ResourceShare, *sdkgo.APIResponse, error)
GetGroupResourceShares retrieves resources shares that have been added to the group
func (*APIClient) RemoveGroupMember ¶
func (cp *APIClient) RemoveGroupMember(ctx context.Context, groupID, userID string) (*sdkgo.APIResponse, error)
RemoveGroupMember removes the User referenced by userID from the Group with groupID
func (*APIClient) RemoveResourceShare ¶
func (cp *APIClient) RemoveResourceShare(ctx context.Context, groupID string, share v1alpha1.ResourceShare) (*sdkgo.APIResponse, error)
RemoveResourceShare removes a ResourceShare from the Group with groupID
func (*APIClient) UpdateGroup ¶
func (cp *APIClient) UpdateGroup(ctx context.Context, groupID string, group sdkgo.Group) (sdkgo.Group, *sdkgo.APIResponse, error)
UpdateGroup based on groupID and Group properties
func (*APIClient) UpdateGroupMembers ¶
func (cp *APIClient) UpdateGroupMembers(ctx context.Context, groupID string, membersIn MembersUpdateOp) error
UpdateGroupMembers updates the members of Group depending on modFn using the userIDs set
func (*APIClient) UpdateGroupResourceShares ¶
func (cp *APIClient) UpdateGroupResourceShares(ctx context.Context, groupID string, sharesIn SharesUpdateOp) error
UpdateGroupResourceShares updates the shared resource set of the Group with groupID with the update data in sharesIn
func (*APIClient) UpdateResourceShare ¶
func (cp *APIClient) UpdateResourceShare(ctx context.Context, groupID string, share v1alpha1.ResourceShare) (*sdkgo.APIResponse, error)
UpdateResourceShare updates a ResourceShare of the Group with groupID
type Client ¶
type Client interface { CheckDuplicateGroup(ctx context.Context, groupName string) (string, error) GetGroup(ctx context.Context, groupID string) (sdkgo.Group, *sdkgo.APIResponse, error) GetGroupMembers(ctx context.Context, groupID string) ([]string, *sdkgo.APIResponse, error) CreateGroup(ctx context.Context, group sdkgo.Group) (sdkgo.Group, *sdkgo.APIResponse, error) UpdateGroup(ctx context.Context, groupID string, group sdkgo.Group) (sdkgo.Group, *sdkgo.APIResponse, error) AddGroupMember(ctx context.Context, groupID, userID string) (*sdkgo.APIResponse, error) RemoveGroupMember(ctx context.Context, groupID, userID string) (*sdkgo.APIResponse, error) UpdateGroupMembers(ctx context.Context, groupID string, membersIn MembersUpdateOp) error DeleteGroup(ctx context.Context, groupID string) (*sdkgo.APIResponse, error) GetAPIClient() *sdkgo.APIClient }
Client is a wrapper around IONOS Service Group methods
type MembersUpdateOp ¶
MembersUpdateOp groups memberIDs in sets depending on the operation in which they will be used
type SharesUpdateOp ¶
type SharesUpdateOp struct {
SharesUpdateOp groups resource shares in sets depending on the operation in which they will be used