gallery

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2020 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFiles

func GetFiles(g *models.Gallery, baseURL string) []*models.GalleryFilesType

func GetIDs

func GetIDs(galleries []*models.Gallery) []int

func GetStudioName

func GetStudioName(reader models.StudioReader, gallery *models.Gallery) (string, error)

GetStudioName returns the name of the provided gallery's studio. It returns an empty string if there is no studio assigned to the gallery.

func ToBasicJSON

func ToBasicJSON(gallery *models.Gallery) (*jsonschema.Gallery, error)

ToBasicJSON converts a gallery object into its JSON object equivalent. It does not convert the relationships to other objects.

Types

type Importer

type Importer struct {
	ReaderWriter        models.GalleryReaderWriter
	StudioWriter        models.StudioReaderWriter
	PerformerWriter     models.PerformerReaderWriter
	TagWriter           models.TagReaderWriter
	JoinWriter          models.JoinReaderWriter
	Input               jsonschema.Gallery
	MissingRefBehaviour models.ImportMissingRefEnum
	// contains filtered or unexported fields
}

func (*Importer) Create

func (i *Importer) Create() (*int, error)

func (*Importer) FindExistingID

func (i *Importer) FindExistingID() (*int, error)

func (*Importer) Name

func (i *Importer) Name() string

func (*Importer) PostImport

func (i *Importer) PostImport(id int) error

func (*Importer) PreImport

func (i *Importer) PreImport() error

func (*Importer) Update

func (i *Importer) Update(id int) error

Jump to

Keyboard shortcuts

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