servicesdk

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2019 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlreadyExistsError

type AlreadyExistsError struct {
	Hash hash.Hash
}

AlreadyExistsError is an not found error.

func (*AlreadyExistsError) Error

func (e *AlreadyExistsError) Error() string

type Module added in v0.14.0

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

Module is the service module.

func NewModule added in v0.14.0

func NewModule(app *cosmos.AppFactory, c container.Container) *Module

NewModule returns the module of the service sdk.

func (*Module) Create added in v0.14.0

func (s *Module) Create(request cosmostypes.Request, srv *service.Service) (*service.Service, error)

Create creates a new service from definition.

func (*Module) Delete added in v0.14.0

func (s *Module) Delete(request cosmostypes.Request, hash hash.Hash) error

Delete deletes the service by hash.

func (*Module) Get added in v0.14.0

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

Get returns the service that matches given hash.

func (*Module) List added in v0.14.0

func (s *Module) List(request cosmostypes.Request) ([]*service.Service, error)

List returns all services.

type Service

type Service interface {
	Create(srv *service.Service) (*service.Service, error)
	Delete(hash hash.Hash) error
	Get(hash hash.Hash) (*service.Service, error)
	List() ([]*service.Service, error)
}

Service is the interface of this sdk

func NewDeprecated added in v0.14.0

func NewDeprecated(c container.Container, serviceDB *database.ServiceDB) Service

NewDeprecated creates a new Service SDK with given options.

func NewSDK added in v0.14.0

func NewSDK() Service

NewSDK returns the service sdk.

Jump to

Keyboard shortcuts

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