Documentation
¶
Index ¶
- Constants
- func EnsureProviderProject(ctx context.Context, masterClient mdc.Client, providerTenantID string) error
- func GetProject(ctx context.Context, c mdc.Client, projectID string) (*mdcv1.Project, error)
- func GetProjectMember(ctx context.Context, c mdc.Client, projectID, tenantID string) (*mdcv1.ProjectMember, *mdcv1.Project, error)
- func IsDefaultProject(p *mdcv1.Project) bool
- func ProjectRoleFromMap(annotations map[string]string) apiv2.ProjectRole
- func ToProject(p *mdcv1.Project) (*apiv2.Project, error)
- type DefaultProjectRequirement
- type ProjectsAndTenants
Constants ¶
View Source
const ( DefaultProjectAnnotation = "metal-stack.io/default-project" ProjectRoleAnnotation = "metal-stack.io/project-role" AvatarURLAnnotation = "avatarUrl" )
Variables ¶
This section is empty.
Functions ¶
func EnsureProviderProject ¶
func GetProject ¶
func GetProjectMember ¶
func IsDefaultProject ¶
func ProjectRoleFromMap ¶
func ProjectRoleFromMap(annotations map[string]string) apiv2.ProjectRole
Types ¶
type DefaultProjectRequirement ¶
type DefaultProjectRequirement bool
const ( DefaultProjectRequired DefaultProjectRequirement = true DefaultProjectNotRequired DefaultProjectRequirement = false )
type ProjectsAndTenants ¶
type ProjectsAndTenants struct {
Projects []*apiv2.Project
DefaultProject *apiv2.Project
Tenants []*apiv2.Tenant
DefaultTenant *apiv2.Tenant
ProjectRoles map[string]apiv2.ProjectRole
TenantRoles map[string]apiv2.TenantRole
}
func GetProjectsAndTenants ¶
func GetProjectsAndTenants(ctx context.Context, masterClient mdc.Client, userId string, defaultIsRequired DefaultProjectRequirement) (*ProjectsAndTenants, error)
GetProjectsAndTenants returns all projects and tenants that the user is participating in
Click to show internal directories.
Click to hide internal directories.