platform

package
v0.0.0-...-7b2e207 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2018 License: AGPL-3.0 Imports: 12 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Platform

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

Platform represents a collection of methods for performing common platform business logic that involves identity, cocoons and other platform resources

func NewPlatform

func NewPlatform() (*Platform, error)

NewPlatform creates a new transaction object

func (*Platform) GetCocoon

func (t *Platform) GetCocoon(ctx context.Context, id string) (*types.Cocoon, error)

GetCocoon gets a cocoon with a matching id.

func (*Platform) GetCocoonAndLastActiveRelease

func (t *Platform) GetCocoonAndLastActiveRelease(ctx context.Context, cocoonID string, includePrivateFields bool) (*types.Cocoon, *types.Release, error)

GetCocoonAndLastActiveRelease fetches a cocoon with the release that was last deployed or last created. Set includePrivateFields to true to include private fields of the cocoon and release

func (*Platform) GetCocoonAndRelease

func (t *Platform) GetCocoonAndRelease(ctx context.Context, cocoonID, releaseID string, includePrivateFields bool) (*types.Cocoon, *types.Release, error)

GetCocoonAndRelease fetches a cocoon and a release that once. Returns error if either of them are not found.

func (*Platform) GetIdentity

func (t *Platform) GetIdentity(ctx context.Context, id string) (*types.Identity, error)

GetIdentity gets an existing identity and returns an identity object. Since an identity password is never saved along side the rest of the other identity field on the system public ledger, it is retrieved from the private system ledger where it is stored separately.

func (*Platform) GetOrdererDiscoverer

func (t *Platform) GetOrdererDiscoverer() *orderer.Discovery

GetOrdererDiscoverer returns the orderer discover used

func (*Platform) GetRelease

func (t *Platform) GetRelease(ctx context.Context, id string, includePrivateFields bool) (*types.Release, error)

GetRelease gets an existing release and returns a release object. Passing true to includePrivateFields will fetch other field values stored on the private system ledger.

func (*Platform) GetScheduler

func (t *Platform) GetScheduler() scheduler.Scheduler

GetScheduler returns the scheduler

func (*Platform) PutCocoon

func (t *Platform) PutCocoon(ctx context.Context, cocoon *types.Cocoon) error

PutCocoon adds a new cocoon. If another cocoon with a matching key exists, it is effectively shadowed

func (*Platform) PutIdentity

func (t *Platform) PutIdentity(ctx context.Context, identity *types.Identity) error

PutIdentity adds a new identity. If another identity with a matching key exists, it is effectively shadowed. The identity password is not saved to the systems public ledger but on the system private ledger.

func (*Platform) PutRelease

func (t *Platform) PutRelease(ctx context.Context, release *types.Release) error

PutRelease adds a new release. If another release with a matching key exists, it is effectively shadowed

func (*Platform) Stop

func (t *Platform) Stop()

Stop stops the orderer discoverer service

Jump to

Keyboard shortcuts

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