v1

package
v0.42.1 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: Apache-2.0 Imports: 14 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PluralKindMap = map[Kind]string{
	KindDashboard:         "dashboards",
	KindDatasource:        "datasources",
	KindFolder:            "folders",
	KindGlobalDatasource:  "globaldatasources",
	KindGlobalRole:        "globalroles",
	KindGlobalRoleBinding: "globalrolebindings",
	KindGlobalSecret:      "globalsecrets",
	KindGlobalVariable:    "globalvariables",
	KindProject:           "projects",
	KindRole:              "roles",
	KindRoleBinding:       "rolebindings",
	KindSecret:            "secrets",
	KindUser:              "users",
	KindVariable:          "variables",
}

Functions

func FilterDatasource added in v0.11.0

func FilterDatasource[T DatasourceInterface](kind string, defaultDTS *bool, list []T) []T

func GetStruct

func GetStruct(kind Kind) (modelAPI.Entity, error)

GetStruct return a pointer to an empty struct that matches the kind passed as a parameter.

func IsBuiltinVariable added in v0.40.0

func IsBuiltinVariable(variableName string) bool

IsBuiltinVariable check if variable name is a builtin variable

func IsGlobal added in v0.42.0

func IsGlobal(kind Kind) bool

Types

type Dashboard

type Dashboard struct {
	Kind     Kind            `json:"kind" yaml:"kind"`
	Metadata ProjectMetadata `json:"metadata" yaml:"metadata"`
	Spec     DashboardSpec   `json:"spec" yaml:"spec"`
}

func (*Dashboard) GetKind

func (d *Dashboard) GetKind() string

func (*Dashboard) GetMetadata

func (d *Dashboard) GetMetadata() modelAPI.Metadata

func (*Dashboard) GetSpec added in v0.12.0

func (d *Dashboard) GetSpec() interface{}

func (*Dashboard) UnmarshalJSON

func (d *Dashboard) UnmarshalJSON(data []byte) error

func (*Dashboard) UnmarshalYAML

func (d *Dashboard) UnmarshalYAML(unmarshal func(interface{}) error) error

type DashboardSpec

type DashboardSpec struct {
	Display *common.Display `json:"display,omitempty" yaml:"display,omitempty"`
	// Datasources is an optional list of datasource definition.
	Datasources map[string]*DatasourceSpec `json:"datasources,omitempty" yaml:"datasources,omitempty"`
	Variables   []dashboard.Variable       `json:"variables,omitempty" yaml:"variables,omitempty"`
	Panels      map[string]*Panel          `json:"panels" yaml:"panels"`
	Layouts     []dashboard.Layout         `json:"layouts" yaml:"layouts"`
	// Duration is the default time range to use when getting data to fill the dashboard
	Duration model.Duration `json:"duration" yaml:"duration"`
	// RefreshInterval is the default refresh interval to use when landing on the dashboard
	RefreshInterval model.Duration `json:"refreshInterval,omitempty" yaml:"refreshInterval,omitempty"`
}

func (*DashboardSpec) UnmarshalJSON

func (d *DashboardSpec) UnmarshalJSON(data []byte) error

func (*DashboardSpec) UnmarshalYAML

func (d *DashboardSpec) UnmarshalYAML(unmarshal func(interface{}) error) error

type Datasource

type Datasource struct {
	Kind     Kind            `json:"kind" yaml:"kind"`
	Metadata ProjectMetadata `json:"metadata" yaml:"metadata"`
	Spec     DatasourceSpec  `json:"spec" yaml:"spec"`
}

Datasource will be the datasource you can define in your project/namespace This is a resource that won't be shared across projects. A Dashboard can use it only if it is in the same project.

func (*Datasource) GetDatasourceSpec added in v0.41.1

func (d *Datasource) GetDatasourceSpec() DatasourceSpec

func (*Datasource) GetKind

func (d *Datasource) GetKind() string

