Documentation ¶
Overview ¶
Package storage is a generated protocol buffer package.
It is generated from these files:
object.proto
It has these top-level messages:
Object
Index ¶
- func EncodeToString(obj *Object) (string, error)
- func NewErrAppBuildExists(appName, buildID string) error
- func NewErrAppBuildNotFound(appName, buildID string) error
- func NewErrAppStorageExists(appName string) error
- func NewErrAppStorageNotFound(appName string) error
- type Creator
- type Deleter
- type Getter
- type Object
- type Store
- type Updater
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodeToString ¶
EncodeToString returns the base64 encoding of a protobuf encoded storage.Object.
err != nil if the protobuf marshaling fails; otherwise nil.
func NewErrAppBuildExists ¶
NewErrAppBuildExists returns a formatted error specifying the storage object for build with buildID already exists.
func NewErrAppBuildNotFound ¶
NewErrAppBuildNotFound returns a formatted error specifying the storage object for build with buildID does not exist.
func NewErrAppStorageExists ¶
NewErrAppStorageExists returns a formatted error specifying the storage for application specified by appName already exists.
func NewErrAppStorageNotFound ¶
NewErrAppStorageNotFound returns a formatted error specifying the storage for application specified by appName does not exist.
Types ¶
type Creator ¶
type Creator interface { // CreateBuild creates and stores a new build. CreateBuild(ctx context.Context, appName string, build *Object) error }
Creator represents the create APIs of the storage engine.
type Deleter ¶
type Deleter interface { // DeleteBuilds deletes all draft builds for the application specified by appName. DeleteBuilds(ctx context.Context, appName string) ([]*Object, error) // DeleteBuild deletes the draft build given by buildID for the application specified by appName. DeleteBuild(ctx context.Context, appName, buildID string) (*Object, error) }
Deleter represents the delete APIs of the storage engine.
type Getter ¶
type Getter interface { // GetBuilds retrieves all draft builds from storage. GetBuilds(ctx context.Context, appName string) ([]*Object, error) // GetBuild retrieves the draft build by id from storage. GetBuild(ctx context.Context, appName, buildID string) (*Object, error) }
Getter represents the retrieval APIs of the storage engine.
type Object ¶
type Object struct { BuildID string `protobuf:"bytes,1,opt,name=buildID" json:"buildID,omitempty"` Release string `protobuf:"bytes,2,opt,name=release" json:"release,omitempty"` ContextID []byte `protobuf:"bytes,3,opt,name=contextID,proto3" json:"contextID,omitempty"` }
Object is the storage object for a draft applications build history.
func DecodeString ¶
DecodeString returns the storage.Object decoded from a base64 encoded protobuf string.
err != nil if decoding fails.
func (*Object) Descriptor ¶
func (*Object) GetBuildID ¶
func (*Object) GetContextID ¶
func (*Object) GetRelease ¶
func (*Object) ProtoMessage ¶
func (*Object) ProtoMessage()