address

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2023 License: Apache-2.0, BSD-3-Clause Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetVersionFromPath

func GetVersionFromPath(path string) string

func ParseSource

func ParseSource(source string) (string, string, error)

ParseSource return a registry hostname and namespace if the source is an empty string or . the source is local to the filesystem, returns empty hostname and namespace if the source is not local we expect a delineation with a / between a registry hostname and a namespace

Types

type Address

type Address struct {
	HostName  string
	Namespace string
	Name      string
}

func (Address) IsLocal

func (r Address) IsLocal() bool

func (Address) Path

func (r Address) Path() string

func (Address) ProjectName

func (r Address) ProjectName() string

type Package

type Package struct {
	Type               PackageType
	Address            *Address
	Platform           *Platform
	AvailableVersions  versions.List
	VersionConstraints string
	CandidateVersions  versions.List
	SelectedVersion    string
}

func GetPackage

func GetPackage(nsn cache.NSN, source string) (*Package, error)

address -> hostname, namespace, name

func (*Package) AddConstraints

func (r *Package) AddConstraints(constraint string)

func (*Package) BasePath

func (r *Package) BasePath() string

func (*Package) ChecksumURL

func (r *Package) ChecksumURL(version string) string

func (*Package) DirPath

func (r *Package) DirPath(version string) string

func (*Package) FilePath

func (r *Package) FilePath(version string) string

func (*Package) FilePathWithSelectedVersion

func (r *Package) FilePathWithSelectedVersion() string

func (*Package) Filename

func (r *Package) Filename(version string) string

filename is aligned with go releaser

func (*Package) GenerateCandidates

func (r *Package) GenerateCandidates() error

func (*Package) GetReleases

func (r *Package) GetReleases() error

GetReleases returns the avilable releases/versions of the package

func (*Package) GetRemoteChecksum

func (r *Package) GetRemoteChecksum(version string) (string, error)

func (*Package) GetSelectedVersion

func (r *Package) GetSelectedVersion() string

func (*Package) HasVersion

func (r *Package) HasVersion(version string) bool

func (*Package) IsLocal

func (r *Package) IsLocal() bool

func (*Package) Newest

func (r *Package) Newest() string

func (*Package) ReleasesURL

func (r *Package) ReleasesURL() string

func (*Package) URL

func (r *Package) URL(version string) string

func (*Package) UpdateSelectedVersion

func (r *Package) UpdateSelectedVersion(version string)

type PackageType

type PackageType string
const (
	PackageTypeProvider PackageType = "provider"
	PackageTypeModule   PackageType = "module"
)

type Platform

type Platform struct {
	OS, Arch string
}

func (Platform) String

func (r Platform) String() string

type Release

type Release struct {
	Name    string `json:"name"`
	TagName string `json:"tag_name"`
}

Jump to

Keyboard shortcuts

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