project

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 8, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

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 EnsureProviderProject(ctx context.Context, masterClient mdc.Client, providerTenantID string) error

func GetProject

func GetProject(ctx context.Context, c mdc.Client, projectID string) (*mdcv1.Project, error)

func GetProjectMember

func GetProjectMember(ctx context.Context, c mdc.Client, projectID, tenantID string) (*mdcv1.ProjectMember, *mdcv1.Project, error)

func ProjectRoleFromMap

func ProjectRoleFromMap(annotations map[string]string) apiv2.ProjectRole

func ToProject

func ToProject(p *mdcv1.Project) (*apiv2.Project, error)

Types

type ProjectsAndTenants

type ProjectsAndTenants struct {
	Projects      []*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) (*ProjectsAndTenants, error)

GetProjectsAndTenants returns all projects and tenants that the user is participating in

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL