cmd

package
v0.0.0-...-11af641 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2023 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "cronitor",
	Short: shortDescription(Version),
	Long: shortDescription(Version) + `

Command line tools for Cronitor.io. See https://cronitor.io/docs/using-cronitor-cli for details.`,
}

RootCmd represents the base command when called without any subcommands

View Source
var Version string = "30.4"

Functions

func Execute

func Execute()

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

func RunCommand

func RunCommand(subcommand string, withEnvironment bool, withMonitoring bool) int

Types

type ConfigFile

type ConfigFile struct {
	ApiKey         string   `json:"CRONITOR_API_KEY"`
	PingApiAuthKey string   `json:"CRONITOR_PING_API_KEY"`
	ExcludeText    []string `json:"CRONITOR_EXCLUDE_TEXT,omitempty"`
	Hostname       string   `json:"CRONITOR_HOSTNAME"`
	Log            string   `json:"CRONITOR_LOG"`
	Env            string   `json:"CRONITOR_ENV"`
}

type ExistingMonitors

type ExistingMonitors struct {
	Monitors    []lib.MonitorSummary
	Names       []string
	CurrentKey  string
	CurrentCode string
}

func (ExistingMonitors) AddName

func (em ExistingMonitors) AddName(name string)

func (ExistingMonitors) GetNameForCurrent

func (em ExistingMonitors) GetNameForCurrent() (string, error)

func (ExistingMonitors) HasMonitorByName

func (em ExistingMonitors) HasMonitorByName(name string) bool

type StatusMonitor

type StatusMonitor struct {
	Name    string `json:"name"`
	Code    string `json:"code"`
	Passing bool   `json:"passing"`
	Status  string `json:"status"`
}

type StatusMonitors

type StatusMonitors struct {
	Monitors []StatusMonitor `json:"monitors"`
}

Jump to

Keyboard shortcuts

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