instancesdk

package
v0.18.3 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const ModuleName = "instance"

ModuleName is the name of this module.

Variables

This section is empty.

Functions

func NewModule added in v0.18.3

func NewModule(k *Keeper) module.AppModule

NewModule returns the module of this sdk.

Types

type Keeper added in v0.18.3

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

Keeper holds the logic to read and write data.

func NewKeeper added in v0.18.3

func NewKeeper(storeKey *cosmostypes.KVStoreKey) *Keeper

NewKeeper initialize a new keeper.

func (*Keeper) Exists added in v0.18.3

func (k *Keeper) Exists(request cosmostypes.Request, hash hash.Hash) (bool, error)

Exists returns true if a specific set of data exists in the database, false otherwise

func (*Keeper) FetchOrCreate added in v0.18.3

func (k *Keeper) FetchOrCreate(request cosmostypes.Request, serviceHash hash.Hash, envHash hash.Hash) (*instance.Instance, error)

FetchOrCreate creates a new instance if needed.

func (*Keeper) Get added in v0.18.3

func (k *Keeper) Get(request cosmostypes.Request, hash hash.Hash) (*instance.Instance, error)

Get returns the instance that matches given hash.

func (*Keeper) List added in v0.18.3

List returns all instances.

type SDK added in v0.17.0

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

SDK is the instance sdk.

func New

func New(client *cosmos.Client) *SDK

New returns the instance sdk.

func (*SDK) Exists added in v0.17.0

func (s *SDK) Exists(hash hash.Hash) (bool, error)

Exists returns if a instance already exists.

func (*SDK) Get added in v0.17.0

func (s *SDK) Get(hash hash.Hash) (*instance.Instance, error)

Get returns the instance that matches given hash.

func (*SDK) List added in v0.17.0

List returns all instances.

Jump to

Keyboard shortcuts

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