servicesdk

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend added in v0.15.0

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

Backend is the service backend.

func NewBackend added in v0.15.0

func NewBackend(appFactory *cosmos.AppFactory, ownerships *ownershipsdk.Backend) *Backend

NewBackend returns the backend of the service sdk.

func (*Backend) Create added in v0.15.0

func (s *Backend) Create(request cosmostypes.Request, msg *msgCreateService) (*service.Service, error)

Create creates a new service.

func (*Backend) Exists added in v0.16.0

func (s *Backend) 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 (*Backend) Get added in v0.15.0

func (s *Backend) Get(request cosmostypes.Request, hash hash.Hash) (*service.Service, error)

Get returns the service that matches given hash.

func (*Backend) Hash added in v0.16.0

func (s *Backend) Hash(serviceRequest *api.CreateServiceRequest) hash.Hash

Hash returns the hash of a service request.

func (*Backend) List added in v0.15.0

func (s *Backend) 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