plugins

package
v0.8.6 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2026 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Overview

v2/cmd/forge/plugins/build.go

v2/cmd/forge/plugins/client.go

v2/cmd/forge/plugins/client_config.go

v2/cmd/forge/plugins/cloud.go

v2/cmd/forge/plugins/deploy.go

v2/cmd/forge/plugins/dev.go

v2/cmd/forge/plugins/doctor.go

v2/cmd/forge/plugins/extension.go

v2/cmd/forge/plugins/generate.go

v2/cmd/forge/plugins/infra.go

v2/cmd/forge/plugins/init.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBuildPlugin

func NewBuildPlugin(cfg *config.ForgeConfig) cli.Plugin

NewBuildPlugin creates a new build plugin.

func NewClientPlugin

func NewClientPlugin(cfg *config.ForgeConfig) cli.Plugin

NewClientPlugin creates a new client plugin.

func NewCloudPlugin added in v0.4.0

func NewCloudPlugin(cfg *config.ForgeConfig) cli.Plugin

NewCloudPlugin creates a new cloud plugin.

func NewDatabasePlugin

func NewDatabasePlugin(cfg *config.ForgeConfig) cli.Plugin

NewDatabasePlugin creates a new database plugin.

func NewDeployPlugin

func NewDeployPlugin(cfg *config.ForgeConfig) cli.Plugin

NewDeployPlugin creates a new deploy plugin.

func NewDevPlugin

func NewDevPlugin(cfg *config.ForgeConfig) cli.Plugin

NewDevPlugin creates a new development plugin.

func NewDoctorPlugin

func NewDoctorPlugin(cfg *config.ForgeConfig) cli.Plugin

NewDoctorPlugin creates a new doctor plugin.

func NewExtensionPlugin

func NewExtensionPlugin(cfg *config.ForgeConfig) cli.Plugin

NewExtensionPlugin creates a new extension plugin.

func NewGeneratePlugin

func NewGeneratePlugin(cfg *config.ForgeConfig) cli.Plugin

NewGeneratePlugin creates a new generate plugin.

func NewInfraPlugin added in v0.4.0

func NewInfraPlugin(cfg *config.ForgeConfig) cli.Plugin

NewInfraPlugin creates a new infrastructure plugin.

func NewInitPlugin

func NewInitPlugin(cfg *config.ForgeConfig) cli.Plugin

NewInitPlugin creates a new init plugin.

func SaveClientConfig added in v0.7.0

func SaveClientConfig(config *ClientConfig, path string) error

SaveClientConfig saves a client configuration to a file.

Types

type AppInfo

type AppInfo struct {
	Name string
	Path string
	Type string
}

AppInfo represents a discoverable app.

type BuildPlugin

type BuildPlugin struct {
	// contains filtered or unexported fields
}

BuildPlugin handles build operations.

func (*BuildPlugin) Commands

func (p *BuildPlugin) Commands() []cli.Command

func (*BuildPlugin) Dependencies

func (p *BuildPlugin) Dependencies() []string

func (*BuildPlugin) Description

func (p *BuildPlugin) Description() string

func (*BuildPlugin) Initialize

func (p *BuildPlugin) Initialize() error

func (*BuildPlugin) Name

func (p *BuildPlugin) Name() string

func (*BuildPlugin) Version

func (p *BuildPlugin) Version() string

type ClientConfig added in v0.7.0

type ClientConfig struct {
	// Source configuration
	Source SourceConfig `yaml:"source"`

	// Default generation settings
	Defaults GenerationDefaults `yaml:"defaults"`

	// Streaming extension configuration
	Streaming StreamingExtConfig `yaml:"streaming,omitempty"`

	// Multiple client configurations
	Clients []ClientGenConfig `yaml:"clients,omitempty"`
}

ClientConfig represents the .forge-client.yml configuration file.

func DefaultClientConfig added in v0.7.0

func DefaultClientConfig() *ClientConfig

DefaultClientConfig returns a default client configuration.

func LoadClientConfig added in v0.7.0

func LoadClientConfig(startDir string) (*ClientConfig, error)

LoadClientConfig loads .forge-client.yml from the current directory or parent.

type ClientGenConfig added in v0.7.0

type ClientGenConfig struct {
	Name     string `yaml:"name"`
	Language string `yaml:"language"`
	Output   string `yaml:"output"`
	Package  string `yaml:"package,omitempty"`
	BaseURL  string `yaml:"base_url,omitempty"`
	Module   string `yaml:"module,omitempty"`

	// Override feature flags
	Auth      *bool `yaml:"auth,omitempty"`
	Streaming *bool `yaml:"streaming,omitempty"`
}

ClientGenConfig defines configuration for generating a specific client.

type ClientPlugin

