widget

package
v0.0.0-...-225e134 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Author

type Author struct {
	MemberId   uint   `gorm:"primaryKey"`
	Username   string `gorm:"index"`
	Properties *string
	CreatedAt  time.Time
	UpdatedAt  time.Time `gorm:"index"`

	ParsedProjects AuthorProperties `gorm:"-"`
}

func (*Author) AfterFind

func (a *Author) AfterFind(*gorm.DB) error

type AuthorProject

type AuthorProject struct {
	Id   uint   `json:"id"`
	Name string `json:"name"`
}

type AuthorProperties

type AuthorProperties struct {
	Projects []AuthorProject `json:"projects"`
}

type AuthorResponse

type AuthorResponse struct {
	Id       uint            `json:"id"`
	Username string          `json:"username"`
	Projects []AuthorProject `json:"projects"`
}

type Project

type Project struct {
	CurseId    uint    `gorm:"column:id;primaryKey"`
	Properties *string `gorm:"type:LONGTEXT COLLATE utf8mb4_bin"`
	Status     int     `gorm:"index:;index:idx_status_updatedat;index:idx_curseid_status"`
	CreatedAt  time.Time
	UpdatedAt  time.Time `gorm:"index:;index:idx_status_updatedat"`

	ParsedProjects *ProjectProperties `gorm:"-"`
}

func (*Project) AfterFind

func (p *Project) AfterFind(*gorm.DB) error

type ProjectFile

type ProjectFile struct {
	Id         uint      `json:"id"`
	Url        string    `json:"url"`
	Display    string    `json:"display"`
	Name       string    `json:"name"`
	Type       string    `json:"type"`
	Version    string    `json:"version"`
	FileSize   uint64    `json:"filesize"`
	Versions   []string  `json:"versions"`
	Downloads  uint      `json:"downloads"`
	UploadedAt time.Time `json:"uploaded_at"`
}

type ProjectLookup

type ProjectLookup struct {
	Path      string `gorm:"primaryKey;type:VARCHAR(255) COLLATE utf8mb3_unicode_ci"`
	CurseId   *uint
	CreatedAt time.Time
	UpdatedAt time.Time
}

type ProjectMember

type ProjectMember struct {
	Title    string `json:"title"`
	Username string `json:"username"`
	Id       uint   `json:"id"`
}

type ProjectProperties

type ProjectProperties struct {
	Id          uint                     `json:"id"`
	Title       string                   `json:"title"`
	Summary     string                   `json:"summary"`
	Description string                   `json:"description"`
	Game        string                   `json:"game"`
	Type        string                   `json:"type"`
	Urls        map[string]string        `json:"urls"`
	Thumbnail   string                   `json:"thumbnail"`
	CreatedAt   time.Time                `json:"created_at"`
	Downloads   map[string]uint64        `json:"downloads"`
	License     string                   `json:"license"`
	Donate      string                   `json:"donate"`
	Categories  []string                 `json:"categories"`
	Members     []ProjectMember          `json:"members"`
	Links       []string                 `json:"links"`
	Files       []ProjectFile            `json:"files"`
	Versions    map[string][]ProjectFile `json:"versions"`
	Download    *ProjectFile             `json:"download,omitempty"`
}

Jump to

Keyboard shortcuts

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