cleoc

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: CC-BY-4.0, MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultConfigFileName = "cleoc"
View Source
const DefaultConfigFileType = "yml"
View Source
const EnvPrefix = "CLEOC"

Variables

This section is empty.

Functions

This section is empty.

Types

type AddForecastOptions

type AddForecastOptions struct {
	Title         string
	Description   string
	Resolves      string
	Reason        string
	Probabilities map[string]int
	Closes        string
}

func (*AddForecastOptions) Validate

func (opts *AddForecastOptions) Validate() error

type App

type App struct {
	Out    io.Writer
	Err    io.Writer
	Config *Config
}

func NewApp

func NewApp() *App

func (*App) AddForecast

func (a *App) AddForecast(opts AddForecastOptions) error

AddForecast creates a new forecast. The incoming options opts are assumed to already have been validated.

func (*App) Version

func (a *App) Version() error

type Config

type Config struct {
	URL        string
	ConfigFile string
}

func (*Config) LoadWithViper

func (c *Config) LoadWithViper(v *viper.Viper) error

LoadWithViper initializes or overwrites the Config by using the 'viper' library (thereby reading in config files, ENV variables etc.). You should probably not call it.

Jump to

Keyboard shortcuts

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