handlers

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: MIT Imports: 37 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Yes           string = "yes"
	No            string = "no"
	NotApplicable string = "n/a"
)

Variables

This section is empty.

Functions

func RegisterHandlers

func RegisterHandlers(app *pocketbase.PocketBase)

RegisterHandlers registers all the handlers for the application. It takes a pointer to a PocketBase instance and initializes the cache. The cache is used to store frequently accessed data for faster access. The cache is automatically cleaned up every 30 minutes.

Types

type Century

type Century struct {
	Century   string
	Composers []Composer_source
}

func GetMusics

func GetMusics(filePath string) (centuries []Century, err error)

type Composer_seed

type Composer_seed struct {
	ID       string      `db:"id" json:"id"`
	Name     string      `db:"name" json:"name"`
	Date     string      `db:"date" json:"date"`
	Language string      `db:"language" json:"language"`
	Century  string      `db:"century" json:"century"`
	Songs    []Song_seed `db:"songs" json:"songs"`
}

func GetParsedMusics

func GetParsedMusics() []Composer_seed

type Composer_source

type Composer_source struct {
	ID       string        `db:"id" json:"id"`
	Name     string        `db:"name" json:"name"`
	Date     string        `db:"date" json:"date"`
	Language string        `db:"language" json:"language"`
	Century  string        `db:"century" json:"century"`
	Songs    []Song_source `db:"songs" json:"songs"`
}

type Content

type Content struct {
	FieldName string `db:"name" json:"name"`
	Content   string `db:"content" json:"content"`
}

type Grouped_music_list

type Grouped_music_list struct {
	Century   string
	Composers []shape.Music_composer
}

func GroupAndSortMusicByCentury

func GroupAndSortMusicByCentury(musicList []shape.Music_composer) []Grouped_music_list

type Song_seed

type Song_seed struct {
	Title      string `db:"title" json:"title"`
	URL        string `db:"url" json:"url"`
	Source     string `db:"source" json:"source"`
	ComposerID string `db:"composer_id" json:"composer_id"` // foreign key
}

type Song_source

type Song_source struct {
	Title      string   `db:"title" json:"title"`
	URL        string   `db:"url" json:"url"`
	Source     []string `db:"source" json:"source"`
	ComposerID string   `db:"composer_id" json:"composer_id"` // foreign key
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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