persistence

package
v2.9.2 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const GroupProjectType = "grouping"
View Source
const SimpleProjectType = "simple"

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Name        string `yaml:"name"`
	AccountUUID string `yaml:"accountUUID"`
	ApiUrl      *Url   `yaml:"apiUrl,omitempty"`
	OAuth       OAuth  `yaml:"oAuth"`
}

type Auth

type Auth struct {
	Token AuthSecret `yaml:"token"`
	OAuth *OAuth     `yaml:"oAuth,omitempty"`
}

type AuthSecret

type AuthSecret struct {
	Type SecretType `yaml:"type"`
	Name string     `yaml:"name"`
}

AuthSecret represents a user-defined client id or client secret. It has a [Type] which is TypeEnvironment (default). Secrets must never be provided as plain text, but always loaded from somewhere else. Currently, loading is only allowed from environment variables.

[Name] contains the environment-variable to resolve the authSecret.

This struct is meant to be reused for fields that require the same behavior.

type Environment

type Environment struct {
	Name string `yaml:"name"`
	URL  Url    `yaml:"url"`

	// Auth contains all authentication related information
	Auth Auth `yaml:"auth,omitempty"`
}

type Group

type Group struct {
	Name         string        `yaml:"name"`
	Environments []Environment `yaml:"environments"`
}

type Manifest

type Manifest struct {
	ManifestVersion   string    `yaml:"manifestVersion"`
	Projects          []Project `yaml:"projects"`
	EnvironmentGroups []Group   `yaml:"environmentGroups"`
	Accounts          []Account `yaml:"accounts,omitempty"`
}

type OAuth

type OAuth struct {
	ClientID      AuthSecret `yaml:"clientId"`
	ClientSecret  AuthSecret `yaml:"clientSecret"`
	TokenEndpoint *Url       `yaml:"tokenEndpoint,omitempty"`
}

type Project

type Project struct {
	Name string `yaml:"name"`
	Type string `yaml:"type,omitempty"`
	Path string `yaml:"path,omitempty"`
}

type SecretType

type SecretType string
const TypeEnvironment SecretType = "environment"

type Url

type Url struct {
	Type  UrlType `yaml:"type,omitempty"`
	Value string  `yaml:"value"`
}

type UrlType

type UrlType string
const (
	UrlTypeEnvironment UrlType = "environment"
	UrlTypeValue       UrlType = "value"
)

Jump to

Keyboard shortcuts

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