type ClientPlugin struct {
	// contains filtered or unexported fields
}

ClientPlugin handles client code generation.

func (*ClientPlugin) Commands

func (p *ClientPlugin) Commands() []cli.Command

func (*ClientPlugin) Dependencies

func (p *ClientPlugin) Dependencies() []string

func (*ClientPlugin) Description

func (p *ClientPlugin) Description() string

func (*ClientPlugin) Initialize

func (p *ClientPlugin) Initialize() error

func (*ClientPlugin) Name

func (p *ClientPlugin) Name() string

func (*ClientPlugin) Version

func (p *ClientPlugin) Version() string

type CloudPlugin added in v0.4.0

type CloudPlugin struct {
	// contains filtered or unexported fields
}

CloudPlugin handles Forge Cloud operations.

func (*CloudPlugin) Commands added in v0.4.0

func (p *CloudPlugin) Commands() []cli.Command

func (*CloudPlugin) Dependencies added in v0.4.0

func (p *CloudPlugin) Dependencies() []string

func (*CloudPlugin) Description added in v0.4.0

func (p *CloudPlugin) Description() string

func (*CloudPlugin) Initialize added in v0.4.0

func (p *CloudPlugin) Initialize() error

func (*CloudPlugin) Name added in v0.4.0

func (p *CloudPlugin) Name() string

func (*CloudPlugin) Version added in v0.4.0

func (p *CloudPlugin) Version() string

type DatabasePlugin

type DatabasePlugin struct {
	// contains filtered or unexported fields
}

DatabasePlugin handles database operations.

func (*DatabasePlugin) Commands

func (p *DatabasePlugin) Commands() []cli.Command

func (*DatabasePlugin) Dependencies

func (p *DatabasePlugin) Dependencies() []string

func (*DatabasePlugin) Description

func (p *DatabasePlugin) Description() string

func (*DatabasePlugin) Initialize

func (p *DatabasePlugin) Initialize() error

func (*DatabasePlugin) Name

func (p *DatabasePlugin) Name() string

func (*DatabasePlugin) Version

func (p *DatabasePlugin) Version() string

type DeployPlugin

type DeployPlugin struct {
	// contains filtered or unexported fields
}

DeployPlugin handles deployment operations.

func (*DeployPlugin) Commands

func (p *DeployPlugin) Commands() []cli.Command

func (*DeployPlugin) Dependencies

func (p *DeployPlugin) Dependencies() []string

func (*DeployPlugin) Description

func (p *DeployPlugin) Description() string

func (*DeployPlugin) Initialize

func (p *DeployPlugin) Initialize() error

func (*DeployPlugin) Name

func (p *DeployPlugin) Name() string

func (*DeployPlugin) Version

func (p *DeployPlugin) Version() string

type DevPlugin

type DevPlugin struct {
	// contains filtered or unexported fields
}

DevPlugin handles development commands.

func (*DevPlugin) Commands

func (p *DevPlugin) Commands() []cli.Command

func (*DevPlugin) Dependencies

func (p *DevPlugin) Dependencies() []string

func (*DevPlugin) Description

func (p *DevPlugin) Description() string

func (*DevPlugin) Initialize

func (p *DevPlugin) Initialize() error

func (*DevPlugin) Name

func (p *DevPlugin) Name() string

func (*DevPlugin) Version

func (p *DevPlugin) Version() string

type DoctorPlugin

type DoctorPlugin struct {
	// contains filtered or unexported fields
}

DoctorPlugin provides system diagnostics.

func (*DoctorPlugin) Commands

func (p *DoctorPlugin) Commands() []cli.Command

func (*DoctorPlugin) Dependencies

func (p *DoctorPlugin) Dependencies() []string

func (*DoctorPlugin) Description

func (p *DoctorPlugin) Description() string

func (*DoctorPlugin) Initialize

func (p *DoctorPlugin) Initialize() error

func (*DoctorPlugin) Name

func (p *DoctorPlugin) Name() string

func (*DoctorPlugin) Version

func (p *DoctorPlugin) Version() string

type ExtensionPlugin

type ExtensionPlugin struct {
	// contains filtered or unexported fields
}

ExtensionPlugin handles extension operations.

func (*ExtensionPlugin) Commands

func (p *ExtensionPlugin) Commands() []cli.Command

func (*ExtensionPlugin) Dependencies

func (p *ExtensionPlugin) Dependencies() []string

func (*ExtensionPlugin) Description

func (p *ExtensionPlugin) Description() string

func (*ExtensionPlugin) Initialize

func (p *ExtensionPlugin) Initialize() error

func (*ExtensionPlugin) Name

func (p *ExtensionPlugin) Name() string

func (*ExtensionPlugin) Version

func (p *ExtensionPlugin) Version() string