func (*Datasource) GetMetadata

func (d *Datasource) GetMetadata() modelAPI.Metadata

func (*Datasource) GetSpec added in v0.11.0

func (d *Datasource) GetSpec() interface{}

func (*Datasource) UnmarshalJSON

func (d *Datasource) UnmarshalJSON(data []byte) error

func (*Datasource) UnmarshalYAML

func (d *Datasource) UnmarshalYAML(unmarshal func(interface{}) error) error

type DatasourceInterface added in v0.11.0

type DatasourceInterface interface {
	GetMetadata() modelAPI.Metadata
	GetDatasourceSpec() DatasourceSpec
}

type DatasourceSpec

type DatasourceSpec struct {
	Display *common.Display `json:"display,omitempty" yaml:"display,omitempty"`
	Default bool            `json:"default" yaml:"default"`
	// Plugin will contain the datasource configuration.
	// The data typed is available in Cue.
	Plugin common.Plugin `json:"plugin" yaml:"plugin"`
}

type Folder

type Folder struct {
	Kind     Kind            `json:"kind" yaml:"kind"`
	Metadata ProjectMetadata `json:"metadata" yaml:"metadata"`
	Spec     []FolderSpec    `json:"spec" yaml:"spec"`
}

func (*Folder) GetKind

func (f *Folder) GetKind() string

func (*Folder) GetMetadata

func (f *Folder) GetMetadata() modelAPI.Metadata

func (*Folder) GetSpec added in v0.12.0

func (f *Folder) GetSpec() interface{}

func (*Folder) UnmarshalJSON

func (f *Folder) UnmarshalJSON(data []byte) error

func (*Folder) UnmarshalYAML

func (f *Folder) UnmarshalYAML(unmarshal func(interface{}) error) error

type FolderSpec

type FolderSpec struct {
	// Kind can only have two values: `Dashboard` or `Folder`
	Kind Kind `json:"kind" yaml:"kind"`
	// Name is the reference to the dashboard when `Kind` is equal to `Dashboard`.
	// When `Kind` is equal to `Folder`, then it's just the name of the folder
	Name string `json:"name" yaml:"name"`
	// Spec must only be set when 'Kind' is equal to 'Folder'.
	Spec []FolderSpec `json:"spec,omitempty" yaml:"spec,omitempty"`
}

func (*FolderSpec) UnmarshalJSON

func (f *FolderSpec) UnmarshalJSON(data []byte) error

func (*FolderSpec) UnmarshalYAML

func (f *FolderSpec) UnmarshalYAML(unmarshal func(interface{}) error) error

type GlobalDatasource

type GlobalDatasource struct {
	Kind     Kind           `json:"kind" yaml:"kind"`
	Metadata Metadata       `json:"metadata" yaml:"metadata"`
	Spec     DatasourceSpec `json:"spec" yaml:"spec"`
}

GlobalDatasource is the struct representing the datasource shared to everybody. Any Dashboard can reference it.

func (*GlobalDatasource) GetDatasourceSpec added in v0.41.1

func (d *GlobalDatasource) GetDatasourceSpec() DatasourceSpec

func (*GlobalDatasource) GetKind

func (d *GlobalDatasource) GetKind() string

func (*GlobalDatasource) GetMetadata

func (d *GlobalDatasource) GetMetadata() modelAPI.Metadata

func (*GlobalDatasource) GetSpec added in v0.11.0

func (d *GlobalDatasource) GetSpec() interface{}

func (*GlobalDatasource) UnmarshalJSON

func (d *GlobalDatasource) UnmarshalJSON(data []byte) error

func (*GlobalDatasource) UnmarshalYAML

func (d *GlobalDatasource) UnmarshalYAML(unmarshal func(interface{}) error) error

type GlobalRole added in v0.42.0

