{"modulePath":"github.com/DomBlack/git-stack","version":"v0.2.3","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package stacktest\n\nPackage stacktest provides an in-memory stack backend for tests. Branch creation and checkout happen in the real temporary repository; the graph lives in memory.\n\n## Types\n\n```go\ntype Backend struct {\n\n\t// Submits records submit options; SubmitFn, when set, runs on submit.\n\tSubmits  []stack.SubmitOptions\n\tSubmitFn func(o stack.SubmitOptions) error\n\t// contains filtered or unexported fields\n}\n```\nBackend implements every stack port in memory.\n\n```go\nfunc New(g *git.Client, graph *stack.Graph) *Backend\n```\nNew returns a Backend over g with the given initial graph.\n\n```go\nfunc (b *Backend) AddTop(ctx context.Context, repo git.Repo, name string) error\n```\n\n```go\nfunc (b *Backend) Graph() *stack.Graph\n```\nGraph returns the current graph.\n\n```go\nfunc (b *Backend) InitStack(ctx context.Context, repo git.Repo, trunk string, branches []string) error\n```\n\n```go\nfunc (b *Backend) Load(context.Context, git.Repo) (*stack.Graph, error)\n```\n\n```go\nfunc (b *Backend) SetGraph(g *stack.Graph)\n```\nSetGraph replaces the graph.\n\n```go\nfunc (b *Backend) Submit(_ context.Context, _ git.Repo, o stack.SubmitOptions) (stack.SubmitResult, error)\n```\n\n```go\nfunc (b *Backend) Update(_ context.Context, _ git.Repo, fn func(*stack.Graph) error) error\n```\n\n","path":"github.com/DomBlack/git-stack/pkg/stack/stacktest","name":"stacktest","synopsis":"Package stacktest provides an in-memory stack backend for tests.","isRedistributable":true}
