csv

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: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SourceKindCSV identifies a csv asset source
	SourceKindCSV = "csv"
)

Variables

View Source
var (
	ErrAssetNotFound = errors.New("not found")
	ErrCSVSource     = errors.New("error in CSV")
)

Functions

This section is empty.

Types

type Store

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

func New

func New(_ context.Context, csvFile string, logger *logrus.Logger) (*Store, error)

New returns a new csv asset getter to retrieve asset information from a CSV file for inventory collection.

func (*Store) AssetByID

func (c *Store) AssetByID(ctx context.Context, assetID string, _ bool) (*model.Asset, error)

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

func (*Store) AssetUpdate

func (c *Store) AssetUpdate(_ context.Context, _ *model.Asset) error

func (*Store) AssetsByOffsetLimit

func (c *Store) AssetsByOffsetLimit(_ context.Context, _, _ int) (assets []*model.Asset, totalAssets int, err error)

func (*Store) Kind

func (c *Store) 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