Documentation ¶
Index ¶
Constants ¶
const ( StatusSucceeded = "succeeded" StatusCanceled = "canceled" StatusFailed = "failed" StatusRunning = "running" StatusPending = "pending" StatusUnknown = "unknown" // Deprecated: StatusSuccess has been replaced by StatusSucceeded. StatusSuccess = StatusSucceeded // Deprecated: StatusFailure has been replaced by StatusFailed. StatusFailure = StatusFailed )
Status constants define the CNAB status fields on a Result.
const ( ActionInstall = "install" ActionUpgrade = "upgrade" ActionUninstall = "uninstall" ActionUnknown = "unknown" )
Action constants define the CNAB action to be taken
const ItemType = "claims"
ItemType is the location in the backing store where claims are persisted.
Variables ¶
var CNABSpecVersion string = "cnab-claim-1.0.0-DRAFT+d7ffba8"
CNABSpecVersion represents the CNAB Spec version of the Claim that this library implements This value is prefixed with e.g. `cnab-claim-` so isn't itself valid semver.
var ErrClaimNotFound = errors.New("Claim does not exist")
ErrClaimNotFound represents a claim not found in claim storage
var ValidName = regexp.MustCompile("^[a-zA-Z0-9._-]+$")
ValidName is a regular expression that indicates whether a name is a valid claim name.
Functions ¶
func GetDefaultSchemaVersion ¶
GetDefaultSchemaVersion returns the default semver CNAB schema version of the Claim that this library implements
Types ¶
type Claim ¶
type Claim struct { SchemaVersion schema.Version `json:"schemaVersion"` Installation string `json:"installation"` Revision string `json:"revision"` Created time.Time `json:"created"` Modified time.Time `json:"modified"` Bundle *bundle.Bundle `json:"bundle"` BundleReference string `json:"bundleReference,omitempty"` Result Result `json:"result,omitempty"` Parameters map[string]interface{} `json:"parameters,omitempty"` Outputs map[string]interface{} `json:"outputs,omitempty"` Custom interface{} `json:"custom,omitempty"` }
Claim is an installation claim receipt.
Claims represent information about a particular installation, and provide the necessary data to upgrade and uninstall a CNAB package.
type Result ¶
type Result struct { Message string `json:"message,omitempty"` Action string `json:"action"` Status string `json:"status"` }
Result tracks the result of an operation on a CNAB installation
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is a persistent store for claims.
func NewClaimStore ¶
NewClaimStore creates a persistent store for claims using the specified backing key-blob store.