news

package
v0.54.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GithubReleasesEndpoint string = "https://api.github.com/repos/xvello/letsblockit/releases?per_page=20"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Release

type Release struct {
	Id          int
	Link        string
	Description string
	CreatedAt   time.Time
	PublishedAt time.Time
	TagName     string
	GithubUrl   string
}

func (Release) Date

func (r Release) Date() string

type Releases added in v0.36.0

type Releases struct {
	// contains filtered or unexported fields
}

Releases fetches and parses the github releases for a repository. The parsed results are cached in memory until the next restart.

func DownloadReleases added in v0.36.0

func DownloadReleases(url string, cacheDir string, officialInstance bool, templates fs.ReadDirFS) (*Releases, error)

func (*Releases) GetLatestAt added in v0.36.0

func (c *Releases) GetLatestAt() time.Time

func (*Releases) GetReleases added in v0.36.0

func (c *Releases) GetReleases() ([]*Release, string)

Jump to

Keyboard shortcuts

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