core

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 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

View Source
const (
	ConfigPath      = ".ws"
	ConfigFile      = "config"
	ConfigType      = "yaml"
	EnvPrefix       = "WS"
	UpdateCacheFile = "update_cache.json"
)
View Source
const (
	Create = "create"
)
View Source
const (
	PersistentFlagConfig = "config"
)

persistent flags

Variables

View Source
var Version = "v0.0.1"

Version is the current version of the application. It will be overwritten by goreleaser's ldflags during release builds.

Functions

This section is empty.

Types

type AddInput

type AddInput struct {
	BaseInput
	ServiceRepoNames []string
	BaseBranchName   string
}

type BaseInput

type BaseInput struct {
	FeatBranchName string
	Cfg            *Config
}

func (*BaseInput) GetWorkspaceName

func (b *BaseInput) GetWorkspaceName() string

type Config

type Config struct {
	BaseReposPath     string    `mapstructure:"base_repos"`
	BaseWorkspacePath string    `mapstructure:"base_ws"`
	ReplaceSlashInDir bool      `mapstructure:"replace_slash"`
	Symlinks          []Symlink `mapstructure:"symlinks"`
	// CowDirs lists repo-relative directories (e.g. "kitex_gen") that should be
	// copy-on-write cloned from the main repo into a new worktree. These are typically
	// git-ignored codegen outputs with no global store to back them, so cloning them
	// saves disk and time. Treated as a pure cache/warm-up: cloned as-is, no consistency
	// check against the worktree's IDL.
	CowDirs []string `mapstructure:"cow_dirs"`
}

func GetConfig

func GetConfig() (*Config, error)

func (*Config) GetReposPath

func (c *Config) GetReposPath() string

func (*Config) GetSafeDirName

func (c *Config) GetSafeDirName(branchName string) string

func (*Config) GetWorkspacePath

func (c *Config) GetWorkspacePath() string

type DestroyInput

type DestroyInput struct {
	BaseInput
	Force bool
}

type OpenInput

type OpenInput struct {
	BaseInput
}

type RemoveInput

type RemoveInput struct {
	BaseInput
	ServiceRepoNames []string
}
type Symlink struct {
	Source      string `mapstructure:"src"`
	Destination string `mapstructure:"dest"`
}

type SyncInput

type SyncInput struct {
	ServiceRepoNames []string
	BaseBranchName   string
	Cfg              *Config
}

Jump to

Keyboard shortcuts

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