models

package
v0.0.0-...-cb74e61 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const (
	SSHKeyActivationNone = iota
	SSHKeyActivationMandatory
	SSHKeyActivationConditional
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BitriseConfigMap

type BitriseConfigMap map[string]string

type ConfigBuilderModel

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

ConfigBuilderModel ...

func NewDefaultConfigBuilder

func NewDefaultConfigBuilder() *ConfigBuilderModel

NewDefaultConfigBuilder ...

func (*ConfigBuilderModel) AppendStepListItemsTo

func (builder *ConfigBuilderModel) AppendStepListItemsTo(workflow WorkflowID, items ...bitriseModels.StepListItemModel)

AppendStepListItemsTo ...

func (*ConfigBuilderModel) Generate

func (builder *ConfigBuilderModel) Generate(projectType string, appEnvs ...envmanModels.EnvironmentItemModel) (bitriseModels.BitriseDataModel, error)

Generate ...

func (*ConfigBuilderModel) SetWorkflowDescriptionTo

func (builder *ConfigBuilderModel) SetWorkflowDescriptionTo(workflow WorkflowID, description string)

SetWorkflowDescriptionTo ...

func (*ConfigBuilderModel) SetWorkflowSummaryTo

func (builder *ConfigBuilderModel) SetWorkflowSummaryTo(workflow WorkflowID, summary string)

SetWorkflowSummaryTo ...

type ErrorWithRecommendations

type ErrorWithRecommendations struct {
	Error           string
	Recommendations step.Recommendation
}

type Errors

type Errors []string

type ErrorsWithRecommendations

type ErrorsWithRecommendations []ErrorWithRecommendations

type Icon

type Icon struct {
	Filename string
	Path     string
}

Icon is potential app icon. The name is unique (sha256 hash of relative path converted to string plus the original extension appended).

type Icons

type Icons []Icon

type OptionNode

type OptionNode struct {
	Title          string                 `json:"title,omitempty" yaml:"title,omitempty"`
	Summary        string                 `json:"summary,omitempty" yaml:"summary,omitempty"`
	EnvKey         string                 `json:"env_key,omitempty" yaml:"env_key,omitempty"`
	Type           Type                   `json:"type,omitempty" yaml:"type,omitempty"`
	ChildOptionMap map[string]*OptionNode `json:"value_map,omitempty" yaml:"value_map,omitempty"`
	// Leafs only
	Config string   `json:"config,omitempty" yaml:"config,omitempty"`
	Icons  []string `json:"icons,omitempty" yaml:"icons,omitempty"`

	Components []string    `json:"-" yaml:"-"`
	Head       *OptionNode `json:"-" yaml:"-"`
}

OptionNode ...

func NewConfigOption

func NewConfigOption(name string, icons []string) *OptionNode

NewConfigOption ...

func NewOption

func NewOption(title, summary, envKey string, optionType Type) *OptionNode

NewOption ...

func (*OptionNode) AddConfig

func (option *OptionNode) AddConfig(forValue string, newConfigOption *OptionNode)

AddConfig ...

func (*OptionNode) AddOption

func (option *OptionNode) AddOption(forValue string, newOption *OptionNode)

AddOption ...

func (*OptionNode) AttachToLastChilds

func (option *OptionNode) AttachToLastChilds(opt *OptionNode)

AttachToLastChilds ...

func (*OptionNode) Child

func (option *OptionNode) Child(components ...string) (*OptionNode, bool)

Child ...

func (*OptionNode) Copy

func (option *OptionNode) Copy() *OptionNode

Copy ...

func (*OptionNode) GetValues

func (option *OptionNode) GetValues() []string

GetValues ...

func (*OptionNode) IsConfigOption

func (option *OptionNode) IsConfigOption() bool

IsConfigOption ...

func (*OptionNode) IsEmpty

func (option *OptionNode) IsEmpty() bool

IsEmpty ...

func (*OptionNode) IsValueOption

func (option *OptionNode) IsValueOption() bool

IsValueOption ...

func (*OptionNode) LastChilds

func (option *OptionNode) LastChilds() []*OptionNode

LastChilds ...

func (*OptionNode) Parent

func (option *OptionNode) Parent() (*OptionNode, string, bool)

Parent ...

func (*OptionNode) RemoveConfigs

func (option *OptionNode) RemoveConfigs()

RemoveConfigs ...

func (*OptionNode) String

func (option *OptionNode) String() string

type SSHKeyActivation

type SSHKeyActivation int

type ScanResultModel

type ScanResultModel struct {
	ScannerToOptionRoot                  map[string]OptionNode                `json:"options,omitempty" yaml:"options,omitempty"`
	ScannerToBitriseConfigMap            map[string]BitriseConfigMap          `json:"configs,omitempty" yaml:"configs,omitempty"`
	ScannerToWarnings                    map[string]Warnings                  `json:"warnings,omitempty" yaml:"warnings,omitempty"`
	ScannerToErrors                      map[string]Errors                    `json:"errors,omitempty" yaml:"errors,omitempty"`
	ScannerToErrorsWithRecommendations   map[string]ErrorsWithRecommendations `json:"errors_with_recommendations,omitempty" yaml:"errors_with_recommendations,omitempty"`
	ScannerToWarningsWithRecommendations map[string]ErrorsWithRecommendations `json:"warnings_with_recommendations,omitempty" yaml:"warnings_with_recommendations,omitempty"`
	Icons                                []Icon                               `json:"-" yaml:"-"`
}

func (*ScanResultModel) AddErrorWithRecommendation

func (result *ScanResultModel) AddErrorWithRecommendation(platform string, recommendation ErrorWithRecommendations)

type Type

type Type string

Type is to select the user interaction type that is required to fill an option

const (
	// Originally:
	// - if there was only one key then this question was not asked
	// - if there was more than one keys then it was asked in a list to select from
	// Now, if this type is selected:
	// - if there is only one key then this question shall not not be asked
	// - if there are more than one keys then the selection must be asked in a list to select from
	TypeSelector Type = "selector"
	// Originally:
	// - if there was only one key then this question was not asked
	// - if there was more than one keys then it was asked in a list to select from
	// Now, if this type is selected:
	// - if there is only one key then the view should let the user select of the only item the list has or manual input
	// - if there are more than one keys then the selection must be asked in a list to select from or have a manual button to let the user to input anything else
	TypeOptionalSelector Type = "selector_optional"
	// Originally:
	// - if there was only one key and it's name was `_` then we shown an input field to the user to type his value in and it was a requirement to have an input value
	// Now, if this type is selected:
	// - we must show an input field to the user and it is required to fill, any name for the key will be the placeholder value for the input field
	TypeUserInput Type = "user_input"
	// Originally:
	// - if there was only one key and it's name was `_` then we shown an input field to the user to type his value in and it was a requirement to have an input value
	// Now, if this type is selected:
	// - we must show an input field to the user and it is NOT required to be filled, can be empty, and any name for the key will be the placeholder value for the input field
	TypeOptionalUserInput Type = "user_input_optional"

	// UserInputOptionDefaultValue can be used as a value (forValue) for adding a default new option to a TypeUserInput and TypeOptionalUserInput OptionNode via AddOption or AddConfig.
	UserInputOptionDefaultValue = ""
)

OptionTypes we currently support, list, user-input, optional-user-input

type Warnings

type Warnings []string

type WorkflowID

type WorkflowID string

WorkflowID ...

const (
	// PrimaryWorkflowID ...
	PrimaryWorkflowID WorkflowID = "primary"
	// DeployWorkflowID ...
	DeployWorkflowID WorkflowID = "deploy"

	// FormatVersion ...
	FormatVersion = bitriseModels.FormatVersion
)

Jump to

Keyboard shortcuts

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