Documentation ¶
Index ¶
- type ProjectRole
- type ProjectRoleMember
- type ProjectRoles
- type RolesService
- func (svc *RolesService) AddUsers(ctx context.Context, projectID, role string, users []string, ...) error
- func (svc *RolesService) DeleteUsers(ctx context.Context, projectID, role string, users []string, ...) error
- func (svc *RolesService) Get(ctx context.Context, projectID string) (ProjectRoles, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProjectRole ¶
type ProjectRole struct { Name string `json:"name"` Users []ProjectRoleMember `json:"users"` ServiceAccounts []ProjectRoleMember `json:"service_accounts"` }
ProjectRole represents a role and its members
type ProjectRoleMember ¶
ProjectRoleMember represents a user or service account
type ProjectRoles ¶
type ProjectRoles struct { ProjectID string `json:"projectID"` Roles []ProjectRole `json:"roles"` }
ProjectRoles is the main response struct representing a project, its roles and members that belong to the role
type RolesService ¶
RolesService is the service that handles CRUD functionality for users in roles in a STACKIT project
func (*RolesService) AddUsers ¶
func (svc *RolesService) AddUsers(ctx context.Context, projectID, role string, users []string, serviceAccounts []string) error
AddUsers adds users and/or service accounts to a given project role
func (*RolesService) DeleteUsers ¶
func (svc *RolesService) DeleteUsers(ctx context.Context, projectID, role string, users []string, serviceAccounts []string) error
DeleteUsers removes users from a given role Reference: https://api.stackit.schwarz/membership-service/openapi.v1.html#operation/patch-projects-projectId-roles
func (*RolesService) Get ¶
func (svc *RolesService) Get(ctx context.Context, projectID string) (ProjectRoles, error)
Get returns the project roles Reference: https://api.stackit.schwarz/membership-service/openapi.v1.html#operation/get-projects-projectId-roles