Documentation
¶
Index ¶
- Constants
- func Discover(pluginDir string) ([]Manifest, []ManifestIssue)
- func ReapRuntimeProcesses(dataDir string) []procreap.ReapResult
- func Remove(pluginDir, name string) error
- func RuntimeRegistryDir(dataDir string) string
- func SourceName(sourceDir string) (string, error)
- type EntrypointKind
- type InstallOptions
- type Manifest
- func InstallPath(sourceDir, pluginDir string) (Manifest, error)
- func InstallPathWithOptions(sourceDir, pluginDir string, opts InstallOptions) (Manifest, error)
- func InstallSourceWithOptions(source, pluginDir string, opts InstallOptions) (Manifest, error)
- func InstallSourceWithOptionsContext(ctx context.Context, source, pluginDir string, opts InstallOptions) (Manifest, error)
- func LinkPath(sourceDir, pluginDir string, opts InstallOptions) (Manifest, error)
- func LoadManifest(path string) (Manifest, error)
- type ManifestIssue
Constants ¶
View Source
const ( APIVersion = 7 ManifestName = "attn-plugin.toml" )
Variables ¶
This section is empty.
Functions ¶
func Discover ¶
func Discover(pluginDir string) ([]Manifest, []ManifestIssue)
func ReapRuntimeProcesses ¶ added in v0.12.0
func ReapRuntimeProcesses(dataDir string) []procreap.ReapResult
func RuntimeRegistryDir ¶ added in v0.12.0
func SourceName ¶ added in v0.12.0
Types ¶
type EntrypointKind ¶ added in v0.12.0
type EntrypointKind string
const ( EntrypointBun EntrypointKind = "bun" EntrypointExecutable EntrypointKind = "executable" )
type InstallOptions ¶
type Manifest ¶
type Manifest struct {
Name string `toml:"name" json:"name"`
Version string `toml:"version" json:"version"`
AttnAPIVersion int `toml:"attn_api_version" json:"attn_api_version"`
Description string `toml:"description" json:"description,omitempty"`
Plugin struct {
Entrypoint string `toml:"entrypoint" json:"entrypoint,omitempty"`
Kind EntrypointKind `toml:"kind" json:"kind"`
Path string `toml:"path" json:"path"`
} `toml:"plugin" json:"plugin"`
Dir string `toml:"-" json:"dir"`
LinkTarget string `toml:"-" json:"link_target,omitempty"`
}
func InstallPath ¶
func InstallPathWithOptions ¶
func InstallPathWithOptions(sourceDir, pluginDir string, opts InstallOptions) (Manifest, error)
func InstallSourceWithOptions ¶
func InstallSourceWithOptions(source, pluginDir string, opts InstallOptions) (Manifest, error)
func InstallSourceWithOptionsContext ¶ added in v0.12.0
func LinkPath ¶ added in v0.12.0
func LinkPath(sourceDir, pluginDir string, opts InstallOptions) (Manifest, error)
func LoadManifest ¶
type ManifestIssue ¶
func (ManifestIssue) Error ¶
func (i ManifestIssue) Error() string
Click to show internal directories.
Click to hide internal directories.