config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpenMeteoAPIURL = "https://api.open-meteo.com/v1/forecast"
	GithubAPIURL    = "https://api.github.com/users"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type City

type City struct {
	Name      string
	Latitude  float64
	Longitude float64
}

type Config added in v0.1.1

type Config struct {
	Workflow struct {
		Version      string        `yaml:"version"`
		Name         string        `yaml:"name"`
		Description  string        `yaml:"description"`
		Integrations []Integration `yaml:"integrations"`
		Conversions  []Conversion  `yaml:"conversions"`
		Tasks        []Task        `yaml:"tasks"`
		Settings     Settings      `yaml:"settings"`
		Secrets      []Secret      `yaml:"secrets"`
		Monitoring   struct {
			Enable          bool              `yaml:"enable"`
			MetricsEndpoint string            `yaml:"metrics_endpoint"`
			AlertThresholds map[string]string `yaml:"alert_thresholds"`
		} `yaml:"monitoring"`
		Resources struct {
			CPULimit         string `yaml:"cpu_limit"`
			MemoryLimit      string `yaml:"memory_limit"`
			StorageLimit     string `yaml:"storage_limit"`
			ExecutionTimeout string `yaml:"execution_timeout"`
			MaxRetries       int    `yaml:"max_retries"`
		} `yaml:"resources"`
	} `yaml:"workflow"`
}

func ParseConfig added in v0.1.1

func ParseConfig(configPath string) (*Config, error)

func (*Config) Validate added in v0.1.1

func (c *Config) Validate() error

type Conversion added in v0.1.1

type Conversion struct {
	Name         string                 `yaml:"name"`
	InputFormat  string                 `yaml:"input_format"`
	OutputFormat string                 `yaml:"output_format"`
	Options      map[string]interface{} `yaml:"options"`
}

type Integration added in v0.1.1

type Integration struct {
	Name     string                 `yaml:"name"`
	Type     string                 `yaml:"type"`
	Provider string                 `yaml:"provider"`
	Mode     string                 `yaml:"mode"`
	Config   map[string]interface{} `yaml:"config"`
}

type Secret added in v0.1.1

type Secret struct {
	Name     string `yaml:"name"`
	Type     string `yaml:"type"`
	Provider string `yaml:"provider"`
	Path     string `yaml:"path"`
	Key      string `yaml:"key"`
	Version  string `yaml:"version"`
}

type SecretProvider added in v0.1.1

type SecretProvider string

SecretProvider enums

const (
	SecretProviderHashicorp SecretProvider = "hashicorp"
	SecretProviderAWS       SecretProvider = "aws"
	SecretProviderGCP       SecretProvider = "gcp"
	SecretProviderAzure     SecretProvider = "azure"
)

type Settings added in v0.1.1

type Settings struct {
	ParallelTasks int    `yaml:"parallel_tasks"`
	RetryAttempts int    `yaml:"retry_attempts"`
	LogLevel      string `yaml:"log_level"`
	TempDirectory string `yaml:"temp_directory"`
	MaxMemory     string `yaml:"max_memory"`
}

type Task added in v0.1.1

type Task struct {
	Name        string `yaml:"name"`
	Source      string `yaml:"source"`
	Destination string `yaml:"destination"`
	Conversion  string `yaml:"conversion"`
	Query       string `yaml:"query,omitempty"`
	FileName    string `yaml:"file_name,omitempty"`
}

Jump to

Keyboard shortcuts

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