models

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ArtDownloadTypeFromString = map[string]sum.Int[ArtDownloadType]{
	"BOX_ART":      ArtDownloadTypes.BOX_ART,
	"TITLE_SCREEN": ArtDownloadTypes.TITLE_SCREEN,
	"LOGOS":        ArtDownloadTypes.LOGOS,
	"SCREENSHOTS":  ArtDownloadTypes.SCREENSHOTS,
}
View Source
var ArtDownloadTypeMapping = map[sum.Int[ArtDownloadType]]string{
	ArtDownloadTypes.BOX_ART:      "Named_Boxarts",
	ArtDownloadTypes.TITLE_SCREEN: "Named_Titles",
	ArtDownloadTypes.LOGOS:        "Named_Logos",
	ArtDownloadTypes.SCREENSHOTS:  "Named_Snaps",
}
View Source
var ArtDownloadTypes = sum.Int[ArtDownloadType]{}.Sum()
View Source
var HostTypes = sum.Int[HostType]{}.Sum()

Functions

This section is empty.

Types

type ArtDownloadType

type ArtDownloadType struct {
	BOX_ART,
	TITLE_SCREEN,
	LOGOS,
	SCREENSHOTS sum.Int[ArtDownloadType]
}

type Client

type Client interface {
	Close() error
	ListDirectory(subdirectory string) (Items, error)
	BuildDownloadHeaders() map[string]string
}

type HostType

type HostType struct {
	ROMM,
	MEGATHREAD,
	APACHE sum.Int[HostType] // Apache is an internal type
}

type Item

type Item struct {
	DisplayName string `json:"name"`

	Filename                 string `json:"filename"`
	Path                     string `json:"path"`
	IsDirectory              bool   `json:"is_directory"`
	IsSelfContainedDirectory bool   `json:"-"`
	IsMultiDiscDirectory     bool   `json:"-"`
	DirectoryFileCount       int    `json:"-"`
	FileSize                 string `json:"file_size"`
	LastModified             string `json:"last_modified"`

	Tag string `json:"tag"`

	RomID  string `json:"-"` // For RomM Support
	ArtURL string `json:"-"` // For RomM Support
}

func (Item) GetFilename

func (i Item) GetFilename() string

func (Item) MarshalLogObject

func (i Item) MarshalLogObject(encoder zapcore.ObjectEncoder) error

func (Item) Value added in v1.2.0

func (i Item) Value() interface{}

type Items

type Items []Item

func (Items) MarshalLogArray

func (items Items) MarshalLogArray(enc zapcore.ArrayEncoder) error

func (Items) Values

func (items Items) Values() []string

type RomDirectories added in v1.2.1

type RomDirectories []RomDirectory

func (RomDirectories) Values added in v1.2.1

func (r RomDirectories) Values() []string

type RomDirectory

type RomDirectory struct {
	DisplayName string
	Tag         string
	Path        string
}

func (RomDirectory) Value added in v1.2.1

func (r RomDirectory) Value() interface{}

type Section

type Section struct {
	Name string `yaml:"section_name"`

	SystemTag      string `yaml:"system_tag"`
	LocalDirectory string `yaml:"local_directory"`

	HostSubdirectory string `yaml:"host_subdirectory"`

	RomMPlatformID string `yaml:"romm_platform_id"`

	CollectionFilePath string `yaml:"collection_file_path"`
}

func (Section) MarshalLogObject

func (s Section) MarshalLogObject(encoder zapcore.ObjectEncoder) error

type Sections

type Sections []Section

func (Sections) MarshalLogArray

func (s Sections) MarshalLogArray(encoder zapcore.ArrayEncoder) error

type TableColumns

type TableColumns struct {
	FilenameHeader string `yaml:"filename_header"`
	FileSizeHeader string `yaml:"file_size_header"`
	DateHeader     string `yaml:"date_header"`
}

func (TableColumns) MarshalLogObject

func (c TableColumns) MarshalLogObject(enc zapcore.ObjectEncoder) error

Jump to

Keyboard shortcuts

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