meta

package
v0.0.0-...-93660c8 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnimeMetadata

type AnimeMetadata struct {
	// Name is the anime name.
	Name string `json:"name"`
	// contains filtered or unexported fields
}

AnimeMetadata is a piece of anime-attributed metadata.

func (*AnimeMetadata) MarshalJSON

func (am *AnimeMetadata) MarshalJSON() ([]byte, error)

MarshalJSON writes data into a JSON representation.

func (*AnimeMetadata) Matches

func (am *AnimeMetadata) Matches(query string) bool

Matches tries to match against a string query.

func (*AnimeMetadata) Type

func (am *AnimeMetadata) Type() Type

Type returns the type of the metadata (TypeAnime).

type GenericMetadata

type GenericMetadata struct {
	// Source is the media source, i.e. a URL.
	Source string `json:"source"`
	// Artist is the identifier of the artist, i.e. their name.
	Artist string `json:"artist"`
	// ArtistLink is a reference to the artist, i.e. a URL.
	ArtistLink string `json:"artist_link"`
}

GenericMetadata is a piece of artist-attributed metadata.

func (*GenericMetadata) MarshalJSON

func (gm *GenericMetadata) MarshalJSON() ([]byte, error)

MarshalJSON writes data into a JSON representation.

func (*GenericMetadata) Type

func (gm *GenericMetadata) Type() Type

Type returns the type of the metadata (TypeGeneric).

type Matchable

type Matchable interface {
	// Matches tries to match against a string query.
	Matches(query string) bool
}

Matchable is something that can be matched.

type Metadata

type Metadata interface {
	// Type returns the type of the metadata.
	Type() Type
}

Metadata is a piece of media metadata.

type Type

type Type uint

Type is a type of metadata.

const (
	// TypeGeneric is a generic, artist-attributed metadata type (GenericMetadata).
	TypeGeneric Type = iota
	// TypeAnime is an anime-attributed metadata type (AnimeMetadata).
	TypeAnime
)

Jump to

Keyboard shortcuts

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