inventory

package
v0.0.46 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Feature

type Feature struct {
	Id      string `json:"id"`
	Skipped string `json:"skipped"` // Either the reason for skipping or an empty string
}

type Harness

type Harness struct {
	Id       string             `json:"id"`
	Features map[string]Feature `json:"features"`
}

type Inventory

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

func NewInventory added in v0.0.37

func NewInventory(base string) (*Inventory, error)

func (*Inventory) AddFeature

func (i *Inventory) AddFeature(ctx context.Context, harness string, feature Feature) error

AddFeature adds a feature to an existing harness. It returns an error if the harness does not exist.

func (*Inventory) AddHarness

func (i *Inventory) AddHarness(ctx context.Context, id string) error

AddHarness creates a new harness with the given id. If the harness already exists this is a no-op.

func (*Inventory) GetFeatures

func (i *Inventory) GetFeatures(ctx context.Context, id string) (map[string]Feature, error)

func (*Inventory) RemoveFeature

func (i *Inventory) RemoveFeature(ctx context.Context, harness string, id string) error

func (*Inventory) RemoveHarness

func (i *Inventory) RemoveHarness(ctx context.Context, id string) error

Jump to

Keyboard shortcuts

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