describe

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultDescriptorFile = ".claw-describe.json"

Variables

This section is empty.

Functions

func BuildFeedRegistry

func BuildFeedRegistry(descriptors map[string]*ServiceDescriptor) (map[string]FeedSpec, error)

func ResolveBuildContextDir

func ResolveBuildContextDir(baseDir string, raw interface{}) (string, error)

func ResolveBuildContextFile

func ResolveBuildContextFile(baseDir string, buildRaw interface{}, containerPath string) (string, error)

Types

type AuthDescriptor

type AuthDescriptor struct {
	Type string `json:"type"`
	Env  string `json:"env,omitempty"`
}

type EndpointDescriptor

type EndpointDescriptor struct {
	Method      string `json:"method"`
	Path        string `json:"path"`
	Description string `json:"description,omitempty"`
}

type FeedDescriptor

type FeedDescriptor struct {
	Name        string `json:"name"`
	Path        string `json:"path"`
	TTL         int    `json:"ttl"`
	Description string `json:"description,omitempty"`
}

type FeedSpec

type FeedSpec struct {
	Name        string
	Source      string
	Path        string
	TTL         int
	Description string
	Auth        *AuthDescriptor
}

type ServiceDescriptor

type ServiceDescriptor struct {
	Version     int                  `json:"version"`
	Description string               `json:"description,omitempty"`
	Feeds       []FeedDescriptor     `json:"feeds,omitempty"`
	Endpoints   []EndpointDescriptor `json:"endpoints,omitempty"`
	Auth        *AuthDescriptor      `json:"auth,omitempty"`
	Skill       string               `json:"skill,omitempty"`
}

func LoadFromBuildContext

func LoadFromBuildContext(baseDir string, buildRaw interface{}, descriptorPath string) (*ServiceDescriptor, string, error)

func LoadFromFile

func LoadFromFile(path string) (*ServiceDescriptor, error)

func LoadFromImage

func LoadFromImage(imageRef, descriptorPath string) (*ServiceDescriptor, error)

func Parse

func Parse(data []byte) (*ServiceDescriptor, error)

func (*ServiceDescriptor) Validate

func (d *ServiceDescriptor) Validate() error

Jump to

Keyboard shortcuts

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