tenant

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EntityProject = "project"

	ProjectStoragePathKey   = "STORAGE_PATH"
	ProjectSchedulerHost    = "SCHEDULER_HOST"
	ProjectSchedulerVersion = "SCHEDULER_VERSION"
)
View Source
const (
	EntitySecret = "secret"

	SecretStorageKey    = "STORAGE"
	SecretSchedulerAuth = "SCHEDULER_AUTH"
	SecretNotifySlack   = "NOTIFY_SLACK"
)
View Source
const EntityNamespace = "namespace"
View Source
const EntityTenant = "tenant"

Variables

This section is empty.

Functions

This section is empty.

Types

type Namespace

type Namespace struct {
	// contains filtered or unexported fields
}

func NewNamespace

func NewNamespace(name string, projName ProjectName, config map[string]string) (*Namespace, error)

func (*Namespace) GetConfig

func (n *Namespace) GetConfig(key string) (string, error)

func (*Namespace) GetConfigs

func (n *Namespace) GetConfigs() map[string]string

GetConfigs returns a clone on project configurations

func (*Namespace) Name

func (n *Namespace) Name() NamespaceName

func (*Namespace) ProjectName

func (n *Namespace) ProjectName() ProjectName

type NamespaceName

type NamespaceName string

func NamespaceNameFrom

func NamespaceNameFrom(name string) (NamespaceName, error)

func (NamespaceName) String

func (n NamespaceName) String() string

type PlainTextSecret

type PlainTextSecret struct {
	// contains filtered or unexported fields
}

func NewPlainTextSecret

func NewPlainTextSecret(name, value string) (*PlainTextSecret, error)

func (*PlainTextSecret) Name

func (p *PlainTextSecret) Name() SecretName

func (*PlainTextSecret) Value

func (p *PlainTextSecret) Value() string

type PlainTextSecrets

type PlainTextSecrets []*PlainTextSecret

func (PlainTextSecrets) ToSecretMap added in v0.9.0

func (p PlainTextSecrets) ToSecretMap() SecretMap

type Preset added in v0.10.0

type Preset struct {
	// contains filtered or unexported fields
}

func NewPreset added in v0.10.0

func NewPreset(name, description, size, shiftBy, location, truncateTo string) (Preset, error)

func NewPresetWithConfig added in v0.11.0

func NewPresetWithConfig(name, description string, conf window.SimpleConfig) Preset

func (Preset) Config added in v0.11.0

func (p Preset) Config() window.SimpleConfig

func (Preset) Description added in v0.10.0

func (p Preset) Description() string

func (Preset) Equal added in v0.10.0

func (p Preset) Equal(incoming Preset) bool

func (Preset) Name added in v0.10.0

func (p Preset) Name() string

type Project

type Project struct {
	// contains filtered or unexported fields
}

func NewProject

func NewProject(name string, config map[string]string) (*Project, error)

func (*Project) GetConfig

func (p *Project) GetConfig(key string) (string, error)

func (*Project) GetConfigs

func (p *Project) GetConfigs() map[string]string

GetConfigs returns a clone of project configurations

func (*Project) GetPreset added in v0.10.0

func (p *Project) GetPreset(name string) (Preset, error)

func (*Project) GetPresets added in v0.10.0

func (p *Project) GetPresets() map[string]Preset

func (*Project) Name

func (p *Project) Name() ProjectName

func (*Project) SetPresets added in v0.10.0

func (p *Project) SetPresets(presets map[string]Preset)

type ProjectName

type ProjectName string

func ProjectNameFrom

func ProjectNameFrom(name string) (ProjectName, error)

func (ProjectName) String

func (pn ProjectName) String() string

type Secret

type Secret struct {
	// contains filtered or unexported fields
}

func NewSecret

func NewSecret(name, encodedValue string, projName ProjectName, nsName string) (*Secret, error)

func (*Secret) EncodedValue

func (s *Secret) EncodedValue() string

func (*Secret) Name

func (s *Secret) Name() SecretName

func (*Secret) NamespaceName

func (s *Secret) NamespaceName() string

func (*Secret) ProjectName

func (s *Secret) ProjectName() ProjectName

type SecretMap added in v0.9.0

type SecretMap map[string]string

func (SecretMap) Get added in v0.9.0

func (s SecretMap) Get(secretName string) (string, error)

func (SecretMap) ToMap added in v0.9.0

func (s SecretMap) ToMap() map[string]string

type SecretName

type SecretName string

func SecretNameFrom

func SecretNameFrom(name string) (SecretName, error)

func (SecretName) String

func (sn SecretName) String() string

type Tenant

type Tenant struct {
	// contains filtered or unexported fields
}

func NewTenant

func NewTenant(projectName, namespaceName string) (Tenant, error)

func (Tenant) IsInvalid

func (t Tenant) IsInvalid() bool

func (Tenant) NamespaceName

func (t Tenant) NamespaceName() NamespaceName

func (Tenant) ProjectName

func (t Tenant) ProjectName() ProjectName

type WithDetails

type WithDetails struct {
	// contains filtered or unexported fields
}

func NewTenantDetails

func NewTenantDetails(proj *Project, namespace *Namespace, secrets PlainTextSecrets) (*WithDetails, error)

func (*WithDetails) GetConfig

func (w *WithDetails) GetConfig(key string) (string, error)

func (*WithDetails) GetConfigs

func (w *WithDetails) GetConfigs() map[string]string

func (*WithDetails) Namespace

func (w *WithDetails) Namespace() *Namespace

func (*WithDetails) Project

func (w *WithDetails) Project() *Project

func (*WithDetails) SecretsMap

func (w *WithDetails) SecretsMap() map[string]string

func (*WithDetails) ToTenant

func (w *WithDetails) ToTenant() Tenant

Directories

Path Synopsis
handler

Jump to

Keyboard shortcuts

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