Documentation
¶
Index ¶
- Variables
- func AddRepo(name, url string) error
- func AddRepository(name, url string) error
- func Cleanup(apps []string, cache bool) error
- func GetTimestamp() time.Time
- func GetVersion() version.Version
- func Init(force bool) error
- func Install(apps ...string) error
- func RemoveRepo(name string) error
- func Setup(debug bool, level log.Level) error
- func Uninstall(apps ...string) error
- func Update() error
- func Upgrade(apps ...string) error
- type ActionScripts
- type App
- func (a App) Clean() error
- func (a App) CurrentVersion() (string, error)
- func (a App) GetDeprecation() *string
- func (a App) HasUpdate() (bool, error)
- func (a App) Install() error
- func (a App) IsDeprecated() (bool, error)
- func (a App) IsInstalled() bool
- func (a App) LoadManifest() error
- func (a App) Manifest() (*AppManifest, error)
- func (a App) Uninstall() error
- func (a App) Upgrade() error
- type AppManifest
- type AppUpdatePattern
- type AppUpdateSchema
- type AppUpdateType
- type Apps
- type Deprecated
- type GooConfig
- type License
- type Repo
- type RepoManager
- type Repos
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Core schema ErrIsNotInstalled = errors.New("application is not installed") ErrAlreadyInstalled = errors.New("application is already installed") ErrIsUpToDate = errors.New("application is up to date") ErrAlreadyInitialized = errors.New("already initialized! use --force flag") ErrNotInitialized = errors.New("app manager is not initialized. See documentation") ErrRepoNotExist = errors.New("repository is not exist") ErrRepoAlreadyExist = errors.New("repository is already exist") ErrNoUpdates = errors.New("no updates") // manifest / schema ErrManifestUrlEmpty = errors.New("manifest: empty url somewhere") ErrManifestDescriptionEmpty = errors.New("manifest: description is empty") ErrManifestRequiredAnyExec = errors.New("manifest: must defined one execute path") ErrManifestLicenseNameEmpty = errors.New("manifest: empty license name") ErrManifestUrlPatternRequired = errors.New("manifest: must provide url pattern") ErrSchemaIsNotSupportedYet = errors.New("manifest: this schema is not supported yet") ErrSchemaInvalidType = errors.New("manifest: invalid update schema type") ErrSchemaInvalidURL = errors.New("manifest: invalid github repository url") ErrSchemaInvalidPattern = errors.New("manifest: invalid version pattern") ErrSchemaInvalidPath = errors.New("manifest: invalid path or value is not a string") ErrSchemaPathRequired = errors.New("manifest: path is required") ErrSchemaPatternRequired = errors.New("manifest: regex pattern is required") // download / extract ErrArchiveInvalidPath = errors.New("extract: invalid file path") ErrUnsupportedArchive = errors.New("extract: unsupported archive") // inputs ErrInputAlreadyExist = errors.New("already exist") ErrInputEmpty = errors.New("must be not empty") )
View Source
var ( Path string Config GooConfig )
View Source
var ( Version string Timestamp string Revision string ProjectRepoSlug string )
Functions ¶
func AddRepository ¶
func GetTimestamp ¶
func GetVersion ¶
func RemoveRepo ¶
Types ¶
type ActionScripts ¶
type ActionScripts struct {
PreInstall []string `json:"pre_install,omitempty"`
PostInstall []string `json:"post_install,omitempty"`
PreUpdate []string `json:"pre_update,omitempty"`
PostUpdate []string `json:"post_update,omitempty"`
PreUninstall []string `json:"pre_uninstall,omitempty"`
PostUninstall []string `json:"post_uninstall,omitempty"`
}
type App ¶
type App struct {
Name string
// contains filtered or unexported fields
}
func (App) CurrentVersion ¶
func (App) GetDeprecation ¶
func (App) IsDeprecated ¶
func (App) IsInstalled ¶
func (App) LoadManifest ¶
func (App) Manifest ¶
func (a App) Manifest() (*AppManifest, error)
type AppManifest ¶
type AppManifest struct {
Description string `json:"description"` // Application Description
Homepage string `json:"homepage"` // Application Homepage
License License `json:"license"` // Application License
Actions *ActionScripts `json:"actions,omitempty"` // Action Scripts for each installation interaction
Executable []string `json:"executable,omitempty"` // Executable relative path (without extension)
Updates AppUpdateSchema `json:"updates"` // Application Updates Schema
Deprecated *Deprecated `json:"deprecated,omitempty"` // Deprecation for Application
Appendix map[string]string `json:"appendix,omitempty"` // Appendix for OS / Architecture
}
func (AppManifest) CheckUpdate ¶
func (m AppManifest) CheckUpdate() (string, string, error)
func (AppManifest) Validate ¶
func (m AppManifest) Validate() error
type AppUpdatePattern ¶
type AppUpdateSchema ¶
type AppUpdateSchema struct {
OneFile bool `json:"one_file"`
Type AppUpdateType `json:"type"`
URL string `json:"url"`
Pattern AppUpdatePattern `json:"pattern"`
Path *string `json:"path,omitempty"`
VersionRegex *string `json:"version_regex,omitempty"`
}
func (AppUpdateSchema) GetPattern ¶
func (u AppUpdateSchema) GetPattern() string
func (AppUpdateSchema) Validate ¶
func (u AppUpdateSchema) Validate() error
type AppUpdateType ¶
type AppUpdateType int
const ( AppUpdateHTML AppUpdateType = iota AppUpdateXML AppUpdateJSON AppUpdateGitHub )
func (AppUpdateType) MarshalJSON ¶
func (t AppUpdateType) MarshalJSON() ([]byte, error)
func (AppUpdateType) String ¶
func (t AppUpdateType) String() string
func (*AppUpdateType) UnmarshalJSON ¶
func (t *AppUpdateType) UnmarshalJSON(data []byte) error
type Deprecated ¶
type Deprecated struct {
Reason string `json:"reason" yaml:"reason"`
Since string `json:"since" yaml:"since"`
Alternative *string `json:"alternative,omitempty" yaml:"alternative,omitempty"`
}
func (*Deprecated) IsDeprecated ¶
func (d *Deprecated) IsDeprecated() bool
type GooConfig ¶
type GooConfig struct {
Debug bool `yaml:"debug"`
LogLevel log.Level `yaml:"log_level"`
LogFormat string `yaml:"log_format"`
LogPanic log.Level `yaml:"log_panic"`
FollowRedirects bool `yaml:"follow_redirects"`
RedirectCount int `yaml:"redirect_count"`
CheckUpdates bool `yaml:"check_updates"`
SkipFailure bool `yaml:"skip_failure"`
}
type RepoManager ¶
type RepoManager struct {
Repo
}
func (RepoManager) AddApplication ¶
func (r RepoManager) AddApplication() error
func (RepoManager) Init ¶
func (r RepoManager) Init() error
func (RepoManager) RemoveApplications ¶
func (r RepoManager) RemoveApplications(names ...string) error
func (RepoManager) Validate ¶
func (r RepoManager) Validate() error
type Repos ¶
type Repos []Repo
func Repositories ¶
func Repositories() Repos
func (Repos) Applications ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.