type GlobalRole struct {
	Kind     Kind     `json:"kind" yaml:"kind"`
	Metadata Metadata `json:"metadata" yaml:"metadata"`
	Spec     RoleSpec `json:"spec" yaml:"spec"`
}

GlobalRole is the struct representing the role shared to everybody.

func (*GlobalRole) GetKind added in v0.42.0

func (g *GlobalRole) GetKind() string

func (*GlobalRole) GetMetadata added in v0.42.0

func (g *GlobalRole) GetMetadata() modelAPI.Metadata

func (*GlobalRole) GetRoleSpec added in v0.42.0

func (g *GlobalRole) GetRoleSpec() RoleSpec

func (*GlobalRole) GetSpec added in v0.42.0

func (g *GlobalRole) GetSpec() interface{}

func (*GlobalRole) UnmarshalJSON added in v0.42.0

func (g *GlobalRole) UnmarshalJSON(data []byte) error

func (*GlobalRole) UnmarshalYAML added in v0.42.0

func (g *GlobalRole) UnmarshalYAML(unmarshal func(interface{}) error) error

type GlobalRoleBinding added in v0.42.0

type GlobalRoleBinding struct {
	Kind     Kind            `json:"kind" yaml:"kind"`
	Metadata Metadata        `json:"metadata" yaml:"metadata"`
	Spec     RoleBindingSpec `json:"spec" yaml:"spec"`
}

GlobalRoleBinding is the struct representing the roleBinding shared to everybody.

func (*GlobalRoleBinding) GetKind added in v0.42.0

func (g *GlobalRoleBinding) GetKind() string

func (*GlobalRoleBinding) GetMetadata added in v0.42.0

func (g *GlobalRoleBinding) GetMetadata() modelAPI.Metadata

func (*GlobalRoleBinding) GetRoleBindingSpec added in v0.42.0

func (g *GlobalRoleBinding) GetRoleBindingSpec() RoleBindingSpec

func (*GlobalRoleBinding) GetSpec added in v0.42.0

func (g *GlobalRoleBinding) GetSpec() interface{}

func (*GlobalRoleBinding) UnmarshalJSON added in v0.42.0

func (g *GlobalRoleBinding) UnmarshalJSON(data []byte) error

func (*GlobalRoleBinding) UnmarshalYAML added in v0.42.0

func (g *GlobalRoleBinding) UnmarshalYAML(unmarshal func(interface{}) error) error

type GlobalSecret added in v0.40.0

type GlobalSecret struct {
	Kind     Kind       `json:"kind" yaml:"kind"`
	Metadata Metadata   `json:"metadata" yaml:"metadata"`
	Spec     SecretSpec `json:"spec" yaml:"spec"`
}

func (*GlobalSecret) GetKind added in v0.40.0

func (g *GlobalSecret) GetKind() string

func (*GlobalSecret) GetMetadata added in v0.40.0

func (g *GlobalSecret) GetMetadata() modelAPI.Metadata

func (*GlobalSecret) GetSpec added in v0.40.0

func (g *GlobalSecret) GetSpec() interface{}

type GlobalVariable added in v0.31.0

type GlobalVariable struct {
	Kind     Kind         `json:"kind" yaml:"kind"`
	Metadata Metadata     `json:"metadata" yaml:"metadata"`
	Spec     VariableSpec `json:"spec" yaml:"spec"`
}

GlobalVariable is a global variable that be used everywhere regardless the project.

func (*GlobalVariable) GetKind added in v0.31.0

func (v *GlobalVariable) GetKind() string

func (*GlobalVariable) GetMetadata added in v0.31.0

func (v *GlobalVariable) GetMetadata() modelAPI.Metadata

func (*GlobalVariable) GetSpec added in v0.31.0

func (v *GlobalVariable) GetSpec() interface{}

func (*GlobalVariable) GetVarSpec added in v0.40.0

func (v *GlobalVariable) GetVarSpec() VariableSpec

type Health