type GeneratePlugin

type GeneratePlugin struct {
	// contains filtered or unexported fields
}

GeneratePlugin handles code generation.

func (*GeneratePlugin) Commands

func (p *GeneratePlugin) Commands() []cli.Command

func (*GeneratePlugin) Dependencies

func (p *GeneratePlugin) Dependencies() []string

func (*GeneratePlugin) Description

func (p *GeneratePlugin) Description() string

func (*GeneratePlugin) Initialize

func (p *GeneratePlugin) Initialize() error

func (*GeneratePlugin) Name

func (p *GeneratePlugin) Name() string

func (*GeneratePlugin) Version

func (p *GeneratePlugin) Version() string

type GenerationDefaults added in v0.7.0

type GenerationDefaults struct {
	Language string `yaml:"language"`
	Output   string `yaml:"output"`
	Package  string `yaml:"package"`
	BaseURL  string `yaml:"base_url,omitempty"`
	Module   string `yaml:"module,omitempty"`

	// Feature flags
	Auth      bool `yaml:"auth"`
	Streaming bool `yaml:"streaming"`

	// Streaming features
	Reconnection    bool `yaml:"reconnection"`
	Heartbeat       bool `yaml:"heartbeat"`
	StateManagement bool `yaml:"state_management"`

	// Enhanced features
	UseFetch        bool `yaml:"use_fetch"`
	DualPackage     bool `yaml:"dual_package"`
	GenerateTests   bool `yaml:"generate_tests"`
	GenerateLinting bool `yaml:"generate_linting"`
	GenerateCI      bool `yaml:"generate_ci"`
	ErrorTaxonomy   bool `yaml:"error_taxonomy"`
	Interceptors    bool `yaml:"interceptors"`
	Pagination      bool `yaml:"pagination"`

	// Output control
	ClientOnly bool `yaml:"client_only"` // Generate only client source files
}

GenerationDefaults defines default settings for client generation.

type InfraPlugin added in v0.4.0

type InfraPlugin struct {
	// contains filtered or unexported fields
}

InfraPlugin handles infrastructure deployment operations.

func (*InfraPlugin) Commands added in v0.4.0

func (p *InfraPlugin) Commands() []cli.Command

func (*InfraPlugin) Dependencies added in v0.4.0

func (p *InfraPlugin) Dependencies() []string

func (*InfraPlugin) Description added in v0.4.0

func (p *InfraPlugin) Description() string

func (*InfraPlugin) Initialize added in v0.4.0

func (p *InfraPlugin) Initialize() error

func (*InfraPlugin) Name added in v0.4.0

func (p *InfraPlugin) Name() string

func (*InfraPlugin) Version added in v0.4.0

func (p *InfraPlugin) Version() string

type InitPlugin

type InitPlugin struct {
	// contains filtered or unexported fields
}

InitPlugin handles project initialization.

func (*InitPlugin) Commands

func (p *InitPlugin) Commands() []cli.Command

func (*InitPlugin) Dependencies

func (p *InitPlugin) Dependencies() []string

func (*InitPlugin) Description

func (p *InitPlugin) Description() string

func (*InitPlugin) Initialize

func (p *InitPlugin) Initialize() error

func (*InitPlugin) Name

func (p *InitPlugin) Name() string

func (*InitPlugin) Version

func (p *InitPlugin) Version() string

type SourceConfig added in v0.7.0

type SourceConfig struct {
	// Type: "file", "url", "auto"
	Type string `yaml:"type"`

	// Path to spec file (when type=file)
	Path string `yaml:"path,omitempty"`

	// URL to fetch spec (when type=url)
	URL string `yaml:"url,omitempty"`

	// Auto-discovery paths (when type=auto)
	AutoDiscoverPaths []string `yaml:"auto_discover_paths,omitempty"`
}

SourceConfig defines where to get the API specification.

type StreamingExtConfig added in v0.8.0

type StreamingExtConfig struct {
	// Enable room management client
	Rooms bool `yaml:"rooms"`

	// Enable presence tracking client
	Presence bool `yaml:"presence"`

	// Enable typing indicator client
	Typing bool `yaml:"typing"`

	// Enable pub/sub channel client
	Channels bool `yaml:"channels"`

	// Enable message history support
	History bool `yaml:"history"`
}

StreamingExtConfig defines streaming extension features configuration.

type TargetInfo added in v0.3.0

type TargetInfo struct {
	Name        string
	Type        string // "app" or "extension"
	IsExtension bool
	Path        string
}

TargetInfo represents an app or extension that can receive a controller.

Directories

Path Synopsis
v2/cmd/forge/plugins/infra/generator.go
v2/cmd/forge/plugins/infra/generator.go

Jump to

Keyboard shortcuts

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