config

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package config models the configuration file for Amplify

Index

Constants

View Source
const (
	LogLevelFlag   = "log-level"
	ConfigPathFlag = "config"
	PortFlag       = "port"
)

Define all global flag names

Variables

This section is empty.

Functions

func AddGlobalFlags

func AddGlobalFlags(cmd *cobra.Command)

func InitViper

func InitViper(cmd *cobra.Command) (*viper.Viper, error)

Types

type AppConfig

type AppConfig struct {
	LogLevel   zerolog.Level `yaml:"log-level"`
	ConfigPath string        `yaml:"config-path"`
	Port       int           `yaml:"port"`
}

func ParseAppConfig

func ParseAppConfig(cmd *cobra.Command) *AppConfig

type Config

type Config struct {
	Jobs     []Job           `yaml:"jobs"`
	Nodes    []Node          `yaml:"nodes"`
	Workflow WorkflowOptions `yaml:"workflow"`
}

func GetConfig

func GetConfig(path string) (*Config, error)

type Job

type Job struct {
	ID         string   `yaml:"id"`
	Image      string   `yaml:"image"`
	Entrypoint []string `yaml:"entrypoint"`
}

type Node

type Node struct {
	ID      string       `yaml:"id"`
	JobID   string       `yaml:"job_id"`
	Inputs  []NodeInput  `yaml:"inputs"`
	Outputs []NodeOutput `yaml:"outputs"`
}

type NodeInput

type NodeInput struct {
	Root     bool   `yaml:"root"`
	StepID   string `yaml:"step_id"`
	OutputId string `yaml:"output_id"`
	Path     string `yaml:"path"`
}

type NodeOutput

type NodeOutput struct {
	ID   string `yaml:"id"`
	Path string `yaml:"path"`
}

type WorkflowOptions

type WorkflowOptions struct {
	DisableDerivative bool   `yaml:"disable_derivative"`
	DerivativeJobName string `yaml:"derivative_job_name"`
}

Jump to

Keyboard shortcuts

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