type Health struct {
	BuildTime string `json:"buildTime"`
	Version   string `json:"version"`
	Commit    string `json:"commit"`
	Database  bool   `json:"database"`
}

Health is the struct that provides the health information of the API

type Kind

type Kind string
const (
	KindDashboard         Kind = "Dashboard"
	KindDatasource        Kind = "Datasource"
	KindFolder            Kind = "Folder"
	KindGlobalDatasource  Kind = "GlobalDatasource"
	KindGlobalRole        Kind = "GlobalRole"
	KindGlobalRoleBinding Kind = "GlobalRoleBinding"
	KindGlobalVariable    Kind = "GlobalVariable"
	KindGlobalSecret      Kind = "GlobalSecret"
	KindProject           Kind = "Project"
	KindRole              Kind = "Role"
	KindRoleBinding       Kind = "RoleBinding"
	KindSecret            Kind = "Secret"
	KindUser              Kind = "User"
	KindVariable          Kind = "Variable"
)

func GetKind added in v0.42.0

func GetKind(kind string) (*Kind, error)

GetKind parse string to Kind (not case-sensitive)

func (*Kind) UnmarshalJSON

func (k *Kind) UnmarshalJSON(data []byte) error

func (*Kind) UnmarshalYAML

func (k *Kind) UnmarshalYAML(unmarshal func(interface{}) error) error

type Metadata

type Metadata struct {
	Name      string    `json:"name" yaml:"name"`
	CreatedAt time.Time `json:"createdAt" yaml:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt" yaml:"updatedAt"`
	Version   uint64    `json:"version" yaml:"version"`
}

func NewMetadata added in v0.23.0

func NewMetadata(name string) *Metadata

func (*Metadata) CreateNow

func (m *Metadata) CreateNow()

func (*Metadata) GetName

func (m *Metadata) GetName() string

func (*Metadata) Update added in v0.5.0

func (m *Metadata) Update(previous Metadata)

type Panel added in v0.10.0

type Panel struct {
	Kind string    `json:"kind" yaml:"kind"`
	Spec PanelSpec `json:"spec" yaml:"spec"`
}

type PanelDisplay added in v0.40.0

type PanelDisplay struct {
	Name        string `json:"name" yaml:"name"`
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
}

func (*PanelDisplay) UnmarshalJSON added in v0.40.0

func (d *PanelDisplay) UnmarshalJSON(data []byte) error

func (*PanelDisplay) UnmarshalYAML added in v0.40.0

func (d *PanelDisplay) UnmarshalYAML(unmarshal func(interface{}) error) error

type PanelSpec added in v0.10.0

type PanelSpec struct {
	Display PanelDisplay  `json:"display" yaml:"display"`
	Plugin  common.Plugin `json:"plugin" yaml:"plugin"`
	Queries []Query       `json:"queries,omitempty" yaml:"queries,omitempty"`
}

type Project

type Project struct {
	Kind     Kind        `json:"kind" yaml:"kind"`
	Metadata Metadata    `json:"metadata" yaml:"metadata"`
	Spec     ProjectSpec `json:"spec,omitempty" yaml:"spec,omitempty"`
}

func (*Project) GetKind

func (p *Project) GetKind() string

func (*Project) GetMetadata

func (p *Project) GetMetadata() modelAPI.Metadata

func (*Project) GetSpec added in v0.12.0

func (p *Project) GetSpec() interface{}

func (*Project) UnmarshalJSON

func (p *Project) UnmarshalJSON(data []byte) error

func (*Project) UnmarshalYAML

func (p *Project) UnmarshalYAML(unmarshal func(interface{}) error) error

type ProjectMetadata

type ProjectMetadata struct {
	Metadata `json:",inline" yaml:",inline"`
	Project  string `json:"project" yaml:"project"`
}

ProjectMetadata is the metadata struct for resources that belongs to a project.

func NewProjectMetadata added in v0.23.0

