Documentation
¶
Index ¶
- Constants
- func AddKeyToApp(app *App, key *Key) error
- func InitDataDir() error
- func InitInstallDir() error
- func InstallApp(app *App, version *version.Version) error
- func IsLocked() bool
- func Lock() error
- func RemoveKeyFromApp(app *App, key *Key) error
- func UninstallApp(app *App) error
- func Unlock() error
- type App
- type AppCandidate
- type AppDependency
- type AppList
- func (appList *AppList) AddApp(app *App) error
- func (appList *AppList) AppIndex(app *App) int
- func (appList *AppList) BuildAppHashes()
- func (appList *AppList) BuildLabels()
- func (appList *AppList) Clear()
- func (appList *AppList) RemoveApp(app *App) error
- func (appList *AppList) Save() error
- func (appList *AppList) Search(text string, exact bool) []*App
- type FileSource
- func (fileSource *FileSource) BuildHash()
- func (fileSource *FileSource) Cleanup()
- func (fileSource *FileSource) GetAbsolutePath() string
- func (fileSource *FileSource) GetHash() string
- func (fileSource *FileSource) GetType() string
- func (fileSource *FileSource) MarshalJSON() ([]byte, error)
- func (fileSource *FileSource) String() string
- func (fileSource *FileSource) UnmarshalJSON(data []byte) error
- func (fileSource *FileSource) Update() error
- type GitSource
- func (gitSource *GitSource) BuildHash()
- func (gitSource *GitSource) Cleanup()
- func (gitSource *GitSource) GetAbsolutePath() string
- func (gitSource *GitSource) GetHash() string
- func (gitSource *GitSource) GetType() string
- func (gitSource *GitSource) MarshalJSON() ([]byte, error)
- func (gitSource *GitSource) String() string
- func (gitSource *GitSource) UnmarshalJSON(data []byte) error
- func (gitSource *GitSource) Update() error
- type ISource
- type InstalledAppsIndex
- type Key
- type KeyList
- func (keyList *KeyList) AddKey(key *Key) error
- func (keyList *KeyList) BuildLabels()
- func (keyList *KeyList) GetKey(label string) *Key
- func (keyList *KeyList) HasKey(label string) bool
- func (keyList *KeyList) KeyIndex(key *Key) int
- func (keyList *KeyList) Load() error
- func (keyList *KeyList) RemoveKey(key *Key) error
- type RepoIndex
- type Source
- type SourceList
- type State
- type StateFile
Constants ¶
View Source
const SOURCE_TYPE_FILE = "file"
View Source
const SOURCE_TYPE_GIT = "git"
Variables ¶
This section is empty.
Functions ¶
func AddKeyToApp ¶
func InitDataDir ¶
func InitDataDir() error
func InitInstallDir ¶
func InitInstallDir() error
func RemoveKeyFromApp ¶
func UninstallApp ¶
Types ¶
type App ¶
type App struct { Label string `json:"label, omitempty"` Name string `json:"name, omitempty"` Path string `json:"path, omitempty"` URL string `json:"url, omitempty"` Email string `json:"email, omitempty"` Latest string `json:"latest, omitempty"` Source ISource `json:"source, omitempty"` Candidates []*AppCandidate `json:"candidates, omitempty"` ClientID string `json:"clientID, omitempty"` ClientSecret string `json:"clientSecret, omitempty"` Keys []*Key `json:"keys, omitempty"` // contains filtered or unexported fields }
func (*App) GetCandidate ¶
func (app *App) GetCandidate(version *version.Version) *AppCandidate
func (*App) UnmarshalJSON ¶
type AppCandidate ¶
type AppCandidate struct { Version *version.Version `json:"version"` Dependencies []*AppDependency `json:"dependencies"` Files []string `json:"files"` }
func NewAppCandidate ¶
func NewAppCandidate() *AppCandidate
func (*AppCandidate) GetFilesDir ¶
func (appCandidate *AppCandidate) GetFilesDir() string
type AppDependency ¶
func NewAppDependency ¶
func NewAppDependency() *AppDependency
type AppList ¶
func (*AppList) BuildAppHashes ¶
func (appList *AppList) BuildAppHashes()
func (*AppList) BuildLabels ¶
func (appList *AppList) BuildLabels()
type FileSource ¶
type FileSource struct {
Source
}
func NewFileSource ¶
func NewFileSource(url string) *FileSource
func (*FileSource) BuildHash ¶
func (fileSource *FileSource) BuildHash()
func (*FileSource) Cleanup ¶
func (fileSource *FileSource) Cleanup()
func (*FileSource) GetAbsolutePath ¶
func (fileSource *FileSource) GetAbsolutePath() string
func (*FileSource) GetHash ¶
func (fileSource *FileSource) GetHash() string
func (*FileSource) GetType ¶
func (fileSource *FileSource) GetType() string
func (*FileSource) MarshalJSON ¶
func (fileSource *FileSource) MarshalJSON() ([]byte, error)
func (*FileSource) String ¶
func (fileSource *FileSource) String() string
func (*FileSource) UnmarshalJSON ¶
func (fileSource *FileSource) UnmarshalJSON(data []byte) error
func (*FileSource) Update ¶
func (fileSource *FileSource) Update() error
type GitSource ¶
type GitSource struct {
Source
}
func NewGitSource ¶
func (*GitSource) GetAbsolutePath ¶
func (*GitSource) MarshalJSON ¶
func (*GitSource) UnmarshalJSON ¶
type ISource ¶
type ISource interface { GetType() string Update() error Cleanup() String() string GetAbsolutePath() string GetHash() string BuildHash() }
func SourceFromString ¶
type InstalledAppsIndex ¶
type InstalledAppsIndex struct {
AppList
}
func NewInstalledAppsIndex ¶
func NewInstalledAppsIndex() (*InstalledAppsIndex, error)
func (*InstalledAppsIndex) Build ¶
func (installedAppsIndex *InstalledAppsIndex) Build() error
func (*InstalledAppsIndex) Load ¶
func (installedAppsIndex *InstalledAppsIndex) Load() error
func (*InstalledAppsIndex) Save ¶
func (installedAppsIndex *InstalledAppsIndex) Save() error
type Key ¶
type Key struct { Label string `json:"label"` Data string `json:"data"` Groups []string `json:"groups"` }
func NewKeyFromText ¶
kapi_id="003";kapi_key="f0b8bb52f4c7007938757bcdfc73b452d6ce08cc0c660ce57c5464ae95f35417";kapi_groups="stats,watcher,spender,admin";eval ugroups_${kapi_id}=${kapi_groups};eval ukey_${kapi_id}=${kapi_key}
type KeyList ¶
func NewKeyList ¶
func NewKeyList() *KeyList
func (*KeyList) BuildLabels ¶
func (keyList *KeyList) BuildLabels()
type SourceList ¶
func LoadSourceFile ¶
func LoadSourceFile(path string) (*SourceList, error)
func NewSourceList ¶
func NewSourceList(path string) *SourceList
func (*SourceList) AddSource ¶
func (sourceList *SourceList) AddSource(sourceString string) error
func (*SourceList) RemoveSource ¶
func (sourceList *SourceList) RemoveSource(sourceString string) error
func (*SourceList) Save ¶
func (sourceList *SourceList) Save() error
func (*SourceList) SourceIndex ¶
func (sourceList *SourceList) SourceIndex(sourceString string) int
Click to show internal directories.
Click to hide internal directories.