api

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TODO: Migrate to common fields introduced in https://github.com/metal-stack/masterdata-api/pull/127
	TenantTagEmail     = "metal-stack.io/email"
	TenantTagAvatarURL = "metal-stack.io/avatarurl"
	TenantTagCreator   = "metal-stack.io/creator"

	// TODO: Use scoped memberships: https://github.com/metal-stack/masterdata-api/issues/130
	TenantRoleAnnotation = "metal-stack.io/tenant-role"
)
View Source
const (
	AuditingComponent = "metal-stack.io"
)
View Source
const (
	ProjectRoleAnnotation = "metal-stack.io/project-role"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ComponentServiceCreateRequest

type ComponentServiceCreateRequest struct {
	*apiv2.Component
	Expiration time.Duration
}

type ComponentServiceUpdateRequest

type ComponentServiceUpdateRequest struct {
}

func (*ComponentServiceUpdateRequest) GetUpdateMeta

type ProjectMemberCreateRequest

type ProjectMemberCreateRequest struct {
	TenantId string
	Role     apiv2.ProjectRole
}

type ProjectMemberQuery

type ProjectMemberQuery struct {
	TenantId    *string
	Annotations map[string]string
}

type ProjectMemberUpdateRequest

type ProjectMemberUpdateRequest struct {
	Role apiv2.ProjectRole
	Meta apiv2.Meta
}

func (*ProjectMemberUpdateRequest) GetUpdateMeta

func (*ProjectMemberUpdateRequest) GetUpdateMeta() *apiv2.UpdateMeta

type ProjectsAndTenants

type ProjectsAndTenants struct {
	Projects      []*apiv2.Project
	Tenants       []*apiv2.Tenant
	DefaultTenant *apiv2.Tenant
	ProjectRoles  map[string]apiv2.ProjectRole
	TenantRoles   map[string]apiv2.TenantRole
}

type ProjectsAndTenantsGetter

type ProjectsAndTenantsGetter func(ctx context.Context, userId string) (*ProjectsAndTenants, error)

type SwitchServiceCreateRequest

type SwitchServiceCreateRequest struct {
	Switch *apiv2.Switch
}

type SwitchStatus

type SwitchStatus struct {
	ID            string
	LastSync      *apiv2.SwitchSync
	LastSyncError *apiv2.SwitchSync
}

func (*SwitchStatus) GetID

func (s *SwitchStatus) GetID() string

type TenantMemberCreateRequest

type TenantMemberCreateRequest struct {
	MemberID string
	Role     apiv2.TenantRole
}

type TenantMemberQuery

type TenantMemberQuery struct {
	MemberId    *string
	Annotations map[string]string
}

type TenantMemberUpdateRequest

type TenantMemberUpdateRequest struct {
	Role apiv2.TenantRole
}

func (*TenantMemberUpdateRequest) GetUpdateMeta

func (*TenantMemberUpdateRequest) GetUpdateMeta() *apiv2.UpdateMeta

type TenantWithMembershipAnnotations

type TenantWithMembershipAnnotations struct {
	Tenant             *apiv2.Tenant
	ProjectAnnotations map[string]string
	TenantAnnotations  map[string]string
	ProjectIds         []string
}

Jump to

Keyboard shortcuts

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