tenco

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2020 License: MIT Imports: 8 Imported by: 0

README

tenco

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudwatchEventTarget

type CloudwatchEventTarget struct {
	Arn       string    `yaml:"arn"        json:"arn"`
	Rule      string    `yaml:"-"          json:"rule"`
	RoleArn   string    `yaml:"role_arn"   json:"role_arn"`
	ECSTarget ECSTarget `yaml:"ecs_target" json:"ecs_target"`
}

type Config

type Config struct {
	Events []*ConfigEvent `yaml:"events"`
}

type ConfigEvent

type ConfigEvent struct {
	Name                  string                `yaml:"name"`
	Description           string                `yaml:"description"`
	Schedule              Schedule              `yaml:"schedule"`
	CloudwatchEventTarget CloudwatchEventTarget `yaml:"cloudwatch_event_target"`
	ContainerOverrides    []ContainerOverride   `yaml:"container_overrides"`
	IsEnabled             bool                  `yaml:"is_enabled"`
}

func (ConfigEvent) ContainerOverridesWithEnv

func (c ConfigEvent) ContainerOverridesWithEnv(addEnvs []Environment) []ContainerOverride

type ContainerOverride

type ContainerOverride struct {
	Name        string        `json:"name"`
	Command     []string      `json:"command"`
	Environment []Environment `json:"environment"`
}

func (*ContainerOverride) UnmarshalYAML

func (c *ContainerOverride) UnmarshalYAML(unmarshal func(interface{}) error) error

type CronExpr

type CronExpr struct {
	Minutes   string
	Hours     [][]int
	DayOfWeek int
}

func (CronExpr) String

func (c CronExpr) String() string

type DayOfWeek

type DayOfWeek int

type DayOfWeeks

type DayOfWeeks []DayOfWeek

func (*DayOfWeeks) UnmarshalYAML

func (ws *DayOfWeeks) UnmarshalYAML(unmarshal func(interface{}) error) error

type ECSTarget

type ECSTarget struct {
	LaunchType           string               `yaml:"launch_type"           json:"launch_type"`
	PlatformVersion      string               `yaml:"platform_version"      json:"platform_version"`
	TaskDefinitionArn    string               `yaml:"task_definition_arn"   json:"task_definition_arn"`
	NetworkConfiguration NetworkConfiguration `yaml:"network_configuration" json:"network_configuration"`
}

type Environment

type Environment struct {
	Name  string `yaml:"name"  json:"name"`
	Value string `yaml:"value" json:"value"`
}

type Generator

type Generator interface {
	Generate(w io.Writer, conf Config, offset int) error
}

type Hour

type Hour int

type Hours

type Hours []Hour

func (*Hours) UnmarshalYAML

func (hs *Hours) UnmarshalYAML(unmarshal func(interface{}) error) error

type JsonGenerator

type JsonGenerator struct {
}

func (*JsonGenerator) Generate

func (g *JsonGenerator) Generate(w io.Writer, conf Config, offset int) error

type Minutes

type Minutes string

func (*Minutes) UnmarshalYAML

func (ms *Minutes) UnmarshalYAML(unmarshal func(interface{}) error) error

type NetworkConfiguration

type NetworkConfiguration struct {
	Subnets        *StringWithArray `yaml:"subnets"          json:"subnets"`
	SecurityGroups *StringWithArray `yaml:"security_groups"  json:"security_groups"`
	AssignPublicIP bool             `yaml:"assign_public_ip" json:"assign_public_ip"`
}

type OrigSchedule

type OrigSchedule struct {
	Minutes    string `yaml:"minutes"`
	Hours      string `yaml:"hours"`
	DayOfWeeks string `yaml:"day_of_weeks"`
}

func (OrigSchedule) String

func (o OrigSchedule) String() string

type Schedule

type Schedule struct {
	Minutes      Minutes
	Hours        Hours
	DayOfWeeks   DayOfWeeks
	OrigSchedule OrigSchedule
}

func (*Schedule) CronExprs

func (s *Schedule) CronExprs(offset int) []CronExpr

func (*Schedule) UnmarshalYAML

func (s *Schedule) UnmarshalYAML(unmarshal func(interface{}) error) error

type StringWithArray

type StringWithArray struct {
	String string
	Array  []string
}

func (*StringWithArray) MarshalJSON

func (s *StringWithArray) MarshalJSON() ([]byte, error)

func (*StringWithArray) UnmarshalYAML

func (s *StringWithArray) UnmarshalYAML(unmarshal func(interface{}) error) error

type Tenco

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

func Load

func Load(confs ...string) (*Tenco, error)

func LoadWithEnv

func LoadWithEnv(confs ...string) (*Tenco, error)

func (*Tenco) Write

func (t *Tenco) Write(w io.Writer, offset int, g Generator) error

Directories

Path Synopsis
cmd
tenco command

Jump to

Keyboard shortcuts

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