Documentation
¶
Index ¶
- type Platform
- func (t *Platform) GetCocoon(ctx context.Context, id string) (*types.Cocoon, error)
- func (t *Platform) GetCocoonAndLastActiveRelease(ctx context.Context, cocoonID string, includePrivateFields bool) (*types.Cocoon, *types.Release, error)
- func (t *Platform) GetCocoonAndRelease(ctx context.Context, cocoonID, releaseID string, includePrivateFields bool) (*types.Cocoon, *types.Release, error)
- func (t *Platform) GetIdentity(ctx context.Context, id string) (*types.Identity, error)
- func (t *Platform) GetOrdererDiscoverer() *orderer.Discovery
- func (t *Platform) GetRelease(ctx context.Context, id string, includePrivateFields bool) (*types.Release, error)
- func (t *Platform) GetScheduler() scheduler.Scheduler
- func (t *Platform) PutCocoon(ctx context.Context, cocoon *types.Cocoon) error
- func (t *Platform) PutIdentity(ctx context.Context, identity *types.Identity) error
- func (t *Platform) PutRelease(ctx context.Context, release *types.Release) error
- func (t *Platform) Stop()
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 ¶
NewPlatform creates a new transaction object
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 ¶
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 ¶
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 ¶
GetScheduler returns the scheduler
func (*Platform) PutCocoon ¶
PutCocoon adds a new cocoon. If another cocoon with a matching key exists, it is effectively shadowed
func (*Platform) PutIdentity ¶
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 ¶
PutRelease adds a new release. If another release with a matching key exists, it is effectively shadowed