asset

package
v0.0.0-...-8401909 Latest Latest
Warning

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

Go to latest
Published: May 4, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package asset provides the core business API of handling everything asset related.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Core

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

Core manages the set of API's for block access.

func NewCore

func NewCore(log *zap.SugaredLogger, couchClient *kivik.Client, dbName string) Core

NewCore constructs a core for product api access.

func (Core) AddAsset

func (c Core) AddAsset(ctx context.Context, asset models.Asset) (string, string, error)

func (Core) AddAssets

func (c Core) AddAssets(ctx context.Context, assets []models.Asset) (bool, error)

func (Core) GetAsset

func (c Core) GetAsset(ctx context.Context, assetID string) (models.Asset, error)

func (Core) GetAssetCountBtnKeys

func (c Core) GetAssetCountBtnKeys(ctx context.Context, startKey, endKey string) (int64, error)

func (Core) GetAssetsPagination

func (c Core) GetAssetsPagination(ctx context.Context, latestAssetID string, order string, pageNo, limit int64) ([]db.Asset, int64, int64, error)

func (Core) GetEarliestAssetID

func (c Core) GetEarliestAssetID(ctx context.Context) (string, error)

func (Core) GetLatestAssetID

func (c Core) GetLatestAssetID(ctx context.Context) (string, error)

Directories

Path Synopsis
Package db contains asset related CRUD functionality.
Package db contains asset related CRUD functionality.

Jump to

Keyboard shortcuts

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