servicesdk

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 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 AlreadyExistsError

type AlreadyExistsError struct {
	Hash hash.Hash
}

AlreadyExistsError is an not found error.

func (*AlreadyExistsError) Error

func (e *AlreadyExistsError) Error() string

type Service

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

Service exposes service APIs of MESG.

func New

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

New creates a new Service SDK with given options.

func (*Service) Create

func (s *Service) Create(srv *service.Service) (*service.Service, error)

Create creates a new service from definition.

func (*Service) Delete

func (s *Service) Delete(hash hash.Hash) error

Delete deletes the service by hash.

func (*Service) Get

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

Get returns the service that matches given hash.

func (*Service) List

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