Documentation ¶
Index ¶
- func Filter[T any](l []T, f func(T) bool) []T
- func Map[T any, R any](l []T, f func(T) R) []R
- func MapErr[T any, R any](l []T, f func(T) (R, error)) ([]R, error)
- type Database
- type Entry
- type EntryList
- type Group
- type Job
- type MongoDatabase
- func (db *MongoDatabase) Close()
- func (db *MongoDatabase) GetAllEntries(scheduleGetter SaveableGetter[Schedule], jobGetter SaveableGetter[Job]) ([]Entry, error)
- func (db *MongoDatabase) GetAllGroups() ([]Group, error)
- func (db *MongoDatabase) GetEntryByID(id string, scheduleGetter SaveableGetter[Schedule], ...) (Entry, error)
- func (db *MongoDatabase) GetGroupByID(id string) (Group, error)
- func (db *MongoDatabase) GetSessionByID(id string) (Session, error)
- func (db *MongoDatabase) NewGroup(data any) (string, error)
- func (db *MongoDatabase) NewSession(hook string, data any) (string, error)
- type Saveable
- type SaveableGetter
- type Schedule
- type Session
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Database ¶
type Database interface { NewGroup(data any) (string, error) NewSession(hook string, data any) (string, error) GetGroupByID(id string) (Group, error) GetSessionByID(id string) (Session, error) GetAllGroups() ([]Group, error) GetAllEntries(SaveableGetter[Schedule], SaveableGetter[Job]) ([]Entry, error) GetEntryByID(string, SaveableGetter[Schedule], SaveableGetter[Job]) (Entry, error) Close() }
type EntryList ¶
type EntryList struct {
// contains filtered or unexported fields
}
func NewEntryList ¶
func NewEntryList(db Database, scheduleGetter SaveableGetter[Schedule], jobGetter SaveableGetter[Job]) *EntryList
type MongoDatabase ¶
type MongoDatabase struct {
// contains filtered or unexported fields
}
func (*MongoDatabase) Close ¶
func (db *MongoDatabase) Close()
func (*MongoDatabase) GetAllEntries ¶
func (db *MongoDatabase) GetAllEntries(scheduleGetter SaveableGetter[Schedule], jobGetter SaveableGetter[Job]) ([]Entry, error)
func (*MongoDatabase) GetAllGroups ¶
func (db *MongoDatabase) GetAllGroups() ([]Group, error)
func (*MongoDatabase) GetEntryByID ¶
func (db *MongoDatabase) GetEntryByID(id string, scheduleGetter SaveableGetter[Schedule], jobGetter SaveableGetter[Job]) (Entry, error)
func (*MongoDatabase) GetGroupByID ¶
func (db *MongoDatabase) GetGroupByID(id string) (Group, error)
func (*MongoDatabase) GetSessionByID ¶
func (db *MongoDatabase) GetSessionByID(id string) (Session, error)
func (*MongoDatabase) NewSession ¶
func (db *MongoDatabase) NewSession(hook string, data any) (string, error)
Click to show internal directories.
Click to hide internal directories.