domain

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CourseNameColumn      int = 1
	WeekDayColumn         int = 3
	TimesColumn           int = 4
	DaysColumn            int = 5
	ComplexNameColumn     int = 6
	AvailableSpacesColumn int = 8
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Activity

type Activity struct {
	CourseName      string
	WeekDay         string
	Times           string
	DateStr         string
	Date            time.Time
	ComplexName     string
	AvailableSpaces int
}

type Config

type Config struct {
	Email struct {
		From string `yaml:"from"`
		Pass string `yaml:"pass"`
		To   string `yaml:"to"`
	} `yaml:"email"`
	Activity struct {
		Name      string `yaml:"name"`
		DaysAhead int    `yaml:"daysAhead"`
	} `yaml:"activity"`
}

type ConfigService

type ConfigService interface {
	GetConfig() Config
}

type EmailService

type EmailService interface {
	SendMail(cfg Config, htmlBody string)
	BuildHtmlBody(activities []Activity) string
}

type ValidationService

type ValidationService interface {
	ValidateActivity(ctx context.Context, activity string, actNameConfig string) bool
	CleanString(str string) (newStr string)
	CleanFields(courseName, weekDay, times, date, complexName, availableSpaces string) (courseNameCleaned, weekDayCleaned, timesCleaned, daysCleaned, complexNameCleaned, availableSpacesCleaned string)
	ParseDate(dates string) time.Time
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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