registryservice

package
v0.0.0-...-d88b44b Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2021 License: Apache-2.0 Imports: 13 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Networks = map[string]bool{
		"pollen":   true,
		"nectar":   true,
		"internal": true,
		"test":     true,
	}
)

Functions

This section is empty.

Types

type HTTPHandler

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

func NewHTTPHandler

func NewHTTPHandler(service registry.Service, logger *zap.SugaredLogger) *HTTPHandler

func (*HTTPHandler) AddFilter

func (h *HTTPHandler) AddFilter(c echo.Context) error

func (*HTTPHandler) DeleteAssetByID

func (h *HTTPHandler) DeleteAssetByID(c echo.Context) error

func (*HTTPHandler) DeleteAssetByName

func (h *HTTPHandler) DeleteAssetByName(c echo.Context) error

func (*HTTPHandler) DeleteFilter

func (h *HTTPHandler) DeleteFilter(c echo.Context) error

func (*HTTPHandler) LoadAsset

func (h *HTTPHandler) LoadAsset(c echo.Context) error

func (*HTTPHandler) LoadAssets

func (h *HTTPHandler) LoadAssets(c echo.Context) error

func (*HTTPHandler) LoadFilter

func (h *HTTPHandler) LoadFilter(c echo.Context) error

func (*HTTPHandler) SaveAsset

func (h *HTTPHandler) SaveAsset(c echo.Context) error

type Service

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

func NewService

func NewService(mongoDB *mongo.Database) *Service

func (*Service) DeleteAssetByID

func (s *Service) DeleteAssetByID(ctx context.Context, network string, ID string) (err error)

func (*Service) DeleteAssetByName

func (s *Service) DeleteAssetByName(ctx context.Context, network string, name string) (err error)

func (*Service) LoadAsset

func (s *Service) LoadAsset(ctx context.Context, network string, ID string) (asset *registry.Asset, err error)

func (*Service) LoadAssets

func (s *Service) LoadAssets(ctx context.Context, network string, IDs ...string) (assets []*registry.Asset, err error)

func (*Service) SaveAsset

func (s *Service) SaveAsset(ctx context.Context, network string, asset *registry.Asset) error

Jump to

Keyboard shortcuts

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