cmd

package
v0.0.0-...-2e2a65e Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrClusterNotFound = errors.New("Selected cluster could not be found. Please check your config")
	ErrServiceNotFound = errors.New("Selected service could not be found. Please check your config")
	ErrCommandNotFound = errors.New("Selected command could not be found. Please check your config")
)

Config Errors

View Source
var (
	ErrCouldNotCreateConfig    = errors.New("Could not create config file")
	ErrConfigFileAlreadyExists = errors.New("Config file already exists at the chosen location")
)

Init errors

View Source
var (
	ErrInvalidEnvInput       = errors.New("Input must be in the form of key=value")
	ErrKeyNotPresent         = errors.New("The key entered was not present in the environment variables for this service")
	ErrCouldNotParseTime     = errors.New("Could not parse the given time")
	ErrCantFollowWithEndTime = errors.New("Could not follow logs because an end time was given")
)

Service errors

View Source
var (
	ErrDeployTimeout = errors.New("Timed out waiting for task to start")
)

Deploy Errors

Functions

func Execute

func Execute()

Execute adds all child commands so the root command sets flags appropriately. This is called by main.main(). It only needs to happen once to the RootCmd

Types

type Cluster

type Cluster struct {
	Name       string   `mapstructure:"name"`
	Services   []string `mapstructure:"services"`
	Dockerfile string   `mapstructure:"dockerfile"`
	BuildArgs  []string `mapstructure:"build-args"`
}

type Config

type Config struct {
	Profile  string     `mapstructure:"profile"`
	Region   string     `mapstructure:"region"`
	Repo     string     `mapstructure:"repo"`
	Clusters []*Cluster `mapstructure:"clusters"`
	Tasks    []*Task    `mapstructure:"tasks"`
}

type Empty

type Empty struct{}

type LogsOperation

type LogsOperation struct {
	LogGroupName   string
	Namespace      string
	Service        string
	EndTime        time.Time
	StartTime      time.Time
	Filter         string
	Follow         bool
	LogStreamNames []string
	EventCache     *lru.Cache
}

func (*LogsOperation) AddEndTime

func (o *LogsOperation) AddEndTime(rawEndTime string)

func (*LogsOperation) AddStartTime

func (o *LogsOperation) AddStartTime(rawStartTime string)

func (*LogsOperation) AddTasks

func (o *LogsOperation) AddTasks(tasks []string)

func (*LogsOperation) SeenEvent

func (o *LogsOperation) SeenEvent(eventID string) bool

func (*LogsOperation) Validate

func (o *LogsOperation) Validate() error

type Task

type Task struct {
	Name    string `mapstructure:"name"`
	Command string `mapstructure:"command"`
}

Jump to

Keyboard shortcuts

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