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
- func SortByCreatedAt(objs []*Object)
- type Creator
- type Deleter
- type Getter
- type Object
- func (*Object) Descriptor() ([]byte, []int)
- func (m *Object) GetBuildID() string
- func (m *Object) GetContextID() []byte
- func (m *Object) GetCreatedAt() *google_protobuf.Timestamp
- func (m *Object) GetLogsFileRef() string
- func (m *Object) GetRelease() string
- func (*Object) ProtoMessage()
- func (m *Object) Reset()
- func (m *Object) String() string
- 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.
func SortByCreatedAt ¶ added in v0.12.0
func SortByCreatedAt(objs []*Object)
SortByCreatedAt returns the list of storage objects sorted by an object's created at timestamp (in seconds).
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"` LogsFileRef string `protobuf:"bytes,4,opt,name=logs_file_ref,json=logsFileRef" json:"logs_file_ref,omitempty"` CreatedAt *google_protobuf.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt" json:"created_at,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) GetCreatedAt ¶ added in v0.12.0
func (m *Object) GetCreatedAt() *google_protobuf.Timestamp
func (*Object) GetLogsFileRef ¶ added in v0.11.0
func (*Object) GetRelease ¶
func (*Object) ProtoMessage ¶
func (*Object) ProtoMessage()