stack

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const Version = 1

Variables

This section is empty.

Functions

func Write

func Write(path string, f *File) error

Types

type File

type File struct {
	Version     int      `json:"version"`
	GeneratedAt string   `json:"generated_at"`
	Modules     []Module `json:"modules"`
}

func New

func New(modules []Module) *File

func Read

func Read(path string) (*File, error)

func (*File) Validate

func (f *File) Validate() error

type ImportAction

type ImportAction struct {
	Module Module
	Status ImportStatus
	Target string
	DryRun bool
	Error  error
}

type ImportOptions

type ImportOptions struct {
	RootDir     string
	Concurrency int
	DryRun      bool
}

type ImportStatus

type ImportStatus string
const (
	StatusSynced    ImportStatus = "synced"
	StatusFallback  ImportStatus = "fallback"
	StatusDirty     ImportStatus = "dirty"
	StatusDivergent ImportStatus = "divergent"
	StatusFailed    ImportStatus = "failed"
)

type Module

type Module struct {
	Path   string `json:"path"`
	Branch string `json:"branch,omitempty"`
	SHA    string `json:"sha"`
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(svc git.GitService) *Service

func (*Service) Export

func (s *Service) Export(ctx context.Context, rootDir string) (*File, error)

func (*Service) Import

func (s *Service) Import(ctx context.Context, modules []Module, opts ImportOptions) []ImportAction

Jump to

Keyboard shortcuts

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