blueprint

package
v1.80.1 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteFile

func WriteFile(path string, bp *Blueprint) error

Types

type Blueprint

type Blueprint struct {
	SchemaVersion string        `json:"schema_version" yaml:"schema_version"`
	RuntimeMode   string        `json:"runtime_mode"   yaml:"runtime_mode"`
	Service       *ServiceSpec  `json:"service"        yaml:"service"`
	Services      []ServiceSpec `json:"services"       yaml:"services"`

	HTTP      []HTTPRoute    `json:"http"      yaml:"http"`
	Plugins   []string       `json:"plugins"   yaml:"plugins"`
	Datastore *DatastoreSpec `json:"datastore" yaml:"datastore"`
	Queues    []QueueSpec    `json:"queues"    yaml:"queues"`
}

func LoadFile

func LoadFile(path string) (*Blueprint, error)

func Merge

func Merge(base, overlay Blueprint) (Blueprint, error)

func (*Blueprint) Explain

func (bp *Blueprint) Explain() (string, error)

func (*Blueprint) Generate

func (bp *Blueprint) Generate(opts GenerateOptions) error

func (*Blueprint) Validate

func (bp *Blueprint) Validate() error

Validate checks blueprint invariants and required fields.

type DatastoreSpec

type DatastoreSpec struct {
	Migrate       bool   `json:"migrate"         yaml:"migrate"`
	PrimaryURLEnv string `json:"primary_url_env" yaml:"primary_url_env"`
}

type GenerateOptions

type GenerateOptions struct {
	OutDir string
}

type HTTPRoute

type HTTPRoute struct {
	Name     string `json:"name"     yaml:"name"`
	Route    string `json:"route"    yaml:"route"`
	Method   string `json:"method"   yaml:"method"`
	Handler  string `json:"handler"  yaml:"handler"`
	Response string `json:"response" yaml:"response"`
}

type QueueSpec

type QueueSpec struct {
	Publisher  string `json:"publisher"  yaml:"publisher"`
	Subscriber string `json:"subscriber" yaml:"subscriber"`
	URL        string `json:"url"        yaml:"url"`
	Handler    string `json:"handler"    yaml:"handler"`
}

type ServiceSpec

type ServiceSpec struct {
	Name         string         `json:"name"          yaml:"name"`
	Module       string         `json:"module"        yaml:"module"`
	RuntimeMode  string         `json:"runtime_mode"  yaml:"runtime_mode"`
	ServiceID    any            `json:"service_id"    yaml:"service_id"`
	ServiceGroup string         `json:"service_group" yaml:"service_group"`
	Port         string         `json:"port"          yaml:"port"`
	HTTP         []HTTPRoute    `json:"http"          yaml:"http"`
	Plugins      []string       `json:"plugins"       yaml:"plugins"`
	Datastore    *DatastoreSpec `json:"datastore"     yaml:"datastore"`
	Queues       []QueueSpec    `json:"queues"        yaml:"queues"`
}

Jump to

Keyboard shortcuts

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