artwork

package
v0.0.0-...-df1f0a2 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KindArtworkScore      = "ArtworkScore"      // namespace: [default]
	KindArtworkRecord     = "ArtworkRecord"     // namespace: account
	KindArtworkUploadInfo = "ArtworkUploadInfo" // namespace: [default]
)

Variables

This section is empty.

Functions

func ArtworkRecordKey

func ArtworkRecordKey(namespace string, hash string) *datastore.Key

func ArtworkScoreKey

func ArtworkScoreKey(hash string) *datastore.Key

func ArtworkUploadInfoKey

func ArtworkUploadInfoKey(hash string) *datastore.Key

Types

type ArtworkRecord

type ArtworkRecord struct {
	Score     ArtworkScore
	SongIdent string
}

Key: artwork hash

type ArtworkScore

type ArtworkScore struct {
	Red,
	Orange,
	Brown,
	Yellow,
	Green,
	Blue,
	Violet,
	Pink,
	Black,
	Gray,
	White int
}

Key: artwork hash

func ArtworkScoreFromSwatches

func ArtworkScoreFromSwatches(swatches []Swatch) ArtworkScore

type ArtworkUploadInfo

type ArtworkUploadInfo struct {
	At   int64  // unix seconds
	By   string // account ID
	From string // request ip
	Hash string // artwork hash
}

Key: auto-generated

type HSL

type HSL struct {
	H, S, L float64
	A       int
}

type Swatch

type Swatch struct {
	Color      HSL
	Population int
}

func Swatches

func Swatches(swatches []*vibrant.Swatch) []Swatch

Jump to

Keyboard shortcuts

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