Documentation ¶
Index ¶
- Variables
- func AppPath(ev Env, app App) string
- func Link(ev Env, version Version) error
- func Unlink(ev Env, app App) error
- func ValidateName(name string) error
- func ValidateOwner(owner string) error
- func ValidateTag(tag string) (semver.Version, error)
- func VersionPath(ev Env, version Version) string
- func WalkAppVersions(ev Env, app App, walk VersionWalker) error
- func WalkInstalledVersions(ev Env, walk VersionWalker) error
- func WalkVersions(ev Env, walk VersionWalker) error
- type App
- type AppSpec
- type Asset
- type Env
- type Release
- type Repo
- type Version
- func Download(ctx context.Context, ev Env, client *github.Client, release Release) (*Version, error)
- func FindVersion(ev Env, spec VersionSpec) (*Version, error)
- func ListAppVersions(ev Env, app App) ([]Version, error)
- func ListInstalledVersions(ev Env) ([]Version, error)
- func ListVersions(ev Env) ([]Version, error)
- func ParseVersionPath(ev Env, path string) (*Version, error)
- func ReleaseVersion(release Release) Version
- type VersionSpec
- type VersionSpecs
- type VersionWalker
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrAppNotFound = errors.New("app not found")
)
View Source
var (
ErrAssetNotFound = errors.New("asset not found")
)
View Source
var (
ErrVersionNotFound = errors.New("version not found")
)
Functions ¶
func ValidateName ¶
func ValidateOwner ¶
func VersionPath ¶
func WalkAppVersions ¶
func WalkAppVersions(ev Env, app App, walk VersionWalker) error
func WalkInstalledVersions ¶
func WalkInstalledVersions(ev Env, walk VersionWalker) error
func WalkVersions ¶
func WalkVersions(ev Env, walk VersionWalker) error
Types ¶
type AppSpec ¶
type AppSpec struct {
// contains filtered or unexported fields
}
AppSpec specifies a release in the GitHub. AppSpec can accept "owner/name@tag" notation. If "@tag" is ommited, it means latest tag.
func ParseAppSpec ¶
type Env ¶
type Env interface { Architecture() string Bin() string Cache() string GithubHost() string GithubUser() string Hooks() []string Man() string OS() string }
Env is an interface generated for "github.com/kyoh86/gordon/internal/env.Access".
type Release ¶
type Release struct { Repo // contains filtered or unexported fields }
func FindRelease ¶
func (Release) Spec ¶
func (r Release) Spec() VersionSpec
type Version ¶
type Version struct { App // contains filtered or unexported fields }
func FindVersion ¶
func FindVersion(ev Env, spec VersionSpec) (*Version, error)
func ListInstalledVersions ¶
func ListVersions ¶
func ReleaseVersion ¶
func (Version) Spec ¶ added in v0.0.6
func (v Version) Spec() VersionSpec
type VersionSpec ¶
type VersionSpec struct { AppSpec // contains filtered or unexported fields }
VersionSpec specifies a release in the GitHub. VersionSpec can accept "owner/name@tag" notation. If "@tag" is ommited, it means latest tag.
func ParseVersionSpec ¶
func ParseVersionSpec(rawRelease string) (*VersionSpec, error)
func (*VersionSpec) Set ¶
func (v *VersionSpec) Set(rawRelease string) error
Set text as VersionSpec
func (VersionSpec) String ¶
func (v VersionSpec) String() string
func (VersionSpec) Tag ¶
func (v VersionSpec) Tag() string
func (VersionSpec) WithoutTag ¶ added in v0.0.6
func (v VersionSpec) WithoutTag() VersionSpec
type VersionSpecs ¶
type VersionSpecs []VersionSpec
VersionSpecs is array of VersionSpec
func (VersionSpecs) IsCumulative ¶
func (VersionSpecs) IsCumulative() bool
func (*VersionSpecs) Set ¶
func (v *VersionSpecs) Set(value string) error
Set will add a text to VersionSpecs as a VersionSpec
func (VersionSpecs) String ¶
func (v VersionSpecs) String() string
type VersionWalker ¶
Click to show internal directories.
Click to hide internal directories.