Documentation
¶
Index ¶
- func NewComponentRenderer(component *componentResponse, jsonData []byte, writer io.Writer) *componentRenderer
- func NewComponentsRenderer(components *componentListResponse, jsonData []byte, writer io.Writer, ...) *componentsRenderer
- type ComponentList
- type GetComponentInput
- type GetComponentResult
- type ListComponentResults
- type ListComponentsInput
- type Renderer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewComponentRenderer ¶
func NewComponentRenderer(component *componentResponse, jsonData []byte, writer io.Writer) *componentRenderer
NewComponentRenderer creates a new renderer of a single component
Types ¶
type ComponentList ¶
type ComponentList struct {
// Included is a list of included items
Included []map[string]any
// Components is a list of components
Components []string
}
ComponentList is a list of components
func (*ComponentList) MarshalJSON ¶
func (cl *ComponentList) MarshalJSON() ([]byte, error)
func (*ComponentList) ToResponse ¶
func (cl *ComponentList) ToResponse() *componentListResponse
type GetComponentInput ¶
type GetComponentInput struct {
Logger *slog.Logger
APIClient apiclient.ClientWithResponsesInterface
}
GetComponentInput is the input used by GetComponent()
type GetComponentResult ¶
type GetComponentResult struct {
ComponentResponse *componentResponse
JSONResponse []byte
Problem *apiclient.Problem
}
GetComponentResult is the result of GetComponent
func GetComponent ¶
func GetComponent(ctx context.Context, namespace, name string, in GetComponentInput) (*GetComponentResult, error)
GetComponent returns information abuot a component
type ListComponentResults ¶
type ListComponentResults struct {
ComponentListResponse *componentListResponse
JSONResponse []byte
Problem *apiclient.Problem
}
ListComponentResults is the result of ListComponents
func ListComponents ¶
func ListComponents(ctx context.Context, in ListComponentsInput) (*ListComponentResults, error)
ListComponents returns a non-paginated list of components
type ListComponentsInput ¶
type ListComponentsInput struct {
// Logger is a logger
Logger *slog.Logger
// APIClient is the inventory server API client used to make requests
APIClient apiclient.ClientWithResponsesInterface
}
ListComponentsInput is the input given to ListComponents()
Click to show internal directories.
Click to hide internal directories.