tenco

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2021 License: MIT Imports: 9 Imported by: 0

README

tenco

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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 map[string]interface{} `yaml:"cloudwatch_event_target"`
	IsEnabled             bool                   `yaml:"is_enabled"`
}

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 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 added in v0.2.0

type JSONGenerator struct {
}

func (*JSONGenerator) Generate added in v0.2.0

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 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 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