models

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const HiddenValue = "hidden-value"
View Source
const UndefinedValue = "undefined-variable-value"

Variables

View Source
var IdentifiersList []IdentifierType

Functions

func GetInterfacedValue added in v0.6.25

func GetInterfacedValue(input string) interface{}

Types

type AttributeType

type AttributeType string
const (
	Global AttributeType = "Global"
)

type AttributeValue

type AttributeValue struct {
	VariableValue   VariableValue             `json:"variableValue" validate:"required,dive"`
	AttributeType   AttributeType             `json:"attributeType" validate:"oneof=Global"`
	AttributeParams map[IdentifierType]string `json:"attributeParams"`
}

type DataType

type DataType string
const (
	YAML_TYPE      DataType = "yaml"
	JSON_TYPE      DataType = "json"
	PRIMITIVE_TYPE DataType = "primitive"
)

type Definition

type Definition struct {
	VarName          string       `json:"varName" validate:"required"`
	DataType         DataType     `json:"dataType" validate:"oneof=json yaml primitive"`
	VarType          VariableType `json:"varType" validate:"oneof=private public"`
	Description      string       `json:"description" validate:"max=300"`
	ShortDescription string       `json:"shortDescription"`
}

type IdentifierType

type IdentifierType string

type Payload

type Payload struct {
	Variables []*Variables `json:"variables" validate:"required,dive"`
	UserId    int32        `json:"-"`
}

type ScopedVariableData

type ScopedVariableData struct {
	VariableName     string         `json:"variableName"`
	ShortDescription string         `json:"shortDescription"`
	VariableValue    *VariableValue `json:"variableValue,omitempty"`
	IsRedacted       bool           `json:"isRedacted"`
}

type ScopedVariableManifest

type ScopedVariableManifest struct {
	ApiVersion string         `json:"apiVersion" validate:"oneof=devtron.ai/v1beta1"`
	Kind       string         `json:"kind" validate:"oneof=Variable"`
	Spec       []VariableSpec `json:"spec" validate:"required,dive"`
}

type Selector

type Selector struct {
	AttributeSelectors map[IdentifierType]string `json:"attributeSelectors"`
}

type ValidationError

type ValidationError struct {
	Err error
}

func (ValidationError) Error

func (err ValidationError) Error() string

func (*ValidationError) Unwrap

func (err *ValidationError) Unwrap() error

type VariableRequest

type VariableRequest struct {
	Manifest ScopedVariableManifest `json:"manifest"`
	UserId   int32                  `json:"-"`
}

type VariableScope added in v0.6.24

type VariableScope struct {
	*resourceQualifiers.ResourceMappingSelection
	Data string
	// contains filtered or unexported fields
}

type VariableScopeMapping

type VariableScopeMapping struct {
	ScopeId int
}

type VariableSpec

type VariableSpec struct {
	Notes            string              `json:"notes"`
	ShortDescription string              `json:"shortDescription" validate:"max=120"`
	IsSensitive      bool                `json:"isSensitive"`
	Name             string              `json:"name" validate:"required"`
	Values           []VariableValueSpec `json:"values" validate:"dive"`
}

type VariableType

type VariableType string
const (
	PRIVATE VariableType = "private"
	PUBLIC  VariableType = "public"
)

func (VariableType) IsTypeSensitive

func (variableType VariableType) IsTypeSensitive() bool

type VariableValue

type VariableValue struct {
	Value interface{} `json:"value" validate:"required"`
}

func (VariableValue) StringValue

func (value VariableValue) StringValue() string

type VariableValueSpec

type VariableValueSpec struct {
	Category  AttributeType `json:"category" validate:"oneof=Global"`
	Value     interface{}   `json:"value" validate:"required"`
	Selectors *Selector     `json:"selectors,omitempty"`
}

type Variables

type Variables struct {
	Definition      Definition       `json:"definition" validate:"required,dive"`
	AttributeValues []AttributeValue `json:"attributeValue" validate:"dive" `
}

Jump to

Keyboard shortcuts

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