Documentation ¶
Index ¶
- Variables
- func NewFleetDBAPIClient(ctx context.Context, cfg *app.FleetDBAPIOptions, logger *logrus.Logger) (*fleetdbapi.Client, error)
- type Store
- func (r *Store) AssetByID(ctx context.Context, id string, fetchBmcCredentials bool) (*model.Asset, error)
- func (r *Store) AssetUpdate(ctx context.Context, asset *model.Asset) error
- func (r *Store) AssetsByOffsetLimit(ctx context.Context, offset, limit int) (assets []*model.Asset, totalAssets int, err error)
- func (r *Store) Kind() model.StoreKind
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrSlugs = errors.New("slugs error") ErrFleetDBRegisterChanges = errors.New("error in FleetDB API register changes") ErrAssetObject = errors.New("asset object error") ErrAssetObjectConversion = errors.New("error converting asset object") ErrFleetDBAPIObject = errors.New("serverService object error") ErrChangeList = errors.New("error building change list") ErrFleetDBAttrObject = errors.New("error in FleetDB API attribute object") )
View Source
var (
ErrConfig = errors.New("error in fleetdb client configuration")
)
Functions ¶
func NewFleetDBAPIClient ¶
func NewFleetDBAPIClient(ctx context.Context, cfg *app.FleetDBAPIOptions, logger *logrus.Logger) (*fleetdbapi.Client, error)
NewFleetDBAPIClient instantiates and returns a serverService client
Types ¶
type Store ¶
type Store struct { *fleetdbapi.Client // contains filtered or unexported fields }
Store is an asset inventory store
func New ¶
func New(ctx context.Context, appKind model.AppKind, cfg *app.FleetDBAPIOptions, logger *logrus.Logger) (*Store, error)
NewStore returns a fleetdb store queryor to lookup and publish assets to, from the store.
func (*Store) AssetByID ¶
func (r *Store) AssetByID(ctx context.Context, id string, fetchBmcCredentials bool) (*model.Asset, error)
assetByID queries serverService for the hardware asset by ID and returns an Asset object
func (*Store) AssetUpdate ¶
AssetUpdate inserts/updates the asset data in the fleetdb store
Click to show internal directories.
Click to hide internal directories.