Documentation ¶
Index ¶
Constants ¶
View Source
const (
// SourceKindCSV identifies a csv asset source
SourceKindCSV = "csv"
)
View Source
const (
// SourceKindServerService identifies a server service source.
SourceKindServerService = "serverService"
)
Variables ¶
View Source
var ( ErrGetter = errors.New("asset getter error") ErrConfig = errors.New("required config not set") ErrAssetNotFound = errors.New("asset not found") )
View Source
var ( // ErrServerServiceQuery is returned when a server service query fails. ErrServerServiceQuery = errors.New("serverService query error") // ErrServerServiceObject is returned when a server service object is found to be missing attributes. ErrServerServiceObject = errors.New("serverService object error") )
View Source
var (
ErrCSVSource = errors.New("error in CSV")
)
Functions ¶
This section is empty.
Types ¶
type Getter ¶
type Getter interface { // All runs the asset getter which retrieves all assets in the inventory store and sends them over the asset channel. ListAll(ctx context.Context) error // ByIDs runs the asset getter which retrieves all assets based on the list of IDs and sends them over the asset channel. ListByIDs(ctx context.Context, assetIDs []string) error // AssetByID returns one asset from the inventory identified by its identifier. AssetByID(ctx context.Context, assetID string, fetchBmcCredentials bool) (*model.Asset, error) // SetClient sets the given client as the Getter client to enable mocking for tests. SetClient(interface{}) }
Getter interface declares methods to be implemented for asset retrieval from the asset store.
func NewCSVGetter ¶
NewCSVGetter returns a new csv asset getter to retrieve asset information from a CSV file for inventory collection.
Click to show internal directories.
Click to hide internal directories.