Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DependencyArray ¶
type DependencyArray []ModVersionDependency
func (*DependencyArray) Scan ¶
func (a *DependencyArray) Scan(value any) error
type DependencyType ¶
type DependencyType string
const ( DependencyTypeRequired DependencyType = "required" DependencyTypeOptional DependencyType = "optional" DependencyTypeConflict DependencyType = "conflict" DependencyTypeEmbedded DependencyType = "embedded" )
type ModDetails ¶
type ModDetails struct {
ID string `gorm:"primaryKey" json:"id"`
Name string `gorm:"not null" json:"name"`
Description string `gorm:"not null" json:"description"`
Author string `gorm:"not null" json:"author"`
ThumbnailURI *string `gorm:"default:null" json:"-"`
LatestVersionID *string `gorm:"index;default:null;" json:"-"`
LatestVersionExternal string `gorm:"-" json:"latest_version"`
Versions []ModVersionDetails `gorm:"foreignKey:ModID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;" json:"-"`
Files []ModVersionFile `gorm:"foreignKey:ModID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;" json:"-"`
CreatedAt time.Time `gorm:"autoCreateTime" json:"created_at"`
UpdatedAt time.Time `gorm:"autoUpdateTime" json:"updated_at"`
}
type ModVersionDependency ¶
type ModVersionDependency struct {
ModID string `json:"mod_id"`
VersionID string `json:"version_id"`
DependencyType DependencyType `json:"dependency_type"` // "required" or "optional"
}
type ModVersionDetails ¶
type ModVersionDetails struct {
ID string `gorm:"primaryKey" json:"-"`
VersionID string `gorm:"index:idx_mod_version_details" json:"version_id"`
ModID string `gorm:"index:idx_mod_version_details" json:"mod_id"`
Files []ModVersionFile `gorm:"foreignKey:VersionID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;" json:"files,omitempty"`
Dependencies DependencyArray `gorm:"type:json" json:"dependencies,omitempty"`
Features Features `gorm:"type:json" json:"features,omitempty"`
CreatedAt time.Time `gorm:"autoCreateTime" json:"created_at"`
UpdatedAt time.Time `gorm:"autoUpdateTime" json:"updated_at"`
}
type ModVersionFile ¶
type ModVersionFile struct {
ID string `gorm:"primaryKey" json:"id"`
ModID *string `gorm:"index:idx_mod_version_file;not null" json:"-"`
VersionID *string `gorm:"index:idx_mod_version_file;not null" json:"-"`
Filename string `gorm:"not null" json:"filename"`
ContentType FileType `gorm:"not null" json:"content_type"`
Size int64 `gorm:"not null" json:"size"`
ExtractPath *string `gorm:"default:null" json:"extract_path,omitempty"`
TargetPlatform TargetPlatform `gorm:"not null;default:'any'" json:"target_platform"`
Hashes StringMap `gorm:"type:json" json:"hashes"`
Downloads StringArray `gorm:"type:json" json:"downloads"`
CreatedAt time.Time `gorm:"autoCreateTime" json:"created_at"`
}
type StringArray ¶
type StringArray []string
func (*StringArray) Scan ¶
func (a *StringArray) Scan(value any) error
type TargetPlatform ¶
type TargetPlatform string
const ( TargetPlatformAny TargetPlatform = "any" TargetPlatformX64 TargetPlatform = "x64" TargetPlatformX86 TargetPlatform = "x86" TargetPlatformAArch64 TargetPlatform = "aarch64" )
Click to show internal directories.
Click to hide internal directories.