Documentation ¶
Index ¶
- func ValidateProjectCreationRoles(roles []ProjectRole) error
- type Project
- type ProjectRole
- type ProjectRoleMember
- type ProjectService
- func (svc *ProjectService) Create(ctx context.Context, name, billingRef string, roles ...ProjectRole) (Project, *wait.Handler, error)
- func (svc *ProjectService) Delete(ctx context.Context, projectID string) (*wait.Handler, error)
- func (svc *ProjectService) Get(ctx context.Context, projectID string) (Project, error)
- func (svc *ProjectService) GetLifecycleState(ctx context.Context, projectID string) (string, error)
- func (svc *ProjectService) Update(ctx context.Context, id, name, billingRef string) error
- type ProjectsLabelsResBody
- type ProjectsParentResBody
- type ProjectsResBody
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateProjectCreationRoles ¶
func ValidateProjectCreationRoles(roles []ProjectRole) error
ValidateProjectCreationRoles validates that the given users and roles are correctly defined to fit project creation requirements Reference: https://api.stackit.schwarz/resource-management/openapi.v1.html#operation/post-organizations-organizationId-projects
Types ¶
type ProjectRole ¶
type ProjectRole struct { Name string `json:"name"` Users []ProjectRoleMember `json:"users"` ServiceAccounts []ProjectRoleMember `json:"service_accounts"` }
ProjectRole represents a role in the project
type ProjectRoleMember ¶
ProjectRoleMember represents a user or service account
type ProjectService ¶
ProjectService is the service that handles CRUD functionality for STACKIT projects
func (*ProjectService) Create ¶
func (svc *ProjectService) Create(ctx context.Context, name, billingRef string, roles ...ProjectRole) (Project, *wait.Handler, error)
Create creates a new STACKIT project it returns a wait handler - running Wait() will wait for the project to be active See also https://api.stackit.schwarz/resource-management/openapi.v1.html#operation/post-organizations-organizationId-projects
func (*ProjectService) Delete ¶
Delete deletes a project by ID it returns a wait handler - running Wait() will wait for the project to be deleted See also https://api.stackit.schwarz/resource-management/openapi.v1.html#operation/delete-projects-projectId
func (*ProjectService) Get ¶
Get returns the project by id See also https://api.stackit.schwarz/resource-management/openapi.v1.html#operation/get-projects-projectId
func (*ProjectService) GetLifecycleState ¶
GetLifecycleState returns the project state See also https://api.stackit.schwarz/resource-management/openapi.v1.html#operation/get-projects-projectId
func (*ProjectService) Update ¶
func (svc *ProjectService) Update(ctx context.Context, id, name, billingRef string) error
Update updates an existing STACKIT project See also https://api.stackit.schwarz/resource-management/openapi.v1.html#operation/patch-project-projectId
type ProjectsLabelsResBody ¶
type ProjectsLabelsResBody struct {
BillingReference string `json:"billingReference"`
}
ProjectsLabelsResBody is the labels response
type ProjectsParentResBody ¶
ProjectsParentResBody is the parent entity response
type ProjectsResBody ¶
type ProjectsResBody struct { ProjectID string `json:"projectId"` LifecycleState string `json:"lifecycleState"` Scope string `json:"scope"` Name string `json:"name"` CreateTime string `json:"createTime"` Labels ProjectsLabelsResBody `json:"labels"` Parent ProjectsParentResBody }
ProjectsResBody is the generic api response struct