workspace

package
v0.1.0-alpha.73 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: Apache-2.0 Imports: 5 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 Relative

func Relative(path string) string

func Resolve

func Resolve(baseDir, path string) string

Resolve converts a path to absolute, resolving it relative to baseDir if it's not already absolute

Types

type Config

type Config struct {
	Project         string
	OpenAPISpec     string
	StainlessConfig string
	Targets         map[stainless.Target]*TargetConfig

	ConfigPath string
}

Config stores workspace-level configuration with absolute paths

func NewConfig

func NewConfig(projectName, openAPISpecPath, stainlessConfigPath string) (Config, error)

func (*Config) Find

func (config *Config) Find() (bool, error)

Find searches for a stainless-workspace.json file starting from the current directory and moving up to parent directories until found or root is reached

func (*Config) Load

func (config *Config) Load(configPath string) error

func (*Config) Save

func (config *Config) Save() error

type ConfigExport

type ConfigExport struct {
	Project         string                             `json:"project"`
	OpenAPISpec     string                             `json:"openapi_spec,omitempty"`
	StainlessConfig string                             `json:"stainless_config,omitempty"`
	Targets         map[stainless.Target]*TargetConfig `json:"targets,omitempty"`
}

ConfigExport represents the on-disk format with relative paths

type TargetConfig

type TargetConfig struct {
	OutputPath string `json:"output_path"`
}

TargetConfig stores configuration for a specific SDK target

Jump to

Keyboard shortcuts

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