models

package
v0.0.0-...-5782047 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2021 License: GPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *pop.Connection

DB is a connection to your database to be used throughout your application.

Functions

This section is empty.

Types

type Artist

type Artist struct {
	ID   string `json:"id" db:"id"`
	Name string `json:"name" db:"name"`
}

Artist is used by pop to map your .model.Name.Proper.Pluralize.Underscore database table to your go code.

type Artists

type Artists []Artist

Artists is not required by pop and may be deleted

type ArtistsTrack

type ArtistsTrack struct {
	ID       int    `json:"id" db:"id"`
	ArtistID string `json:"artist_id" db:"artist_id"`
	TrackID  string `json:"track_id" db:"track_id"`
}

ArtistsTrack is used by pop to map your .model.Name.Proper.Pluralize.Underscore database table to your go code.

type ArtistsTracks

type ArtistsTracks []ArtistsTrack

ArtistsTracks is not required by pop and may be deleted

type HistoryEntries

type HistoryEntries []HistoryEntry

HistoryEntries is not required by pop and may be deleted

func (HistoryEntries) SortByDate

func (h HistoryEntries) SortByDate()

SortByDate will sort an array of HistoryEntries by date ascending

type HistoryEntry

type HistoryEntry struct {
	ID       int       `json:"id" db:"id"`
	TrackID  string    `json:"track_id" db:"track_id"`
	PlayedAt time.Time `json:"played_at" db:"played_at"`
}

HistoryEntry is used by pop to map your .model.Name.Proper.Pluralize.Underscore database table to your go code.

type Track

type Track struct {
	ID          string `json:"id" db:"id"`
	Name        string `json:"name" db:"name"`
	TrackNumber int    `json:"track_number" db:"track_number"`
	DiscNumber  int    `json:"disc_number" db:"disc_number"`
	Explicit    bool   `json:"explicit" db:"explicit"`
}

Track is used by pop to map your .model.Name.Proper.Pluralize.Underscore database table to your go code.

type Tracks

type Tracks []Track

Tracks is not required by pop and may be deleted

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