models

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package models provides various structs modelling real-world concepts or objects.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Calendar

type Calendar struct {
	January   Releases
	February  Releases
	March     Releases
	April     Releases
	May       Releases
	June      Releases
	July      Releases
	August    Releases
	September Releases
	October   Releases
	November  Releases
	December  Releases
}

Calendar is a struct that represents a monthly calendar with Releases for each month.

func (*Calendar) AddReleases

func (c *Calendar) AddReleases(month time.Month, releases Releases)

AddReleases assigns Releases to the specified month in the Calendar struct.

func (*Calendar) ReleasesOnDate

func (c *Calendar) ReleasesOnDate(month time.Month, day int) []Release

ReleasesOnDate returns a slice of Release structs for the specified month and day in the Calendar.

type Release

type Release struct {
	Artist string
	Album  string
	Links  []URL
}

Release is a struct that represents a music release.

func (*Release) URLs added in v1.2.0

func (r *Release) URLs() []URL

URLs generates a slice of URL structs containing various links for the given Release.

type Releases

type Releases map[uint8][]Release

Releases is a map that represents a collection of releases keyed by the day of the month.

func NewReleases

func NewReleases() Releases

NewReleases creates and returns a Releases with an initial length of 0.

type URL added in v1.2.0

type URL struct {
	Name constants.Platform
	URL  string
}

URL is a struct that represents a URL associated with a music release platform.

type User

type User struct {
	Email string
}

Jump to

Keyboard shortcuts

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