simple

package
v0.0.0-...-43cf371 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2021 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const EventQuery = "" /* 199-byte string literal not displayed */
View Source
const LeaderQuery = "" /* 558-byte string literal not displayed */
View Source
const MemberQuery = "" /* 213-byte string literal not displayed */

Variables

View Source
var Months = map[string]string{
	"1":  "Jänner",
	"2":  "Feber",
	"3":  "März",
	"4":  "April",
	"5":  "Mai",
	"6":  "Juni",
	"7":  "Juli",
	"8":  "August",
	"9":  "September",
	"10": "Oktober",
	"11": "November",
	"12": "Dezember"}
View Source
var Weekdays = []string{"Mo.", "Di.", "Mi.", "Do.", "Fr.", "Sa.", "So."}

Functions

func Handler

func Handler() http.Handler

func OpenDatabase

func OpenDatabase() error

func PersistenceRunner

func PersistenceRunner()

func QueryData

func QueryData(query string, data *[]DBO, numFields int) error

Types

type DBO

type DBO interface {
	Prettyfy()
	IsPretty() bool
	Scan(DBScan, *[]DBO) (*DBO, error)
}

type DBScan

type DBScan func(...interface{}) error

type Event

type Event struct {
	Begin string `json:"begin"`

	Day int `json:"day"`

	Ending string `json:"ending"`

	Important     bool   `json:"important"`
	Internal      bool   `json:"internal"`
	MusicianBegin string `json:"musician_begin"`

	Name string `json:"name"`
	Note string `json:"note"`

	Weekday string `json:"weekday"`
	// contains filtered or unexported fields
}

func (*Event) IsPretty

func (e *Event) IsPretty() bool

func (*Event) Prettyfy

func (e *Event) Prettyfy()

func (*Event) Scan

func (e *Event) Scan(scan DBScan, data *[]DBO) (*DBO, error)

type EventGroup

type EventGroup struct {
	Events []Event `json:"events"`
	Month  string  `json:"month"`
	Pretty bool
}

func (*EventGroup) IsPretty

func (e *EventGroup) IsPretty() bool

func (*EventGroup) Prettyfy

func (e *EventGroup) Prettyfy()

func (*EventGroup) Scan

func (*EventGroup) Scan(scan DBScan, data *[]DBO) (*DBO, error)

type Leader

type Leader struct {
	Member
	Pretty bool `json:"-"`
}

func (*Leader) IsPretty

func (l *Leader) IsPretty() bool

func (*Leader) Prettyfy

func (*Leader) Prettyfy()

func (*Leader) Scan

func (l *Leader) Scan(scan DBScan, _ *[]DBO) (*DBO, error)

type Member

type Member struct {
	Description string `json:"description"`

	Name    string `json:"name"`
	Picture string `json:"picture"`
	Pretty  bool
	// contains filtered or unexported fields
}

func (*Member) IsPretty

func (m *Member) IsPretty() bool
func (m *Member) PictureLink()

func (*Member) Prettyfy

func (m *Member) Prettyfy()

type MemberGroup

type MemberGroup struct {
	Instrument       string `json:"instrument"`
	InstrumentId     int
	InstrumentPlural string
	Members          []Member `json:"members"`
	Pretty           bool
}

func (*MemberGroup) IsPretty

func (m *MemberGroup) IsPretty() bool

func (*MemberGroup) Prettyfy

func (m *MemberGroup) Prettyfy()

func (*MemberGroup) Scan

func (*MemberGroup) Scan(scan DBScan, data *[]DBO) (*DBO, error)

Jump to

Keyboard shortcuts

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