environment

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

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

Go to latest
Published: Sep 29, 2021 License: MPL-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ColorReset        = "\x1B[0m"
	ColorRed          = "\x1B[1;31m"
	ColorGreen        = "\x1B[1;32m"
	ColorYellow       = "\x1B[1;33m"
	ColorBrightYellow = "\x1B[1;93m"
	ColorBlue         = "\x1B[1;34m"
	ColorMagenta      = "\x1B[1;35m"
	ColorCyan         = "\x1B[1;36m"
	ColorWhite        = "\u001B[1;37m"
)
View Source
const (
	VerboseSimple  = iota + 1
	VerboseMedium  = VerboseSimple + 1
	VerboseDebug   = VerboseMedium + 1
	VerboseDefault = VerboseDebug
)
View Source
const (
	EpiScheduleCalendarName = "Epitech Schedule"
)
View Source
const (
	ProjectName = "EpiSchedule"
)

Variables

View Source
var AvailableActivity = make(map[string]string)

Functions

func ActivityToStringArray

func ActivityToStringArray() []string

func GetAuthLoginLinkFromEnv

func GetAuthLoginLinkFromEnv() string

Types

type Environment

type Environment struct {
	Client *http.Client
	User   UserData

	Flag Flag
	// contains filtered or unexported fields
}

func NewEnvironment

func NewEnvironment() Environment

func (*Environment) AddAutoRegisterActivity

func (env *Environment) AddAutoRegisterActivity(activities ...string)

func (*Environment) AddAutoRegisterCalendarActivity

func (env *Environment) AddAutoRegisterCalendarActivity(activities ...string)

func (Environment) AddEvent

func (env Environment) AddEvent(activity blueprint.CourseActivity)

func (Environment) AddModule

func (env Environment) AddModule(module blueprint.CourseSummary, project blueprint.CourseActivity) error

func (Environment) Error

func (env Environment) Error(msg ...interface{})

func (Environment) Errorf

func (env Environment) Errorf(msg string, fmt ...interface{})

func (Environment) Fatal

func (env Environment) Fatal()

func (Environment) GetAuthentication

func (env Environment) GetAuthentication() string

func (Environment) GetVerboseLevel

func (env Environment) GetVerboseLevel() VerboseLevel

func (Environment) IsAutoCalendarRegisteredActivity

func (env Environment) IsAutoCalendarRegisteredActivity(activityName string) bool

func (Environment) IsAutoRegisteredActivity

func (env Environment) IsAutoRegisteredActivity(activityName string) bool

func (Environment) Log

func (env Environment) Log(level VerboseLevel, msg ...interface{})

func (Environment) Logf

func (env Environment) Logf(level VerboseLevel, msg string, format ...interface{})

func (Environment) RemoveEvent

func (env Environment) RemoveEvent(title string)

func (*Environment) SetUpCalendar

func (env *Environment) SetUpCalendar()

func (Environment) SetVerboseLevel

func (env Environment) SetVerboseLevel(level VerboseLevel)

type Flag

type Flag struct {
	SpecialSemester bool
	SaveActivities  bool
}

Env flag type

type GoogleCalendar

type GoogleCalendar struct {
	// contains filtered or unexported fields
}

type UserData

type UserData struct {
	Semester int
	Credits  blueprint.Credits
}

type VerboseLevel

type VerboseLevel uint

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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