func NewProjectMetadata(project string, name string) *ProjectMetadata

func (*ProjectMetadata) GetName

func (m *ProjectMetadata) GetName() string

func (*ProjectMetadata) Update added in v0.5.0

func (m *ProjectMetadata) Update(previous ProjectMetadata)

type ProjectSpec added in v0.12.0

type ProjectSpec struct {
}

type PublicGlobalSecret added in v0.40.0

type PublicGlobalSecret struct {
	Kind     Kind             `json:"kind" yaml:"kind"`
	Metadata Metadata         `json:"metadata" yaml:"metadata"`
	Spec     PublicSecretSpec `json:"spec" yaml:"spec"`
}

func NewPublicGlobalSecret added in v0.40.0

func NewPublicGlobalSecret(s *GlobalSecret) *PublicGlobalSecret

func (*PublicGlobalSecret) GetKind added in v0.40.0

func (g *PublicGlobalSecret) GetKind() string

func (*PublicGlobalSecret) GetMetadata added in v0.40.0

func (g *PublicGlobalSecret) GetMetadata() modelAPI.Metadata

func (*PublicGlobalSecret) GetSpec added in v0.40.0

func (g *PublicGlobalSecret) GetSpec() interface{}

type PublicSecret added in v0.40.0

type PublicSecret struct {
	Kind     Kind             `json:"kind" yaml:"kind"`
	Metadata ProjectMetadata  `json:"metadata" yaml:"metadata"`
	Spec     PublicSecretSpec `json:"spec" yaml:"spec"`
}

func NewPublicSecret added in v0.40.0

func NewPublicSecret(s *Secret) *PublicSecret

func (*PublicSecret) GetKind added in v0.40.0

func (s *PublicSecret) GetKind() string

func (*PublicSecret) GetMetadata added in v0.40.0

func (s *PublicSecret) GetMetadata() modelAPI.Metadata

func (*PublicSecret) GetSpec added in v0.40.0

func (s *PublicSecret) GetSpec() interface{}

type PublicSecretSpec added in v0.40.0

type PublicSecretSpec struct {
	BasicAuth *secret.PublicBasicAuth `json:"basicAuth,omitempty" yaml:"basicAuth,omitempty"`
	// The HTTP authorization credentials for the targets.
	Authorization *secret.PublicAuthorization `json:"authorization,omitempty" yaml:"authorization,omitempty"`
	// TLSConfig to use to connect to the targets.
	TLSConfig *secret.PublicTLSConfig `json:"tlsConfig,omitempty" yaml:"tlsConfig,omitempty"`
}

func NewPublicSecretSpec added in v0.40.0

func NewPublicSecretSpec(s SecretSpec) PublicSecretSpec

type PublicUser added in v0.42.0

type PublicUser struct {
	Kind     Kind           `json:"kind"`
	Metadata Metadata       `json:"metadata"`
	Spec     PublicUserSpec `json:"spec"`
}

func NewPublicUser added in v0.42.0

func NewPublicUser(u *User) *PublicUser

func (*PublicUser) GetKind added in v0.42.0

func (u *PublicUser) GetKind() string

func (*PublicUser) GetMetadata added in v0.42.0

func (u *PublicUser) GetMetadata() modelAPI.Metadata

func (*PublicUser) GetSpec added in v0.42.0

func (u *PublicUser) GetSpec() interface{}

type PublicUserSpec added in v0.42.0

type PublicUserSpec struct {
	FirstName string        `json:"firstName,omitempty" yaml:"firstName,omitempty"`
	LastName  string        `json:"lastName,omitempty" yaml:"lastName,omitempty"`
	Password  secret.Hidden `json:"password,omitempty" yaml:"password,omitempty"`
}

func NewPublicUserSpec added in v0.42.0

func NewPublicUserSpec(u UserSpec) PublicUserSpec

type Query added in v0.28.0

