Documentation
¶
Overview ¶
Package directory provides the curated directory of Shopware AI integrations that backs the "shopware-cli ai list" and "ai info" commands.
There is no remote source, so the directory is hardwired in Go (see integrations.go). It requires no network access and is the source of truth for integration discovery. The field/output contract lives in CONTRACT.md.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Compatibility ¶
type Compatibility struct {
Source string `json:"source"`
}
Compatibility describes how compatibility is determined for an entry.
type Delivery ¶
type Delivery struct {
Kind DeliveryKind `json:"kind"`
Repository string `json:"repository,omitempty"`
}
Delivery describes how an integration is delivered.
type DeliveryKind ¶
type DeliveryKind string
DeliveryKind describes how an integration is delivered. "project" is reserved for a later increment and must not be renamed when added.
const ( DeliveryBundled DeliveryKind = "bundled" DeliveryGit DeliveryKind = "git" )
type Directory ¶
type Directory struct {
Integrations []Integration `json:"integrations"`
}
Directory is the set of known integrations.
func (*Directory) Get ¶
func (d *Directory) Get(name string) (*Integration, bool)
Get returns the integration with the given name and true, or nil and false when no entry matches.
func (*Directory) Info ¶
func (d *Directory) Info(name string) (*Integration, error)
Info returns a single integration by name, or an error when no entry matches.
func (*Directory) List ¶
func (d *Directory) List(installed map[string]bool, opts ListOptions) ([]Integration, error)
List returns the integrations matching opts. installed is the set of integration names recorded as installed by the CLI; it is consulted only when opts.InstalledOnly is set.
type Integration ¶
type Integration struct {
Name string `json:"name"`
DisplayName string `json:"displayName"`
Type Type `json:"type"`
Provider string `json:"provider"`
Description string `json:"description"`
Status Status `json:"status"`
Documentation string `json:"documentation"`
Delivery Delivery `json:"delivery"`
Compatibility *Compatibility `json:"compatibility,omitempty"`
}
Integration is a single directory entry. The json field names are a public contract; see CONTRACT.md.
type ListOptions ¶
type ListOptions struct {
// Type, when set, keeps only entries of that type. It accepts any known type
// identifier (see knownTypeFilters), including reserved ones that match no
// entry yet.
Type string
// InstalledOnly keeps only entries whose name is in the installed set passed
// to List.
InstalledOnly bool
}
ListOptions filters a directory listing.