Documentation ¶
Index ¶
- func GetSourceImage(component Component) (string, error)
- func IsExternal(component Component) bool
- func SaveArtifact(data []byte, targetPath, name string) error
- type Answers
- type ArtifactEntry
- type Base
- func (b *Base) AnswersDir() string
- func (b *Base) App() string
- func (b *Base) CheckAllArtifacts()
- func (b *Base) CheckComponentArtifacts(c Component) []string
- func (b *Base) CheckSpecVersion() error
- func (b *Base) GetExternallAppDirectory(c Component) string
- func (b *Base) Install() error
- func (b *Base) InstallDependencies() error
- func (b *Base) LoadAnswers() error
- func (b *Base) ReadMainFile() error
- func (b *Base) Run(ask bool, answersFile string)
- func (b *Base) Stop()
- func (b *Base) Target() string
- func (b *Base) WriteAnswersSample() error
- type Component
- type Constraint
- type Mainfile
- type Param
- type SrcControlRepo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSourceImage ¶
GetSourceImage fetches the sanitized source path of the image
func IsExternal ¶
IsExternal returns true if the component is an external resource, and false if the component is A local resource
func SaveArtifact ¶
SaveArtifact writes a templated artifact to the .workdir directory. If .workdir does not exist, it is created. data - a []byte of the templated file name - the name of the file to write to
Types ¶
type ArtifactEntry ¶
type ArtifactEntry struct { Path string Repo SrcControlRepo }
ArtifactEntry is a source control repository struct used to specify an artifact
func (*ArtifactEntry) SetYAML ¶
func (a *ArtifactEntry) SetYAML(tag string, value interface{}) bool
SetYAML is implemented by v1 of the go-yaml package. This method is invoked when go-yaml attempts to parse an ArtifactEntry via Unmarshal() Because of the way that Nulecule specifies an artifact, we have to define our own rules for parsing Artifact structs. An artifact contains either a Source Control Repository object or a URL. The former is represented as a structured set of parameters, while the latter is represneted as an unlabeled string. Therefore, because an artifact entry can be either a struct or an unlabeled string (and the parser is not smart enough to know how to deal with this), we must do it ourselves.
type Base ¶
type Base struct { AnswersData map[string]Answers MainfileData *Mainfile Nodeps bool DryRun bool AppPath string WriteSampleAnswers bool // contains filtered or unexported fields }
Base contains a set of nulecule config properties It is set by the atomicapp subcommands
func (*Base) AnswersDir ¶
AnswersDir returns the base directory in which the answers file lives
func (*Base) CheckAllArtifacts ¶
func (b *Base) CheckAllArtifacts()
CheckAllArtifacts will iterate through each entry in graph and check for validity
func (*Base) CheckComponentArtifacts ¶
CheckComponentArtifacts will verify that valid artifacts exist for each provider in the component
func (*Base) CheckSpecVersion ¶
CheckSpecVersion verifies that a proper spec version has been provided
func (*Base) GetExternallAppDirectory ¶
GetExternallAppDirectory returns the directory in which an external app is installed to
func (*Base) InstallDependencies ¶
InstallDependencies install all external sources
func (*Base) LoadAnswers ¶
LoadAnswers Unmarshals the answers from the answers.conf file into the base AnswersData
func (*Base) ReadMainFile ¶
ReadMainFile will read the Nulecule file and fill the MainfileData field
func (*Base) Stop ¶
func (b *Base) Stop()
Stop starts the nulecule run process to undeploy a clustered application
func (*Base) WriteAnswersSample ¶
WriteAnswersSample creates a new answers.conf.sample file to update to
type Component ¶
type Component struct { Name string Source string Params []Param Artifacts map[string][]ArtifactEntry }
Component represents a graph item of the Nulecule file
type Constraint ¶
type Constraint struct { AllowedPattern string `json:"allowed_pattern",yaml:"allowed_pattern"` Description string }
Constraint is a struct representing a constaint for a parameter object