resolver

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_PROXY_URL = "https://proxy.golang.org"

Variables

This section is empty.

Functions

func IsSemver added in v0.1.8

func IsSemver(version string) bool

check if the given string is valid semver string and if yest create a constraint checker out of it

Types

type GitHub added in v0.1.1

type GitHub struct {
	// Client is the GitHub client.
	Client *github.Client
}

type Plumbing added in v0.1.4

type Plumbing struct {
	Hash    string
	Version string
}

type PlumbingWithRange added in v0.1.4

type PlumbingWithRange struct {
	Version goSem.Version
	Hash    string
}

type Resolver

type Resolver struct {
	Pkg             string
	Value           string
	Hash            bool
	ConstraintCheck *semver.Constraints
}

func (*Resolver) GithubFallbackResolveVersion added in v0.1.1

func (v *Resolver) GithubFallbackResolveVersion() (PlumbingWithRange, error)

func (*Resolver) ParseVersion

func (v *Resolver) ParseVersion(version string) error

Parse the given string to be either a semver version string or a commit hash

func (*Resolver) ResolveClosestVersion

func (v *Resolver) ResolveClosestVersion() (string, error)

Resolve the closes version to the given semver from the proxy

func (*Resolver) ResolveLatestVersion

func (v *Resolver) ResolveLatestVersion() (VersionInfo, error)

resolve the latest version from the proxy

func (*Resolver) ResolveVersion

func (v *Resolver) ResolveVersion() (string, error)

Resolve the version for the given package by checking with the proxy for either the specified version or getting the latest version on the proxy

type VersionInfo

type VersionInfo struct {
	Version string    // version string
	Time    time.Time // commit time
}

Jump to

Keyboard shortcuts

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