commands

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2021 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Conf = &Config{}

Conf is the global config

Functions

func All

func All(globals *opts.Global) []*cobra.Command

All returns all the commands.

Types

type Config added in v0.0.3

type Config struct {
	Host          string `yaml:"host" default:"canvas.instructure.com"`
	Editor        string `yaml:"editor" env:"EDITOR"`
	BaseDir       string `yaml:"basedir" default:"$HOME/.edu/files"`
	Token         string `yaml:"token" env:"CANVAS_TOKEN"`
	Notifications bool   `yaml:"notifications" default:"true"`

	Twilio struct {
		SID    string `yaml:"sid" env:"TWILIO_SID"`
		Token  string `yaml:"token" env:"TWILIO_TOKEN"`
		Number string `yaml:"number"`
	} `yaml:"twilio"`
	Registration struct {
		Term string `yaml:"term"`
		Year int    `yaml:"year"`
	} `yaml:"registration"`
	Watch struct {
		Duration     string `yaml:"duration" default:"12h"`
		CRNs         []int  `yaml:"crns"`
		Term         string `yaml:"term"`
		Year         int    `yaml:"year"`
		Files        bool   `yaml:"files"`
		Subject      string `yaml:"subject"`
		SmsNotify    bool   `yaml:"sms_notify"`
		SmsRecipient string `yaml:"sms_recipient"`
	} `yaml:"watch"`
	Replacements       []files.Replacement            `yaml:"replacements"`
	CourseReplacements map[string][]files.Replacement `yaml:"course-replacements"`
}

Config is the main configuration struct

Jump to

Keyboard shortcuts

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