models

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2025 License: MIT Imports: 1 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 {
	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
}

type Items

type Items []Item

type RomDirectory

type RomDirectory struct {
	DisplayName string
	Tag         string
	Path        string
}

type Section

type Section struct {
	Name string `yaml:"section_name,omitempty" json:"section_name,omitempty"`

	SystemTag      string `yaml:"system_tag,omitempty" json:"system_tag,omitempty"`
	LocalDirectory string `yaml:"local_directory,omitempty" json:"local_directory,omitempty"`

	HostSubdirectory string `yaml:"host_subdirectory,omitempty" json:"host_subdirectory,omitempty"`

	RomMPlatformID string `yaml:"romm_platform_id,omitempty" json:"romm_platform_id,omitempty"`

	CollectionFilePath string `yaml:"collection_file_path,omitempty" json:"collection_file_path,omitempty"`
}

type TableColumns

type TableColumns struct {
	FilenameHeader string `yaml:"-" json:"-"`
	FileSizeHeader string `yaml:"-" json:"-"`
	DateHeader     string `yaml:"-" json:"-"`
}

Jump to

Keyboard shortcuts

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