scaffold

package
v0.27.2 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2026 License: MIT Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(opts Options) string

Generate creates the ssd.yaml content from options

func MigrateLegacy added in v0.16.0

func MigrateLegacy(dir string) (string, error)

MigrateLegacy moves dir/ssd.yaml into dir/.ssd/ssd.yaml and seeds dir/.ssd/.gitignore. Returns the new path on success.

Refuses to overwrite an existing .ssd/ssd.yaml — the caller should resolve the conflict (delete one or merge by hand) before retrying. Refuses when there is no legacy file to migrate.

func TargetPath added in v0.16.0

func TargetPath(dir string) string

TargetPath returns the path init will write to in dir.

Preferred: <dir>/.ssd/ssd.yaml (new layout, keeps repo root clean). Legacy: <dir>/ssd.yaml when it already exists, to avoid surprising

existing projects with a new .ssd/ directory.

func Validate

func Validate(opts Options) error

Validate checks that required options are set and values are valid

func WriteFile

func WriteFile(dir string, opts Options) error

WriteFile writes the generated ssd config to dir using the layout chosen by TargetPath. Creates .ssd/ and .ssd/.gitignore as needed.

When the chosen target already exists, returns an error unless opts.Force is set.

Types

type Options

type Options struct {
	Server  string // Required: SSH host name
	Runtime string // Optional: "compose" (default) or "k3s"
	Stack   string // Optional: stack path (e.g., /dockge/stacks/myapp)
	Service string // Optional: service name (default: "app")
	Domain  string // Optional: domain for Traefik routing
	Path    string // Optional: path prefix for Traefik routing (e.g., /api)
	Port    int    // Optional: container port
	Force   bool   // Optional: overwrite existing ssd.yaml
}

Options holds configuration for init command

Jump to

Keyboard shortcuts

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