models

package
v0.0.0-...-3592d1a Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: MIT Imports: 6 Imported by: 56

Documentation

Index

Constants

View Source
const (
	// DefaultIsExpand ...
	DefaultIsExpand = true
	// DefaultIsSensitive ...
	DefaultIsSensitive = false
	// DefaultSkipIfEmpty ...
	DefaultSkipIfEmpty = false

	// DefaultIsRequired ...
	DefaultIsRequired = false
	// DefaultIsDontChangeValue ...
	DefaultIsDontChangeValue = false
	// DefaultIsTemplate ...
	DefaultIsTemplate = false
	// DefaultUnset ...
	DefaultUnset = false
)
View Source
const (
	// OptionsKey ...
	OptionsKey = "opts"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EnvironmentItemModel

type EnvironmentItemModel map[string]interface{}

EnvironmentItemModel ...

func (EnvironmentItemModel) FillMissingDefaults

func (env EnvironmentItemModel) FillMissingDefaults() error

func (EnvironmentItemModel) GetKeyValuePair

func (env EnvironmentItemModel) GetKeyValuePair() (string, string, error)

func (EnvironmentItemModel) GetKeyValuePairWithType

func (env EnvironmentItemModel) GetKeyValuePairWithType() (string, interface{}, error)

func (EnvironmentItemModel) GetOptions

func (EnvironmentItemModel) Normalize

func (env EnvironmentItemModel) Normalize() error

func (EnvironmentItemModel) NormalizeValidateFillDefaults

func (env EnvironmentItemModel) NormalizeValidateFillDefaults() error

func (EnvironmentItemModel) Validate

func (env EnvironmentItemModel) Validate() error

type EnvironmentItemOptionsModel

type EnvironmentItemOptionsModel struct {
	// These fields are processed by envman at envman run
	IsExpand    *bool `json:"is_expand,omitempty" yaml:"is_expand,omitempty"`
	SkipIfEmpty *bool `json:"skip_if_empty,omitempty" yaml:"skip_if_empty,omitempty"`
	// These fields used only by bitrise
	Title             *string  `json:"title,omitempty" yaml:"title,omitempty"`
	Description       *string  `json:"description,omitempty" yaml:"description,omitempty"`
	Summary           *string  `json:"summary,omitempty" yaml:"summary,omitempty"`
	Category          *string  `json:"category,omitempty" yaml:"category,omitempty"`
	ValueOptions      []string `json:"value_options,omitempty" yaml:"value_options,omitempty"`
	IsRequired        *bool    `json:"is_required,omitempty" yaml:"is_required,omitempty"`
	IsDontChangeValue *bool    `json:"is_dont_change_value,omitempty" yaml:"is_dont_change_value,omitempty"`
	IsTemplate        *bool    `json:"is_template,omitempty" yaml:"is_template,omitempty"`
	IsSensitive       *bool    `json:"is_sensitive,omitempty" yaml:"is_sensitive,omitempty"`
	Unset             *bool    `json:"unset,omitempty" yaml:"unset,omitempty"`
	//
	Meta map[string]interface{} `json:"meta,omitempty" yaml:"meta,omitempty"`
}

EnvironmentItemOptionsModel ...

func (*EnvironmentItemOptionsModel) ParseFromInterfaceMap

func (envSerModel *EnvironmentItemOptionsModel) ParseFromInterfaceMap(input map[string]interface{}) error

type EnvsJSONListModel

type EnvsJSONListModel map[string]string

EnvsJSONListModel ...

func NewEnvJSONList

func NewEnvJSONList(jsonStr string) (EnvsJSONListModel, error)

type EnvsSerializeModel

type EnvsSerializeModel struct {
	Envs []EnvironmentItemModel `json:"envs" yaml:"envs"`
}

EnvsSerializeModel ...

func (*EnvsSerializeModel) Normalize

func (envsSerializeObj *EnvsSerializeModel) Normalize() error

Normalize - if successful this makes the model JSON serializable. Without this, if the object was created with e.g. a YAML parser, the type of `opts` might be a map[interface]interface, which is not JSON serializable. After this call it's ensured that the type of objects is map[string]interface, which is JSON serializable.

Jump to

Keyboard shortcuts

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