cache

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountResource

type AccountResource struct {
	Runtimes map[string]RuntimeResource `yaml:"runtimes"`
}

func (AccountResource) ListAccountSpaces

func (ar AccountResource) ListAccountSpaces(opts ...ListOption) utils.StringSet

func (AccountResource) ListPermissions added in v0.4.2

func (ar AccountResource) ListPermissions(opts ...ListOption) []component.SecretInfo

type AccountUsage

type AccountUsage struct {
	Accounts map[string]AccountResource `yaml:"accounts"`
}

func (*AccountUsage) AddRuntime added in v0.4.2

func (au *AccountUsage) AddRuntime(accountName, runtimeName string)

func (*AccountUsage) DeleteRuntime

func (au *AccountUsage) DeleteRuntime(accountName, runtimeName string)

func (*AccountUsage) UpdatePermissions added in v0.4.2

func (au *AccountUsage) UpdatePermissions(accountName, runtimeName string, permissions []component.SecretInfo)

func (*AccountUsage) UpdateSpaces added in v0.4.2

func (au *AccountUsage) UpdateSpaces(accountName, runtimeName string, spaces utils.StringSet)

type ClusterUsage

type ClusterUsage struct {
	Products map[string]ProductUsage `yaml:"products"`
}

func NewClustersUsage

func NewClustersUsage(usage string) (*ClusterUsage, error)

func (*ClusterUsage) AddRuntimeUsage

func (cu *ClusterUsage) AddRuntimeUsage(runtime v1alpha1.Runtime)

func (*ClusterUsage) DeleteRuntimeUsage

func (cu *ClusterUsage) DeleteRuntimeUsage(runtime v1alpha1.Runtime)

func (*ClusterUsage) GetAccountOwner

func (cu *ClusterUsage) GetAccountOwner(name string) string

GetAccountOwner will return the product id who is using account name, if account name is not used, it will return empty

type GetRuntimeResourceFunction

type GetRuntimeResourceFunction func(runtime v1alpha1.Runtime) (RuntimeResource, error)

type ListOption

type ListOption func(*listOptions)

func ExcludedRuntimes added in v0.4.2

func ExcludedRuntimes(runtimeNames []string) ListOption

type ProductUsage

type ProductUsage struct {
	Runtimes utils.StringSet `json:"runtimes"`
	Space    SpaceUsage      `json:"space"`
	Account  AccountUsage    `json:"account"`
}

func NewEmptyProductUsage

func NewEmptyProductUsage() ProductUsage

type RuntimeResource

type RuntimeResource struct {
	Spaces      utils.StringSet        `yaml:"spaces,omitempty"`
	Permissions []component.SecretInfo `yaml:"permissions,omitempty"`
}

type SpaceUsage added in v0.4.2

type SpaceUsage map[string]utils.StringSet

func (SpaceUsage) DeleteRuntime added in v0.4.2

func (su SpaceUsage) DeleteRuntime(runtimeName string)

func (SpaceUsage) ListSpaces added in v0.4.2

func (su SpaceUsage) ListSpaces(opts ...ListOption) utils.StringSet

func (SpaceUsage) UpdateSpaceUsage added in v0.4.2

func (su SpaceUsage) UpdateSpaceUsage(runtimeName string, spaces utils.StringSet)

Jump to

Keyboard shortcuts

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