source

package
v0.0.0-...-1066d93 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package source is used to fetch the latest version information from upstream

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GHAsset

type GHAsset struct {
	URL           string `json:"url"`
	ID            int64  `json:"id"`
	Name          string `json:"name"`
	ContentType   string `json:"content_type"`
	State         string `json:"state"`
	Size          uint64 `json:"size"`
	DownloadCount uint64 `json:"download_count"`
	DownloadURL   string `json:"browser_download_url"`
	CreatedAt     GHTime `json:"created_at"`
	UpdatedAt     GHTime `json:"updated_at"`
}

type GHRelease

type GHRelease struct {
	URL             string     `json:"url"`
	HTMLURL         string     `json:"html_url"`
	ID              int64      `json:"id"`
	TagName         string     `json:"tag_name"`
	TargetCommitish string     `json:"target_commitish"`
	Name            string     `json:"name"`
	Draft           bool       `json:"draft"`
	Prerelease      bool       `json:"prerelease"`
	CreatedAt       GHTime     `json:"created_at"`
	PublishedAt     GHTime     `json:"published_at"`
	Assets          []*GHAsset `json:"assets"`
}

type GHTime

type GHTime time.Time

func (*GHTime) UnmarshalJSON

func (t *GHTime) UnmarshalJSON(data []byte) (err error)

type Results

type Results struct {
	VerMap  map[string]string // list of keys and values for a given source, e.g. tag=digest
	VerMeta map[string]any    // additional metadata specific to each source, e.g. GitHub release metadata
}

Results are returned by a source for a given request.

func Get

func Get(src config.Source) (Results, error)

Jump to

Keyboard shortcuts

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