servicesdk

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: 13 Imported by: 0

Documentation

Index

Constants

View Source
const ModuleName = "service"

ModuleName is the name of this module.

Variables

This section is empty.

Functions

func NewModule added in v0.14.0

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, ownerships *ownershipsdk.Keeper) *Keeper

NewKeeper initialize a new keeper.

func (*Keeper) Create added in v0.18.3

func (k *Keeper) Create(request cosmostypes.Request, msg *msgCreateService) (*service.Service, error)

Create creates a new service.

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) Get added in v0.18.3

func (k *Keeper) Get(request cosmostypes.Request, hash hash.Hash) (*service.Service, error)

Get returns the service that matches given hash.

func (*Keeper) Hash added in v0.18.3

func (k *Keeper) Hash(serviceRequest *api.CreateServiceRequest) hash.Hash

Hash returns the hash of a service request.

func (*Keeper) List added in v0.18.3

func (k *Keeper) List(request cosmostypes.Request) ([]*service.Service, error)

List returns all services.

type SDK added in v0.15.0

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

SDK is the service sdk.

func New

func New(client *cosmos.Client) *SDK

New returns the service sdk.

func (*SDK) Create added in v0.15.0

func (s *SDK) Create(req *api.CreateServiceRequest) (*service.Service, error)

Create creates a new service from definition.

func (*SDK) Exists added in v0.16.0

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

Exists returns if a service already exists.

func (*SDK) Get added in v0.15.0

func (s *SDK) Get(hash hash.Hash) (*service.Service, error)

Get returns the service that matches given hash.

func (*SDK) Hash added in v0.16.0

func (s *SDK) Hash(req *api.CreateServiceRequest) (hash.Hash, error)

Hash returns the calculate hash of a service.

func (*SDK) List added in v0.15.0

func (s *SDK) List() ([]*service.Service, error)

List returns all services.

Jump to

Keyboard shortcuts

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