type Query struct {
	Kind string    `json:"kind" yaml:"kind"`
	Spec QuerySpec `json:"spec" yaml:"spec"`
}

type QuerySpec added in v0.28.0

type QuerySpec struct {
	Plugin common.Plugin `json:"plugin" yaml:"plugin"`
}

type Role added in v0.42.0

type Role struct {
	Kind     Kind            `json:"kind" yaml:"kind"`
	Metadata ProjectMetadata `json:"metadata" yaml:"metadata"`
	Spec     RoleSpec        `json:"spec" yaml:"spec"`
}

Role will be the role you can define in your project/namespace This is a resource that won't be shared across projects.

func (*Role) GetKind added in v0.42.0

func (r *Role) GetKind() string

func (*Role) GetMetadata added in v0.42.0

func (r *Role) GetMetadata() modelAPI.Metadata

func (*Role) GetSpec added in v0.42.0

func (r *Role) GetSpec() interface{}

func (*Role) UnmarshalJSON added in v0.42.0

func (r *Role) UnmarshalJSON(data []byte) error

func (*Role) UnmarshalYAML added in v0.42.0

func (r *Role) UnmarshalYAML(unmarshal func(interface{}) error) error

type RoleBinding added in v0.42.0

type RoleBinding struct {
	Kind     Kind            `json:"kind" yaml:"kind"`
	Metadata ProjectMetadata `json:"metadata" yaml:"metadata"`
	Spec     RoleBindingSpec `json:"spec" yaml:"spec"`
}

RoleBinding will be the roleBinding you can define in your project/namespace This is a resource that won't be shared across projects.

func (*RoleBinding) GetKind added in v0.42.0

func (r *RoleBinding) GetKind() string

func (*RoleBinding) GetMetadata added in v0.42.0

func (r *RoleBinding) GetMetadata() modelAPI.Metadata

func (*RoleBinding) GetSpec added in v0.42.0

func (r *RoleBinding) GetSpec() interface{}

func (*RoleBinding) UnmarshalJSON added in v0.42.0

func (r *RoleBinding) UnmarshalJSON(data []byte) error

func (*RoleBinding) UnmarshalYAML added in v0.42.0

func (r *RoleBinding) UnmarshalYAML(unmarshal func(interface{}) error) error

type RoleBindingInterface added in v0.42.0

type RoleBindingInterface interface {
	GetMetadata() modelAPI.Metadata
}

type RoleBindingSpec added in v0.42.0

type RoleBindingSpec struct {
	// Name of the Role or GlobalRole concerned by the role binding (metadata.name)
	Role string `json:"role" yaml:"role"`
	// Subjects that will inherit permissions from the role
	Subjects []Subject `json:"subjects" yaml:"subjects"`
}

func (*RoleBindingSpec) Has added in v0.42.0

func (r *RoleBindingSpec) Has(kind Kind, name string) bool

func (*RoleBindingSpec) UnmarshalJSON added in v0.42.0

func (r *RoleBindingSpec) UnmarshalJSON(data []byte) error

func (*RoleBindingSpec) UnmarshalYAML added in v0.42.0

func (r *RoleBindingSpec) UnmarshalYAML(unmarshal func(interface{}) error) error

type RoleInterface added in v0.42.0

type RoleInterface interface {
	GetMetadata() modelAPI.Metadata
}

type RoleSpec added in v0.42.0

type RoleSpec struct {
	// List of permissions owned by the role
	Permissions []role.Permission `json:"permissions" yaml:"permissions"`
}

type Secret added in v0.40.0

type Secret struct {
	Kind     Kind            `json:"kind" yaml:"kind"`
	Metadata ProjectMetadata `json:"metadata" yaml:"metadata"`
	Spec     SecretSpec      `json:"spec" yaml:"spec"`
}

func (*Secret) GetKind added in v0.40.0

func (s *Secret) GetKind() string

