manifest

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package manifest defines the solution executor manifest: the schema that describes a codefly:solution plugin's identity, the services it scaffolds, the APIs and events it exposes and consumes, its UI extensions, its needs, its permissions, and the lifecycle operations it implements. The solution spec the executor operates on stays codefly-agnostic and is not modeled here.

Index

Constants

View Source
const (
	FileName          = "solution.codefly.yaml"
	SchemaVersionV0   = "codefly.solution-manifest/v0"
	ProtocolVersionV0 = "codefly.solution/v0"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Exposes  []APIDeclaration `yaml:"exposes,omitempty" json:"exposes,omitempty"`
	Consumes []APIDeclaration `yaml:"consumes,omitempty" json:"consumes,omitempty"`
}

API declares the APIs a solution exposes and consumes.

type APIDeclaration

type APIDeclaration struct {
	ID       string `yaml:"id" json:"id"`
	Protocol string `yaml:"protocol" json:"protocol"`
}

APIDeclaration is one exposed or consumed API endpoint.

type EventDeclaration

type EventDeclaration struct {
	ID string `yaml:"id" json:"id"`
}

EventDeclaration is one emitted or consumed event.

type Events

type Events struct {
	Emits    []EventDeclaration `yaml:"emits,omitempty" json:"emits,omitempty"`
	Consumes []EventDeclaration `yaml:"consumes,omitempty" json:"consumes,omitempty"`
}

Events declares the events a solution emits and consumes.

type Lifecycle

type Lifecycle struct {
	Create  bool `yaml:"create" json:"create"`
	Update  bool `yaml:"update" json:"update"`
	Package bool `yaml:"package" json:"package"`
	Render  bool `yaml:"render" json:"render"`
}

Lifecycle declares which executor operations the solution implements.

type Manifest

type Manifest struct {
	SchemaVersion   string          `yaml:"schema_version" json:"schema_version"`
	ProtocolVersion string          `yaml:"protocol_version" json:"protocol_version"`
	Agent           resources.Agent `yaml:"agent" json:"agent"`
	Services        []Service       `yaml:"services,omitempty" json:"services,omitempty"`
	API             API             `yaml:"api" json:"api"`
	Events          Events          `yaml:"events" json:"events"`
	UI              []UIExtension   `yaml:"ui,omitempty" json:"ui,omitempty"`
	Needs           []Need          `yaml:"needs,omitempty" json:"needs,omitempty"`
	Permissions     []Permission    `yaml:"permissions,omitempty" json:"permissions,omitempty"`
	Lifecycle       Lifecycle       `yaml:"lifecycle" json:"lifecycle"`
}

Manifest describes a codefly:solution executor.

func Load

func Load(data []byte) (*Manifest, error)

func (*Manifest) AdmitInformation

func (m *Manifest) AdmitInformation(info *solutionv0.GetSolutionInformationResponse) error

AdmitInformation binds a runtime GetSolutionInformation advertisement to this packaged manifest. The advertised manifest digest must equal this manifest's digest, and every lifecycle operation the runtime advertises must have been declared in the packaged manifest. A runtime may implement a subset of the declared operations, but never one the audited manifest did not declare.

func (*Manifest) CanonicalBytes

func (m *Manifest) CanonicalBytes() ([]byte, error)

CanonicalBytes returns a deterministic JSON encoding of the manifest, independent of declaration order, suitable for OCI packaging digests.

func (*Manifest) Digest

func (m *Manifest) Digest() (string, error)

func (*Manifest) Validate

func (m *Manifest) Validate() error

type Need

type Need struct {
	ID   string `yaml:"id" json:"id"`
	Kind string `yaml:"kind" json:"kind"`
}

Need is one requirement the solution declares.

type Permission

type Permission struct {
	ID       string `yaml:"id" json:"id"`
	Action   string `yaml:"action" json:"action"`
	Resource string `yaml:"resource" json:"resource"`
	Reason   string `yaml:"reason" json:"reason"`
	Risk     string `yaml:"risk" json:"risk"`
}

Permission is one permission the solution requires.

type Service

type Service struct {
	ID   string `yaml:"id" json:"id"`
	Name string `yaml:"name" json:"name"`
}

Service is one service the solution scaffolds. Descriptor-only solutions declare none.

type UIExtension

type UIExtension struct {
	ID   string `yaml:"id" json:"id"`
	Slot string `yaml:"slot" json:"slot"`
}

UIExtension is one UI extension point contributed by the solution.

Jump to

Keyboard shortcuts

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