model

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrProjectNameIsEmpty   = errors.New("project name can not be empty")
	ErrProjectURLIsNotValid = errors.New("project url invalid")
)
View Source
var ErrMissingField = errors.New("all fields should be provided")

Functions

This section is empty.

Types

type Choice

type Choice struct {
	Choice    string `yaml:"choice"`
	Resources `yaml:",inline"`
}

func (*Choice) String

func (o *Choice) String() string

type ErrCanSelectMultiple

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

func (ErrCanSelectMultiple) Error

func (e ErrCanSelectMultiple) Error() string

type ErrCanSkip

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

func (ErrCanSkip) Error

func (e ErrCanSkip) Error() string

type ErrEmptyChoice

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

func (ErrEmptyChoice) Error

func (e ErrEmptyChoice) Error() string

type ErrEmptyFileAndDependency

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

func (ErrEmptyFileAndDependency) Error

type ErrEmptyFileField

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

func (ErrEmptyFileField) Error

func (e ErrEmptyFileField) Error() string

type ErrEmptyQuestionField

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

func (ErrEmptyQuestionField) Error

func (e ErrEmptyQuestionField) Error() string

type ErrEmptyUrlAndContent

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

func (ErrEmptyUrlAndContent) Error

func (e ErrEmptyUrlAndContent) Error() string

type ErrInvalidURLFile

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

func (ErrInvalidURLFile) Error

func (e ErrInvalidURLFile) Error() string

type ErrMultipleFieldUrlAndContent

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

func (ErrMultipleFieldUrlAndContent) Error

type ErrWrongDelimiterFormat added in v1.6.0

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

func (ErrWrongDelimiterFormat) Error added in v1.6.0

func (e ErrWrongDelimiterFormat) Error() string

type ErrWrongDependencyFormat added in v1.2.0

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

func (ErrWrongDependencyFormat) Error added in v1.2.0

func (e ErrWrongDependencyFormat) Error() string

type File

type File struct {
	Url          string `yaml:"url"`
	Content      string `yaml:"content"`
	PathFromRoot string `yaml:"pathFromRoot"`
}

type ProjectStructureData

type ProjectStructureData struct {
	Resources  `yaml:",inline"`
	Name       string      `yaml:"name"`
	Reference  string      `yaml:"reference"`
	URL        string      `yaml:"url"`
	Branch     string      `yaml:"branch"`
	Questions  []*Question `yaml:"questions"`
	Language   string      `yaml:"language"`
	Delimiters string      `yaml:"delimiters"`
}

func (*ProjectStructureData) IsValid

func (p *ProjectStructureData) IsValid() error

func (*ProjectStructureData) String

func (p *ProjectStructureData) String() string

type Question

type Question struct {
	Direction         string    `yaml:"direction"`
	CanSkip           bool      `yaml:"canSkip"`
	CanSelectMultiple bool      `yaml:"canSelectMultiple"`
	Choices           []*Choice `yaml:"choices"`
}

type Requirement

type Requirement interface {
	AskForInput() ([]Task, []Requirement, error)
}

type Resources added in v1.9.0

type Resources struct {
	Dependencies []any          `yaml:"dependencies"`
	Files        []*File        `yaml:"files"`
	Values       map[string]any `yaml:"values"`
	CustomValues map[string]any `yaml:"customValues"`
}

type Task

type Task interface {
	Complete() error
}

Jump to

Keyboard shortcuts

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