func (*Secret) GetMetadata added in v0.40.0

func (s *Secret) GetMetadata() modelAPI.Metadata

func (*Secret) GetSpec added in v0.40.0

func (s *Secret) GetSpec() interface{}

type SecretSpec added in v0.40.0

type SecretSpec struct {
	BasicAuth *secret.BasicAuth `json:"basicAuth,omitempty" yaml:"basicAuth,omitempty"`
	// The HTTP authorization credentials for the targets.
	Authorization *secret.Authorization `json:"authorization,omitempty" yaml:"authorization,omitempty"`
	// TLSConfig to use to connect to the targets.
	TLSConfig *secret.TLSConfig `json:"tlsConfig,omitempty" yaml:"tlsConfig,omitempty"`
}

func (*SecretSpec) UnmarshalJSON added in v0.40.0

func (s *SecretSpec) UnmarshalJSON(data []byte) error

func (*SecretSpec) UnmarshalYAML added in v0.40.0

func (s *SecretSpec) UnmarshalYAML(unmarshal func(interface{}) error) error

type Subject added in v0.42.0

type Subject struct {
	Kind Kind   `json:"kind" yaml:"kind"`
	Name string `json:"name" yaml:"name"`
}

func (*Subject) UnmarshalJSON added in v0.42.0

func (s *Subject) UnmarshalJSON(data []byte) error

func (*Subject) UnmarshalYAML added in v0.42.0

func (s *Subject) UnmarshalYAML(unmarshal func(interface{}) error) error

type User

type User struct {
	Kind     Kind     `json:"kind"`
	Metadata Metadata `json:"metadata"`
	Spec     UserSpec `json:"spec"`
}

func (*User) GetKind

func (u *User) GetKind() string

func (*User) GetMetadata

func (u *User) GetMetadata() modelAPI.Metadata

func (*User) GetSpec added in v0.42.0

func (u *User) GetSpec() interface{}

func (*User) UnmarshalJSON

func (u *User) UnmarshalJSON(data []byte) error

type UserSpec

type UserSpec struct {
	FirstName string `json:"firstName,omitempty" yaml:"firstName,omitempty"`
	LastName  string `json:"lastName,omitempty" yaml:"lastName,omitempty"`
	Password  string `json:"password,omitempty" yaml:"password,omitempty"`
}

type Variable added in v0.31.0

type Variable struct {
	Kind     Kind            `json:"kind" yaml:"kind"`
	Metadata ProjectMetadata `json:"metadata" yaml:"metadata"`
	Spec     VariableSpec    `json:"spec" yaml:"spec"`
}

Variable relates to variables defined at project level. If you are looking for variable defined at dashboard level, see dashboard.Variable

func (*Variable) GetKind added in v0.31.0

func (v *Variable) GetKind() string

func (*Variable) GetMetadata added in v0.31.0

func (v *Variable) GetMetadata() modelAPI.Metadata

func (*Variable) GetSpec added in v0.31.0

func (v *Variable) GetSpec() interface{}

func (*Variable) GetVarSpec added in v0.40.0

func (v *Variable) GetVarSpec() VariableSpec

type VariableInterface added in v0.40.0

type VariableInterface interface {
	GetMetadata() modelAPI.Metadata
	GetVarSpec() VariableSpec
}

type VariableSpec added in v0.31.0

type VariableSpec struct {
	// Kind is the type of the variable. Depending on the value of Kind, it will change the content of Spec.
	Kind variable.Kind `json:"kind" yaml:"kind"`
	Spec interface{}   `json:"spec" yaml:"spec"`
}

func (*VariableSpec) UnmarshalJSON added in v0.31.0

func (v *VariableSpec) UnmarshalJSON(data []byte) error

func (*VariableSpec) UnmarshalYAML added in v0.31.0

func (v *VariableSpec) UnmarshalYAML(unmarshal func(interface{}) error) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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