rules2cron

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2022 License: MIT Imports: 14 Imported by: 0

README

rules2cron

Documentation Latest GitHub release Github Actions test License

cron-like notation converter for ScheduleExpression in EventBridge's Rule

Usage

For example, use with github.com/takumakanari/cronv

$ rules2cron -tz JST -show-disabled | cronv -o ./my_event_bridge_schedule_rules.html -d 24h
Install
Homebrew (macOS and Linux)
$ brew install mashiike/tap/rules2cron
Binary packages

Releases

LICENSE

MIT License

Copyright (c) 2022 IKEDA Masashi

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

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

func New

func New(ctx context.Context, converter *Converter) (*App, error)

func (*App) Run

func (app *App) Run(w io.Writer, showDisabled bool) error

func (*App) RunWithContext

func (app *App) RunWithContext(ctx context.Context, w io.Writer, showDisabled bool) error

type Converter

type Converter struct {
	ReferenceDate time.Time
	TimeZone      *time.Location
}

func (*Converter) Convert

func (c *Converter) Convert(scheduleExpression string) (string, error)

type Schedule

type Schedule struct {
	Minute     string
	Hour       string
	DayOfMonth string
	Month      string
	DayOfWeek  string
}

func (*Schedule) String

func (s *Schedule) String() string

Directories

Path Synopsis
cmd
internal

Jump to

Keyboard shortcuts

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