Documentation ¶
Index ¶
- Variables
- func HandleHTTPError(resp *http.Response) error
- func NewCmdExtension(f *cmdutil.Factory) *cobra.Command
- func RESTPrefix(hostname string) string
- type AliasCollection
- type AliasExtension
- type Command
- type Extension
- func (e *Extension) Aliases() ([]extensions.Alias, error)
- func (e *Extension) Commands() ([]extensions.Command, error)
- func (e *Extension) CurrentVersion() string
- func (e *Extension) IsBinary() bool
- func (e *Extension) IsLocal() bool
- func (e *Extension) IsPinned() bool
- func (e *Extension) Name() string
- func (e *Extension) Path() string
- func (e *Extension) TemplatePath() string
- func (e *Extension) URL() string
- func (e *Extension) UpdateAvailable() bool
- func (e *Extension) ViewPath() string
- type ExtensionFile
- type ExtensionItemCollection
- type ExtensionKind
- type ExtensionSource
- type Manager
- func (m *Manager) Create(name string, tmplType extensions.ExtTemplateType) error
- func (m *Manager) Dispatch(args []string, stdin io.Reader, stdout, stderr io.Writer) (bool, error)
- func (m *Manager) EnableDryRunMode()
- func (m *Manager) Execute(exe string, args []string, isBinary bool, stdin io.Reader, ...) (bool, error)
- func (m *Manager) Install(repo ghrepo.Interface, name string, target string) error
- func (m *Manager) InstallLocal(dir string, name string) error
- func (m *Manager) List() []extensions.Extension
- func (m *Manager) Remove(name string) error
- func (m *Manager) SetClient(client *http.Client)
- func (m *Manager) SetConfig(cfg config.Config)
- func (m *Manager) Upgrade(name string, force bool) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCommitNotFound = errors.New("commit not found")
View Source
var ErrLocalExtensionUpgrade = errors.New("local extensions can not be updated")
View Source
var ErrNoExtensionsInstalled = errors.New("no extensions installed")
View Source
var ErrPinnedExtensionUpgrade = errors.New("pinned extensions can not be updated")
View Source
var ErrReleaseNotFound = errors.New("release not found")
View Source
var ErrRepositoryNotFound = errors.New("repository not found")
View Source
var ErrUpToDate = errors.New("already up to date")
View Source
var ExtPrefix = "c8y-"
Functions ¶
func HandleHTTPError ¶
func RESTPrefix ¶
Types ¶
type AliasCollection ¶
type AliasCollection struct { Name string Aliases []extensions.Alias }
type AliasExtension ¶
type AliasExtension struct { Source string `json:"-" yaml:"-"` Name string `json:"name,omitempty" yaml:"name,omitempty"` Command string `json:"command,omitempty" yaml:"command,omitempty"` Description string `json:"description,omitempty" yaml:"description,omitempty"` Shell bool `json:"shell" yaml:"shell"` }
func (*AliasExtension) GetCommand ¶
func (a *AliasExtension) GetCommand() string
func (*AliasExtension) GetDescription ¶
func (a *AliasExtension) GetDescription() string
func (*AliasExtension) GetName ¶
func (a *AliasExtension) GetName() string
func (*AliasExtension) IsShell ¶
func (a *AliasExtension) IsShell() bool
type Command ¶
type Command struct {
// contains filtered or unexported fields
}
func (*Command) Description ¶
type Extension ¶
type Extension struct {
// contains filtered or unexported fields
}
func (*Extension) Aliases ¶
func (e *Extension) Aliases() ([]extensions.Alias, error)
Custom extension components
func (*Extension) CurrentVersion ¶
func (*Extension) TemplatePath ¶
func (*Extension) UpdateAvailable ¶
type ExtensionFile ¶
type ExtensionFile struct {
Aliases []AliasExtension `json:"aliases,omitempty" yaml:"aliases,omitempty"`
}
type ExtensionItemCollection ¶
type ExtensionItemCollection struct {
Items []ExtensionSource
}
func NewExtensionItemCollection ¶
func NewExtensionItemCollection() *ExtensionItemCollection
func (*ExtensionItemCollection) Add ¶
func (t *ExtensionItemCollection) Add(name string, paths []string)
func (*ExtensionItemCollection) AddSources ¶
func (t *ExtensionItemCollection) AddSources(sources []ExtensionSource)
type ExtensionSource ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func (*Manager) Create ¶
func (m *Manager) Create(name string, tmplType extensions.ExtTemplateType) error
func (*Manager) EnableDryRunMode ¶
func (m *Manager) EnableDryRunMode()
func (*Manager) Install ¶
Install installs an extension from repo, and pins to commitish if provided
func (*Manager) List ¶
func (m *Manager) List() []extensions.Extension
Click to show internal directories.
Click to hide internal directories.