Documentation
¶
Index ¶
- Constants
- func Marshal(m *Manifest) ([]byte, error)
- func MarshalLock(l *Lock) ([]byte, error)
- func Path(root string) (string, error)
- func ReadDir(root string) ([]byte, string, error)
- func Sort(m *Manifest)
- type Agent
- type Binding
- type Component
- type Dependency
- type Export
- type Lock
- type LockedAgent
- type LockedDependency
- type Manifest
- type UnsupportedSchemaError
Constants ¶
View Source
const ( CurrentSchema = 2 CanonicalName = "a2amodule.yml" AlternateName = "a2amodule.yaml" )
Variables ¶
This section is empty.
Functions ¶
func MarshalLock ¶
Types ¶
type Component ¶
type Component struct {
ID string `yaml:"id" json:"id"`
Description string `yaml:"description,omitempty" json:"description,omitempty"`
Repository string `yaml:"repository,omitempty" json:"repository,omitempty"`
Exports []Export `yaml:"exports,omitempty" json:"exports,omitempty"`
Surface string `yaml:"surface,omitempty" json:"surface,omitempty"`
}
type Dependency ¶
type Dependency struct {
Name string `yaml:"name" json:"name"`
Git string `yaml:"git" json:"git"`
Ref string `yaml:"ref,omitempty" json:"ref,omitempty"`
Path string `yaml:"path,omitempty" json:"path,omitempty"`
Bindings []Binding `yaml:"bindings,omitempty" json:"bindings,omitempty"`
}
Dependency.Name is the consumer-local alias. Component identity is learned from the upstream manifest and is never used as the local map key.
func DependencyByName ¶
func DependencyByName(m *Manifest, name string) (*Dependency, int)
type Lock ¶
type Lock struct {
Schema int `yaml:"schema" json:"schema"`
Dependencies map[string]LockedDependency `yaml:"dependencies" json:"dependencies"`
}
type LockedAgent ¶
type LockedAgent struct {
Name string `yaml:"name,omitempty" json:"name,omitempty"`
DeclaredCard string `yaml:"declaredCard" json:"declaredCard"`
Card string `yaml:"card" json:"card"`
Commit string `yaml:"commit" json:"commit"`
}
LockedAgent records both the upstream declaration and the reference a local consumer can actually use. For repository-relative cards, Card points below .git-a2a while Commit identifies the Git object the bytes came from.
type LockedDependency ¶
type LockedDependency struct {
Component string `yaml:"component" json:"component"`
Git string `yaml:"git" json:"git"`
Ref string `yaml:"ref" json:"ref"`
Path string `yaml:"path,omitempty" json:"path,omitempty"`
Commit string `yaml:"commit" json:"commit"`
Manifest string `yaml:"manifest" json:"manifest"`
Bindings []Binding `yaml:"bindings" json:"bindings"`
Agent LockedAgent `yaml:"agent" json:"agent"`
Surface string `yaml:"surface,omitempty" json:"surface,omitempty"`
}
type Manifest ¶
type Manifest struct {
Schema int `yaml:"schema" json:"schema"`
Component Component `yaml:"component" json:"component"`
Agent *Agent `yaml:"agent,omitempty" json:"agent,omitempty"`
Dependencies []Dependency `yaml:"dependencies,omitempty" json:"dependencies,omitempty"`
}
Manifest is the schema 2 repository declaration. It contains one component, one responsible external agent, and direct dependencies only.
type UnsupportedSchemaError ¶
type UnsupportedSchemaError struct{ Schema int }
func (*UnsupportedSchemaError) Error ¶
func (e *UnsupportedSchemaError) Error() string
Click to show internal directories.
Click to hide internal directories.