configdoc

package module
v0.0.0-...-08a2382 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TierProduction = "production"
	TierPreview    = "preview"
)
View Source
const SchemaDialect = "https://json-schema.org/draft/2020-12/schema"

Variables

This section is empty.

Functions

func BindableTypes

func BindableTypes() []string

func Check

func Check(path string, target any, value any) error

func IndexPath

func IndexPath(path string, index int) string

func JoinPath

func JoinPath(path, key string) string

func KeysOf

func KeysOf(union Keyed) []string

func PathName

func PathName(path string) string

func ProviderIDs

func ProviderIDs() []string

func ProviderNamedAlone

func ProviderNamedAlone(id string) bool

func ProviderSchema

func ProviderSchema[E, D ~string](id string, options any, edges []E, dns []D) ([]byte, error)

func Schema

func Schema() ([]byte, error)

func SecretVariable

func SecretVariable(placeholder string) (string, bool)

Types

type AlsoAString

type AlsoAString interface {
	AlsoAString()
}

type AppConfig

type AppConfig struct {
	Name       string           `` /* 132-byte string literal not displayed */
	Path       string           `json:"path" doc:"The app's directory, relative to the config."`
	Entrypoint string           `json:"entrypoint,omitempty" doc:"The file the app is served from, when it is not the one ocel would detect."`
	Compute    string           `` /* 162-byte string literal not displayed */
	Framework  string           `` /* 157-byte string literal not displayed */
	Arch       string           `` /* 172-byte string literal not displayed */
	Folder     string           `json:"folder,omitempty" doc:"The variables folder this app reads, when it does not read the project's own."`
	Domains    *AppDomainConfig `json:"domains,omitempty" doc:"The hostnames this app is served on."`
	Build      *BuildConfig     `json:"build,omitempty" doc:"How a container app's image is built."`
	Health     *HealthConfig    `json:"health,omitempty" doc:"How a container app is checked before it is served."`
}

type AppDomainConfig

type AppDomainConfig struct {
	Production StringList `json:"production,omitempty" doc:"The hostnames production is served on."`
}

type Binding

type Binding struct {
	Published  string
	Production *InlineRecord
	Preview    *InlineRecord
}

type Bindings

type Bindings map[string]map[string]Binding

func (*Bindings) UnmarshalJSON

func (b *Bindings) UnmarshalJSON(data []byte) error

type BucketBinding

type BucketBinding struct {
	Endpoint        *Text `json:"endpoint,omitempty"`
	Region          *Text `json:"region,omitempty"`
	Bucket          *Text `json:"bucket,omitempty"`
	Prefix          *Text `json:"prefix,omitempty"`
	PathStyle       bool  `json:"pathStyle,omitempty"`
	AccessKeyID     *Ref  `json:"accessKeyId,omitempty"`
	SecretAccessKey *Ref  `json:"secretAccessKey,omitempty"`
	PublicBaseURL   *Text `json:"publicBaseUrl,omitempty"`
}

type BuildConfig

type BuildConfig struct {
	Dockerfile string `json:"dockerfile,omitempty" doc:"The Dockerfile to build from. A relative path resolves against the app's directory."`
	Context    string `` /* 149-byte string literal not displayed */
	Command    string `json:"command,omitempty" doc:"The command that builds the app inside the image. Left off, the app's own build script runs."`
}

type DiscoveryConfig

type DiscoveryConfig struct {
	Paths []string `` /* 162-byte string literal not displayed */
}

type DnsDescriptor

type DnsDescriptor = Selector[DnsOptions, dnsSelector]

type DnsOptions

type DnsOptions struct {
	Zone string `json:"zone,omitempty" doc:"The zone the records are written into. Omit it and ocel picks the zone that covers the hostname."`
}

type Document

type Document struct {
	Schema        string               `` /* 144-byte string literal not displayed */
	Slug          string               `` /* 162-byte string literal not displayed */
	Bindings      Bindings             `` /* 449-byte string literal not displayed */
	Transforms    StringList           `` /* 255-byte string literal not displayed */
	Discovery     *DiscoveryConfig     `json:"discovery,omitempty" doc:"Where the resources an app declares are found."`
	Provider      *ProviderDescriptor  `` /* 181-byte string literal not displayed */
	Edge          *EdgeDescriptor      `` /* 205-byte string literal not displayed */
	DNS           *DnsDescriptor       `` /* 161-byte string literal not displayed */
	AllowDegraded []string             `` /* 174-byte string literal not displayed */
	Apps          []AppConfig          `json:"apps,omitempty" doc:"The apps this project deploys. Left off, ocel detects one at the project root."`
	Domains       *ProjectDomainConfig `json:"domains,omitempty" doc:"The hostnames this project is served on."`
	Registry      *RegistryConfig      `json:"registry,omitempty" doc:"Where this project's container images are pushed."`
}

func Decode

func Decode(data []byte, lookup Lookup) (*Document, error)

type EdgeDescriptor

type EdgeDescriptor = Selector[EdgeOptions, edgeSelector]

type EdgeOptions

type EdgeOptions struct{}

type HealthConfig

type HealthConfig struct {
	Path string `` /* 137-byte string literal not displayed */
}

type InlineRecord

type InlineRecord struct {
	Postgres *PostgresBinding
	Bucket   *BucketBinding
}

type Keyed

type Keyed interface {
	Shorthands() []string
}

type Lookup

type Lookup func(name string) (string, bool)

type PostgresBinding

type PostgresBinding struct {
	URL      *Ref         `json:"url,omitempty"`
	Host     *Text        `json:"host,omitempty"`
	Port     int          `json:"port,omitempty"`
	Database *Text        `json:"database,omitempty"`
	Username *Text        `json:"username,omitempty"`
	Password *Ref         `json:"password,omitempty"`
	TLS      *PostgresTLS `json:"tls,omitempty"`
}

type PostgresTLS

type PostgresTLS struct {
	Mode string `` /* 140-byte string literal not displayed */
	CA   *Ref   `` /* 133-byte string literal not displayed */
}

type ProjectDomainConfig

type ProjectDomainConfig struct {
	Production StringList `json:"production,omitempty" doc:"The hostnames production is served on."`
	Preview    string     `json:"preview,omitempty" doc:"The wildcard hostname previews are served under, such as *.preview.example.com."`
}

type ProviderDescriptor

type ProviderDescriptor = Selector[json.RawMessage, providerSelector]

type Ref

type Ref struct {
	Env string `` /* 156-byte string literal not displayed */
}

type RegistryConfig

type RegistryConfig struct {
	Server   string `` /* 126-byte string literal not displayed */
	Username string `json:"username,omitempty" doc:"The username the push authenticates as, where the registry wants one."`
	Password string `` /* 204-byte string literal not displayed */
}

type Selector

type Selector[O any, K selectorKind] struct {
	ID      string
	Options O
}

func (*Selector[O, K]) UnmarshalJSON

func (s *Selector[O, K]) UnmarshalJSON(data []byte) error

type StringList

type StringList []string

func (*StringList) UnmarshalJSON

func (s *StringList) UnmarshalJSON(data []byte) error

type Text

type Text struct {
	Literal string
	Ref     *Ref
}

func (*Text) UnmarshalJSON

func (t *Text) UnmarshalJSON(data []byte) error

type UnknownKeyError

type UnknownKeyError struct {
	Path  string
	Known []string
}

func (UnknownKeyError) Error

func (e UnknownKeyError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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