types

package
v0.0.0-...-b8dbcf7 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2016 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mod

type Mod struct {
	gorm.Model
	Name     string
	Releases []Release
}

Mod is a capsule description of a mod on CurseForge.

func (*Mod) GetProjectURL

func (mod *Mod) GetProjectURL() *url.URL

GetProjectURL constructs the URL for the Curseforge project itself.

func (*Mod) GetReleasesPageURL

func (mod *Mod) GetReleasesPageURL(page int) *url.URL

GetReleasesPageURL constructs the URL for the Curseforge releases on the given page.

func (*Mod) GetReleasesURL

func (mod *Mod) GetReleasesURL() *url.URL

GetReleasesURL constructs the URL for the Curseforge releases page.

type Release

type Release struct {
	gorm.Model
	ModID                       uint `gorm:"index"`
	Maturity, Filename, Version string
	CurseForgeID                string `gorm:"column:curseforge_id"`
	DateUploaded                time.Time
	MD5sum                      []byte `gorm:"column:md5sum",gorm:"index"`
}

Release is a specific release of a mod.

func (*Release) GetReleaseURL

func (release *Release) GetReleaseURL(mod *Mod) *url.URL

GetReleaseURL returns a URL for the release details page on Curseforge.

func (*Release) MD5

func (release *Release) MD5() string

MD5 formats the release's MD5sum field as a hex string.

Jump to

Keyboard shortcuts

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