inprocess

package
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 25, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store is an inprocess storage engine for draft.

func NewStore

func NewStore() *Store

NewStore returns a new inprocess memory Store for storing draft application context.

func (*Store) CreateBuild

func (s *Store) CreateBuild(ctx context.Context, appName string, build *storage.Object) error

CreateBuild creates new storage for the application specified by appName to include build.

If storage already exists for the application, ErrAppStorageExists is returned.

CreateBuild implements storage.Creater.

func (*Store) DeleteBuild

func (s *Store) DeleteBuild(ctx context.Context, appName, buildID string) (*storage.Object, error)

DeleteBuild deletes the draft build given by buildID for the application specified by appName.

DeleteBuild implements storage.Deleter.

func (*Store) DeleteBuilds

func (s *Store) DeleteBuilds(ctx context.Context, appName string) ([]*storage.Object, error)

DeleteBuilds deletes all draft builds for the application specified by appName.

DeleteBuilds implements storage.Deleter.

func (*Store) GetBuild

func (s *Store) GetBuild(ctx context.Context, appName, buildID string) (*storage.Object, error)

GetBuild returns the build associated with buildID for the specified app name.

GetBuild implements storage.Getter.

func (*Store) GetBuilds

func (s *Store) GetBuilds(ctx context.Context, appName string) ([]*storage.Object, error)

GetBuilds returns a slice of builds for the given app name.

GetBuilds implements storage.Getter.

func (*Store) UpdateBuild

func (s *Store) UpdateBuild(ctx context.Context, appName string, build *storage.Object) error

UpdateBuild updates the application storage specified by appName to include build.

If build does not exist, a new storage entry is created. Otherwise the existing storage is updated.

UpdateBuild implements storage.Updater.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL