adapter

package
v0.37.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToArtwork

func ConvertToArtwork(ctx context.Context, artworkModel *model.ArtworkModel, opts ...*AdapterOption) (*types.Artwork, error)

func ConvertToArtworks

func ConvertToArtworks(ctx context.Context, artworkModels []*model.ArtworkModel, opts ...*AdapterOption) ([]*types.Artwork, error)

func ConvertToFeedItems

func ConvertToFeedItems(ctx context.Context, artworks []*types.Artwork) []*feeds.Item

func GetArtworkModelIndexPicture

func GetArtworkModelIndexPicture(ctx context.Context, artworkModel *model.ArtworkModel) (*types.Picture, error)

func GetArtworkModelPictures

func GetArtworkModelPictures(ctx context.Context, artworkModel *model.ArtworkModel) ([]*types.Picture, error)

func GetArtworkModelTags

func GetArtworkModelTags(ctx context.Context, artworkModel *model.ArtworkModel) ([]string, error)

Types

type AdapterOption

type AdapterOption struct {
	LoadTag          bool
	LoadArtist       bool
	LoadPicture      bool
	OnlyIndexPicture bool
}

func LoadAll

func LoadAll() *AdapterOption

func LoadNone

func LoadNone() *AdapterOption

func MergeOptions

func MergeOptions(opts ...*AdapterOption) *AdapterOption

func OnlyLoadArtist

func OnlyLoadArtist() *AdapterOption

func OnlyLoadPicture

func OnlyLoadPicture() *AdapterOption

func OnlyLoadTag

func OnlyLoadTag() *AdapterOption

func (*AdapterOption) WithLoadArtist

func (o *AdapterOption) WithLoadArtist() *AdapterOption

func (*AdapterOption) WithLoadPicture

func (o *AdapterOption) WithLoadPicture() *AdapterOption

func (*AdapterOption) WithLoadTag

func (o *AdapterOption) WithLoadTag() *AdapterOption

func (*AdapterOption) WithOnlyIndexPicture

func (o *AdapterOption) WithOnlyIndexPicture() *AdapterOption

Jump to

Keyboard shortcuts

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