Documentation ¶
Index ¶
Constants ¶
View Source
const ( NewsType = "news" FileDownloadType = "fileDownload" DishNameDownload = "dishNameDownload" CanteenHeadcount = "canteenHeadCount" MovieType = "movie" FeedbackEmail = "feedbackEmail" )
names for cron jobs as specified in database
View Source
const ( NewsImageDirectory = "news/newspread/" NewspreadHook = "newspread" ImpulsivHook = "impulsivHook" )
View Source
const BaseUrl = "http://graphite-kom.srv.lrz.de/render/?from=-10min&target=%s&format=json"
BaseUrl is the base URL for the required format. Contains the '%s' placeholder that has to replaced with the Target property of the CanteenApInformation when performing a request.
View Source
const (
MovieImageDirectory = "movie/"
)
Variables ¶
View Source
var (
Canteens = []CanteenApInformation{
{CanteenId: "mensa-arcisstr",
Target: "ap.ap*-?bn*.ssid.*",
MaxCount: 450},
{CanteenId: "mensa-garching",
Target: "ap.apa{01,02,03,04,05,06,07,08,09,10,11,12,13}*-?mg*.ssid.*",
MaxCount: 1000},
{CanteenId: "mensa-leopoldstr",
Target: "ap.ap*-?lm*.ssid.*",
MaxCount: 500},
{CanteenId: "mensa-lothstr",
Target: "ap.{apa06-0rh,apa05-0rh,apa03-1rh,apa02-1rh}.ssid.*",
MaxCount: 110},
{CanteenId: "mensa-martinsried",
Target: "ap.ap*-?ij*.ssid.*",
MaxCount: 100},
{CanteenId: "mensa-pasing",
Target: "ap.apa{15,18}-?rl*.ssid.*",
MaxCount: 50},
{CanteenId: "mensa-weihenstephan",
Target: "ap.ap*-?qz*.ssid.*",
MaxCount: 250},
{CanteenId: "stubistro-arcisstr",
Target: "ap.apa01-kfs.ssid.*",
MaxCount: 25},
{CanteenId: "stubistro-goethestr",
Target: "",
MaxCount: 1000},
{CanteenId: "stubistro-grosshadern",
Target: "",
MaxCount: 1000},
{CanteenId: "stubistro-rosenheim",
Target: "",
MaxCount: 1000},
{CanteenId: "stubistro-schellingstr",
Target: "",
MaxCount: 1000},
{CanteenId: "stubistro-adalbertstr",
Target: "",
MaxCount: 1000},
{CanteenId: "stubistro-martinsried",
Target: "ap.ap*-?iv*.ssid.*",
MaxCount: 125},
{CanteenId: "stucafe-akademie-weihenstephan",
Target: "",
MaxCount: 1000},
{CanteenId: "stucafe-boltzmannstr",
Target: "",
MaxCount: 1000},
{CanteenId: "stucafe-connollystr",
Target: "",
MaxCount: 1000},
{CanteenId: "stucafe-garching",
Target: "ap.apa{14,15,16}-?mg*.ssid.*",
MaxCount: 1000},
{CanteenId: "stucafe-karlstr",
Target: "",
MaxCount: 1000},
{CanteenId: "stucafe-pasing",
Target: "ap.apa{15,18}-?rl*.ssid.*",
MaxCount: 50},
{CanteenId: "ipp-bistro",
Target: "",
MaxCount: 1000},
{CanteenId: "fmi-bistro",
Target: "",
MaxCount: 1000},
{CanteenId: "mediziner-mensa",
Target: "",
MaxCount: 1000},
{CanteenId: "mensa-straubing",
Target: "",
MaxCount: 1000},
}
)
View Source
var ImageContentTypeRegex, _ = regexp.Compile("image/[a-z.]+")
View Source
var StorageDir = "/Storage/" // target location of files
StorageDir is the directory where files are stored this is a variable, so it can be changed during tests
Functions ¶
This section is empty.
Types ¶
type AccessPoint ¶
type CafeteriaName ¶
type CafeteriaName struct { Name string `json:"enum_name"` Location CanteenLocation `json:"location"` }
type CafeteriaWithID ¶
type CanteenApInformation ¶
type CanteenDate ¶
type CanteenDate struct {
Dates []CanteenDish `json:"dishes"`
}
type CanteenDays ¶
type CanteenDays struct {
Days []CanteenDate `json:"days"`
}
type CanteenDish ¶
type CanteenLocation ¶
type CronService ¶
type CronService struct {
// contains filtered or unexported fields
}
func New ¶
func New(db *gorm.DB) *CronService
func (*CronService) Run ¶
func (c *CronService) Run() error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.