mock

package
v0.0.0-...-dcf9213 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mock

type Mock struct {
	TotalAssets   int
	UpdatedAssets int
}

Mock is a mock store

func New

func New(totalAssets int) (*Mock, error)

func (*Mock) AssetByID

func (m *Mock) AssetByID(_ context.Context, assetID string, _ bool) (*model.Asset, error)

AssetByID returns one asset from the inventory identified by its identifier.

func (*Mock) AssetUpdate

func (m *Mock) AssetUpdate(_ context.Context, _ *model.Asset) error

AssetUpdate inserts and updates collected data for the asset in the store.

func (*Mock) AssetsByOffsetLimit

func (m *Mock) AssetsByOffsetLimit(_ context.Context, offset, limit int) (assets []*model.Asset, totalAssets int, err error)

AssetByOffsetLimit queries the inventory for the asset(s) at the given offset, limit values.

func (*Mock) Kind

func (m *Mock) Kind() model.StoreKind

Kind returns the repository store kind.

Jump to

Keyboard shortcuts

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