config

package
v0.3.29 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const DefaultClientID = "builder-cli"

DefaultClientID is the default client ID using the PKCE flow.

View Source
const DefaultDataDir = "sparkles.db"

DefaultDataDir is the default data directory for the application.

View Source
const DefaultPath = ".sparkles"

DefaultPath is the default path to store workspace data.

View Source
const DefaultSpecFileName = ".builder.yml"

DefaultSpecFileName is the default spec file name.

View Source
const UnknownCwd = ""

UnknownCwd is the unknown current working directory.

Variables

View Source
var DefaultConfig = NewConfig()

DefaultConfig holds the configuration for the builder.

View Source
var DefaultFlags = NewFlags()

DefaultFlags holds the default command line flags.

Functions

func AppDirPath added in v0.3.28

func AppDirPath() (string, error)

AppDirPath returns the path to the main data directory for the application.

func Cwd added in v0.3.28

func Cwd() (string, error)

Cwd returns the current working directory.

func DataDir added in v0.3.28

func DataDir() (string, error)

DataDir returns the path to the data directory for the application.

func DiscoverWellKnownConfig added in v0.3.28

func DiscoverWellKnownConfig(ctx context.Context, url string) (*discovery.WellKnownConfig, error)

DiscoverWellKnownConfig discovers the well-known configuration for the given URL.

func HomeDir added in v0.3.28

func HomeDir() (string, error)

HomeDir returns the home directory.

func SetupServices added in v0.3.28

func SetupServices(ctx context.Context, path string) (services.Service, error)

SetupServices sets up the services for the application.

Types

type Config

type Config struct {
	// Stderr is the stderr file.
	Stderr *os.File
	// Stdin is the stdin file.
	Stdin *os.File
	// Stdout is the stdout file.
	Stdout *os.File
	// Task contains the flags for a task.
	Task TaskFlags
}

Config contains the configuration.

func NewConfig added in v0.3.28

func NewConfig() Config

New returns a new config.

type Flags

type Flags struct {
	// URL is the URL of the builder server.
	URL string
	// Plugins contains the plugins to use.
	Plugins []string
	// Vars contains the variables to use.
	Vars []string
	// Force indicates whether to force overwrite.
	Force bool
	// Verbose indicates whether to print verbose messages.
	Verbose bool
	// Debug indicates whether to enable debug mode.
	Debug bool
	// Yolo indicates whether to enable yolo mode.
	Yolo bool
	// TaskFlags contains the flags for a task.
	TaskFlags TaskFlags
	// Config is the path to the config file.
	Config string
	// Path is the path to the store file.
	Path string
	// Session is the session ID to use.
	Session string
	// Continue indicates whether to continue a session.
	Continue bool
	// Experimental indicates whether to enable experimental features.
	Experimental bool
}

Flags contains the command line flags.

func NewFlags

func NewFlags() Flags

NewFlags returns a new flags.

func (*Flags) ConfigPath added in v0.3.28

func (f *Flags) ConfigPath() (string, error)

Abs returns the absolute path of the config file.

func (*Flags) Spec added in v0.3.28

func (f *Flags) Spec() (*specs.Spec, error)

Spec is a helper to load the spec from the config file.

type TaskFlags

type TaskFlags struct {
	// Name is the name of the task to execute.
	Name string
}

TaskFlags contains the flags for a task.

Jump to

Keyboard shortcuts

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