Documentation
¶
Index ¶
- Constants
- func DigestDirectory(root string) (string, error)
- func DigestFile(path string) (string, error)
- func ValidatePackage(packageDir string) error
- type ActivateResult
- type ErrDocumentIdentityMismatch
- type Error
- type InstallRequest
- type InstallResult
- type Manager
- func (m *Manager) Activate(ctx context.Context, skill, version string) (ActivateResult, error)
- func (m *Manager) Install(ctx context.Context, req InstallRequest) (InstallResult, error)
- func (m *Manager) Rollback(ctx context.Context, skill string) (RollbackResult, error)
- func (m *Manager) Validate(ctx context.Context, req ValidateRequest) (ValidateResult, error)
- type RollbackResult
- type SkillDocument
- type ValidateIssue
- type ValidateRequest
- type ValidateResult
Constants ¶
View Source
const ( ErrInvalidPackage = "INVALID_SKILL_PACKAGE" ErrDigestMismatch = "SKILL_DIGEST_MISMATCH" ErrDocumentInvalid = "SKILL_DOCUMENT_INVALID" ErrInstallFailed = "SKILL_INSTALL_FAILED" ErrActivateFailed = "SKILL_ACTIVATE_FAILED" )
Variables ¶
This section is empty.
Functions ¶
func DigestDirectory ¶
func DigestFile ¶
func ValidatePackage ¶
Types ¶
type ActivateResult ¶
type ErrDocumentIdentityMismatch ¶
type ErrDocumentIdentityMismatch struct {
Skill string
Version string
Document SkillDocument
}
func (ErrDocumentIdentityMismatch) Error ¶
func (e ErrDocumentIdentityMismatch) Error() string
type InstallRequest ¶
type InstallResult ¶
type Manager ¶
type Manager struct {
State *skillstate.Store
HTTPClient *http.Client
MaxDownload int64
}
func (*Manager) Install ¶
func (m *Manager) Install(ctx context.Context, req InstallRequest) (InstallResult, error)
func (*Manager) Validate ¶
func (m *Manager) Validate(ctx context.Context, req ValidateRequest) (ValidateResult, error)
type RollbackResult ¶
type SkillDocument ¶
type SkillDocument struct {
Name string `json:"name"`
Description string `json:"description"`
Version string `json:"version"`
Body string `json:"body,omitempty"`
}
func LoadSkillDocument ¶
func LoadSkillDocument(packageDir string) (SkillDocument, error)
func ParseSkillDocument ¶
func ParseSkillDocument(data []byte) (SkillDocument, error)
type ValidateIssue ¶
type ValidateRequest ¶
type ValidateResult ¶
type ValidateResult struct {
Valid bool `json:"valid"`
Source string `json:"source"`
Digest string `json:"digest,omitempty"`
Document SkillDocument `json:"document,omitempty"`
Issues []ValidateIssue `json:"issues"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.