store

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoAttributes          = errors.New("no flasher attribute found")
	ErrAttributeList         = errors.New("error in fleetdb API attribute list")
	ErrAttributeCreate       = errors.New("error in fleetdb API attribute create")
	ErrAttributeUpdate       = errors.New("error in fleetdb API attribute update")
	ErrVendorModelAttributes = errors.New("device vendor, model attributes not found in fleetdb API")
	ErrDeviceStatus          = errors.New("error fleetdb API device status")

	ErrDeviceID = errors.New("device UUID error")

	// ErrBMCAddress is returned when an error occurs in the BMC address lookup.
	ErrBMCAddress = errors.New("error in server BMC Address")

	// ErrDeviceState is returned when an error occurs in the device state  lookup.
	ErrDeviceState = errors.New("error in device state")

	// ErrServerserviceAttrObj is retuned when an error occurred in unpacking the attribute.
	ErrServerserviceAttrObj = errors.New("fleetdb API attribute error")

	// ErrServerserviceVersionedAttrObj is retuned when an error occurred in unpacking the versioned attribute.
	ErrServerserviceVersionedAttrObj = errors.New("fleetdb API versioned attribute error")

	// ErrServerserviceQuery is returned when a server service query fails.
	ErrServerserviceQuery = errors.New("fleetdb API query returned error")

	ErrFirmwareSetLookup = errors.New("firmware set error")
)

Functions

This section is empty.

Types

type FleetDBAPI added in v1.0.3

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

func (*FleetDBAPI) AssetByID added in v1.0.3

func (f *FleetDBAPI) AssetByID(ctx context.Context, id string) (*rtypes.Server, error)

AssetByID returns a rivets Server object.

func (*FleetDBAPI) FirmwareByDeviceVendorModel added in v1.0.3

func (f *FleetDBAPI) FirmwareByDeviceVendorModel(ctx context.Context, deviceVendor, deviceModel string) ([]*rctypes.Firmware, error)

FirmwareByDeviceVendorModel returns the firmware for the device vendor, model.

func (*FleetDBAPI) FirmwareSetByID added in v1.0.3

func (f *FleetDBAPI) FirmwareSetByID(ctx context.Context, id uuid.UUID) ([]*rctypes.Firmware, error)

FirmwareSetByID returns a list of firmwares part of a firmware set identified by the given id.

type Repository

type Repository interface {
	// AssetByID returns asset.
	AssetByID(ctx context.Context, id string) (*rtypes.Server, error)

	FirmwareSetByID(ctx context.Context, id uuid.UUID) ([]*rctypes.Firmware, error)

	// FirmwareByDeviceVendorModel returns the firmware for the device vendor, model.
	FirmwareByDeviceVendorModel(ctx context.Context, deviceVendor, deviceModel string) ([]*rctypes.Firmware, error)
}

func NewServerserviceStore

func NewServerserviceStore(ctx context.Context, config *app.FleetDBAPIOptions, logger *logrus.Logger) (Repository, error)

Jump to

Keyboard shortcuts

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