Documentation
¶
Index ¶
- type AppBuilder
- func (ab *AppBuilder) AddComponent(id string) *ComponentBuilder
- func (ab *AppBuilder) Build() *CDK
- func (ab *AppBuilder) SetAccess(access string) *AppBuilder
- func (ab *AppBuilder) SetCustomAuth(issuer, audience string) *AppBuilder
- func (ab *AppBuilder) SetDescription(description string) *AppBuilder
- func (ab *AppBuilder) SetOrgAccess() *AppBuilder
- func (ab *AppBuilder) SetPrivateAccess() *AppBuilder
- func (ab *AppBuilder) SetVersion(version string) *AppBuilder
- type CDK
- type CDKApp
- type CDKAuth
- type CDKBuildConfig
- type CDKComponent
- type ComponentBuilder
- func (cb *ComponentBuilder) Build() *AppBuilder
- func (cb *ComponentBuilder) FromLocal(path string) *ComponentBuilder
- func (cb *ComponentBuilder) FromRegistry(registry, pkg, version string) *ComponentBuilder
- func (cb *ComponentBuilder) WithBuild(command string) *ComponentBuilder
- func (cb *ComponentBuilder) WithEnv(key, value string) *ComponentBuilder
- func (cb *ComponentBuilder) WithWatch(patterns ...string) *ComponentBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppBuilder ¶
type AppBuilder struct {
// contains filtered or unexported fields
}
AppBuilder provides a fluent interface for building applications
func (*AppBuilder) AddComponent ¶
func (ab *AppBuilder) AddComponent(id string) *ComponentBuilder
AddComponent adds a Wasm component to the application
func (*AppBuilder) Build ¶
func (ab *AppBuilder) Build() *CDK
Build finalizes the application and returns the CDK
func (*AppBuilder) SetAccess ¶
func (ab *AppBuilder) SetAccess(access string) *AppBuilder
SetAccess sets the access level (public or private)
func (*AppBuilder) SetCustomAuth ¶
func (ab *AppBuilder) SetCustomAuth(issuer, audience string) *AppBuilder
SetCustomAuth enables custom JWT authentication
func (*AppBuilder) SetDescription ¶
func (ab *AppBuilder) SetDescription(description string) *AppBuilder
SetDescription sets the application description
func (*AppBuilder) SetOrgAccess ¶
func (ab *AppBuilder) SetOrgAccess() *AppBuilder
SetOrgAccess enables FTL platform authentication (org-level access)
func (*AppBuilder) SetPrivateAccess ¶
func (ab *AppBuilder) SetPrivateAccess() *AppBuilder
SetPrivateAccess enables FTL platform authentication (user-only access)
func (*AppBuilder) SetVersion ¶
func (ab *AppBuilder) SetVersion(version string) *AppBuilder
SetVersion sets the application version
type CDK ¶
type CDK struct {
// contains filtered or unexported fields
}
CDK provides a Go-based Cloud Development Kit for FTL/Spin applications. This is the public API for programmatically defining FTL applications.
func (*CDK) NewApp ¶
func (cdk *CDK) NewApp(name string) *AppBuilder
NewApp creates a new application builder
func (*CDK) Synthesize ¶
Synthesize produces a Spin manifest from the CDK application
func (*CDK) ValidateWithSchema ¶
ValidateWithSchema validates the application against a CUE schema
type CDKApp ¶
type CDKApp struct {
Name string `json:"name"`
Version string `json:"version"`
Description string `json:"description,omitempty"`
Components []CDKComponent `json:"components,omitempty"`
Access string `json:"access,omitempty"`
Auth *CDKAuth `json:"auth,omitempty"`
}
CDKApp represents an FTL application being built
type CDKAuth ¶
type CDKAuth struct {
JWTIssuer string `json:"jwt_issuer"`
JWTAudience string `json:"jwt_audience"`
JWTRequiredScopes []string `json:"jwt_required_scopes,omitempty"`
}
CDKAuth represents authentication configuration for custom access mode
type CDKBuildConfig ¶
type CDKBuildConfig struct {
Command string `json:"command"`
WorkDir string `json:"workdir,omitempty"`
Watch []string `json:"watch,omitempty"`
}
CDKBuildConfig represents build configuration
type CDKComponent ¶
type CDKComponent struct {
ID string `json:"id"`
Source interface{} `json:"source"` // string for local, map for registry
Build *CDKBuildConfig `json:"build,omitempty"`
Variables map[string]string `json:"variables,omitempty"`
}
CDKComponent represents a Wasm component in the application
type ComponentBuilder ¶
type ComponentBuilder struct {
// contains filtered or unexported fields
}
ComponentBuilder provides a fluent interface for building components
func (*ComponentBuilder) Build ¶
func (cb *ComponentBuilder) Build() *AppBuilder
Build completes the component and returns to the app builder
func (*ComponentBuilder) FromLocal ¶
func (cb *ComponentBuilder) FromLocal(path string) *ComponentBuilder
FromLocal sets the component source as a local path
func (*ComponentBuilder) FromRegistry ¶
func (cb *ComponentBuilder) FromRegistry(registry, pkg, version string) *ComponentBuilder
FromRegistry sets the component source from a registry
func (*ComponentBuilder) WithBuild ¶
func (cb *ComponentBuilder) WithBuild(command string) *ComponentBuilder
WithBuild sets the build configuration
func (*ComponentBuilder) WithEnv ¶
func (cb *ComponentBuilder) WithEnv(key, value string) *ComponentBuilder
WithEnv adds environment variables
func (*ComponentBuilder) WithWatch ¶
func (cb *ComponentBuilder) WithWatch(patterns ...string) *ComponentBuilder
WithWatch adds watch patterns for development