Documentation
¶
Index ¶
- Constants
- Variables
- func ConfigDir() (string, error)
- func Rel(basepath, targpath string) string
- func ShowJSON(title string, res gjson.Result, format string, transform string) error
- type AuthConfig
- type BuildModel
- type BuildTargetInfo
- type GenerateSpecParams
- type TargetConfig
- type TargetInfo
- type WorkspaceConfig
Constants ¶
const Version = "0.1.0-alpha.55" // x-release-please-version
Variables ¶
var ( Command *cli.Command OutputFormats = []string{"auto", "explore", "json", "pretty", "raw", "yaml"} )
var ErrUserCancelled = errors.New("user cancelled")
Functions ¶
Types ¶
type AuthConfig ¶
type AuthConfig struct {
AccessToken string `json:"access_token"`
RefreshToken string `json:"refresh_token,omitempty"`
TokenType string `json:"token_type"`
ConfigPath string `json:"-"`
}
AuthConfig stores the OAuth credentials
func NewAuthConfig ¶
func NewAuthConfig() (*AuthConfig, error)
NewAuthConfig creates a new AuthConfig with ConfigPath populated. Use this when creating a new config that you plan to save. For loading existing configs, use &AuthConfig{} and call Find() or Load().
func (*AuthConfig) Exists ¶
func (config *AuthConfig) Exists() bool
Exists checks if the auth config file exists
func (*AuthConfig) Find ¶
func (config *AuthConfig) Find() (bool, error)
Find searches for and loads the auth config from the standard location. Returns (true, nil) if config file exists and was successfully loaded. Returns (false, nil) if config file doesn't exist or is empty (not an error). Returns (false, error) if config file exists but failed to load due to an error.
func (*AuthConfig) Load ¶
func (config *AuthConfig) Load(configPath string) error
Load loads the auth config from a specific path. Returns nil if the file doesn't exist (not treated as an error). Returns nil if the file exists but is empty (not treated as an error). Returns error only if the file exists but fails to parse or read. Only sets ConfigPath if a valid config with AccessToken is successfully loaded.
func (*AuthConfig) Remove ¶
func (config *AuthConfig) Remove() error
Remove removes the auth config file
type BuildModel ¶
type BuildModel struct {
// contains filtered or unexported fields
}
BuildModel represents the bubbletea model for build monitoring
func NewBuildModel ¶
func (BuildModel) FullHelp ¶
func (m BuildModel) FullHelp() [][]key.Binding
func (BuildModel) Init ¶
func (m BuildModel) Init() tea.Cmd
func (BuildModel) ShortHelp ¶
func (m BuildModel) ShortHelp() []key.Binding
func (BuildModel) View ¶
func (m BuildModel) View() string
type BuildTargetInfo ¶
type BuildTargetInfo struct {
// contains filtered or unexported fields
}
BuildTargetInfo holds information about a build target
type GenerateSpecParams ¶
type TargetConfig ¶
type TargetConfig struct {
OutputPath string `json:"output_path"`
}
TargetConfig stores configuration for a specific SDK target
type TargetInfo ¶
TargetInfo represents a target with its display name and default selection
type WorkspaceConfig ¶
type WorkspaceConfig struct {
Project string `json:"project"`
OpenAPISpec string `json:"openapi_spec,omitempty"`
StainlessConfig string `json:"stainless_config,omitempty"`
Targets map[string]*TargetConfig `json:"targets,omitempty"`
ConfigPath string `json:"-"`
}
WorkspaceConfig stores workspace-level configuration
func NewWorkspaceConfig ¶
func NewWorkspaceConfig(projectName, openAPISpecPath, stainlessConfigPath string) (WorkspaceConfig, error)
func (*WorkspaceConfig) Find ¶
func (config *WorkspaceConfig) 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 (*WorkspaceConfig) Load ¶
func (config *WorkspaceConfig) Load(configPath string) error
func (*WorkspaceConfig) Save ¶
func (config *WorkspaceConfig) Save() error