internal

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: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CoursesChan added in v0.0.4

func CoursesChan(all bool, opts ...canvas.Option) <-chan *canvas.Course

CoursesChan returns a channel of courses

func FindAssignment added in v0.0.4

func FindAssignment(identifier string, all bool, opts ...canvas.Option) (*canvas.Assignment, error)

FindAssignment will find an assignment the matches a generic identifier.

func FindCourse added in v0.0.4

func FindCourse(identifier interface{}, opts ...canvas.Option) (*canvas.Course, error)

FindCourse will find a course given a generice identifier

func GetAssignment added in v0.0.4

func GetAssignment(id int, all bool, opts ...canvas.Option) (*canvas.Assignment, error)

GetAssignment will search courses for an assignment with the assignment's ID

func GetCourses

func GetCourses(all bool, opts ...canvas.Option) ([]*canvas.Course, error)

GetCourses gets all the courses

func HandleAuthErr

func HandleAuthErr(err error) error

HandleAuthErr will handle a canvas auth error and give a more relevant error message.

func Homedir

func Homedir() string

Homedir will get the correct home directory

func Mkdir

func Mkdir(dir string) error

Mkdir creates a directory

func NewTable

func NewTable(r io.Writer) *table.Table

NewTable creates a table with some default parameters

func SetTableHeader

func SetTableHeader(t *table.Table, header []string, color bool)

SetTableHeader sets the table header and automatically manages header color.

Types

type Error

type Error struct {
	Msg  string
	Code int
}

Error is an error

func (*Error) Error

func (e *Error) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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