bldr

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartGitSmartHTTPServer

func StartGitSmartHTTPServer(t *testing.T, repo *git.Repository) string

StartGitSmartHTTPServer starts a Git Smart HTTP Server. Pushing to the Git Server is not supported. Shallow clones are not supported. Not thread-safe.

func TCPPort added in v0.2.0

func TCPPort(t *testing.T) *tcpPort

Types

type EnvironmentBuilder added in v0.2.0

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

func Env added in v0.2.0

func Env() *EnvironmentBuilder

func (*EnvironmentBuilder) Build added in v0.2.0

func (bldr *EnvironmentBuilder) Build() *runner.Environment

type FileSystemStepResourceBuilder

type FileSystemStepResourceBuilder struct {
}

func FileSystemStepResource

func FileSystemStepResource() *FileSystemStepResourceBuilder

func (*FileSystemStepResourceBuilder) Build

type FixedResultStep

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

func (*FixedResultStep) Describe

func (s *FixedResultStep) Describe() string

func (*FixedResultStep) Run

type GitRepositoryBuilder

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

func GitRepository

func GitRepository() *GitRepositoryBuilder

func (*GitRepositoryBuilder) Build

func (bldr *GitRepositoryBuilder) Build(t *testing.T) (*git.Repository, *git.Worktree)

func (*GitRepositoryBuilder) InitWithFilesFromDir

func (bldr *GitRepositoryBuilder) InitWithFilesFromDir(path string) *GitRepositoryBuilder

type GitSmartHTTPServer

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

func NewGitSmartHTTPServer

func NewGitSmartHTTPServer(listener net.Listener, repo *git.Repository) *GitSmartHTTPServer

func (*GitSmartHTTPServer) Close

func (s *GitSmartHTTPServer) Close()

func (*GitSmartHTTPServer) Serve

func (s *GitSmartHTTPServer) Serve()

type GitStepResourceBuilder

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

func GitStepResource

func GitStepResource() *GitStepResourceBuilder

func (*GitStepResourceBuilder) Build

func (*GitStepResourceBuilder) WithPath

func (bldr *GitStepResourceBuilder) WithPath(path ...string) *GitStepResourceBuilder

func (*GitStepResourceBuilder) WithURL

func (*GitStepResourceBuilder) WithVersion

func (bldr *GitStepResourceBuilder) WithVersion(version string) *GitStepResourceBuilder

type GitWorktreeBuilder

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

func GitWorktree

func GitWorktree(t *testing.T, worktree *git.Worktree) *GitWorktreeBuilder

func (*GitWorktreeBuilder) Commit

func (bldr *GitWorktreeBuilder) Commit(commitMsg string) string

func (*GitWorktreeBuilder) CopyFromDir

func (bldr *GitWorktreeBuilder) CopyFromDir(fromDir string) *GitWorktreeBuilder

func (*GitWorktreeBuilder) CreateFile

func (bldr *GitWorktreeBuilder) CreateFile(path string, content string) *GitWorktreeBuilder

func (*GitWorktreeBuilder) MakeDir

func (bldr *GitWorktreeBuilder) MakeDir(dir string) *GitWorktreeBuilder

func (*GitWorktreeBuilder) Stage

func (bldr *GitWorktreeBuilder) Stage(glob string) *GitWorktreeBuilder

type GlobalContextBuilder

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

func GlobalContext

func GlobalContext() *GlobalContextBuilder

func (*GlobalContextBuilder) Build

func (bldr *GlobalContextBuilder) Build() *runner.GlobalContext

func (*GlobalContextBuilder) WithJob

func (bldr *GlobalContextBuilder) WithJob(name, value string) *GlobalContextBuilder

type InterpolationCtxBuilder

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

func InterpolationCtx

func InterpolationCtx() *InterpolationCtxBuilder

func (*InterpolationCtxBuilder) Build

func (*InterpolationCtxBuilder) WithEnvVar

func (bldr *InterpolationCtxBuilder) WithEnvVar(name, value string) *InterpolationCtxBuilder

type ProtoDefinitionBuilder

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

func ProtoDef

func ProtoDef() *ProtoDefinitionBuilder

func (*ProtoDefinitionBuilder) Build

func (bldr *ProtoDefinitionBuilder) Build() *proto.Definition

func (*ProtoDefinitionBuilder) WithEnvVar

func (bldr *ProtoDefinitionBuilder) WithEnvVar(name, value string) *ProtoDefinitionBuilder

func (*ProtoDefinitionBuilder) WithExecType

func (bldr *ProtoDefinitionBuilder) WithExecType(workDir string, command []string) *ProtoDefinitionBuilder

func (*ProtoDefinitionBuilder) WithOutput

func (bldr *ProtoDefinitionBuilder) WithOutput(name string, value *structpb.Value) *ProtoDefinitionBuilder

type ProtoSpecBuilder

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

func ProtoSpec

func ProtoSpec() *ProtoSpecBuilder

func (*ProtoSpecBuilder) Build

func (bldr *ProtoSpecBuilder) Build() *proto.Spec

func (*ProtoSpecBuilder) WithOutputMethod

func (bldr *ProtoSpecBuilder) WithOutputMethod(outputMethod proto.OutputMethod) *ProtoSpecBuilder

func (*ProtoSpecBuilder) WithOutputSpec

func (bldr *ProtoSpecBuilder) WithOutputSpec(outputSpec map[string]*proto.Spec_Content_Output) *ProtoSpecBuilder

type ProtoSpecDefinitionBuilder

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

func ProtoSpecDef

func ProtoSpecDef() *ProtoSpecDefinitionBuilder

func (*ProtoSpecDefinitionBuilder) Build

func (*ProtoSpecDefinitionBuilder) WithDefinition

func (bldr *ProtoSpecDefinitionBuilder) WithDefinition(definition *proto.Definition) *ProtoSpecDefinitionBuilder

func (*ProtoSpecDefinitionBuilder) WithSpec

type StepBuilder

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

func Step

func Step() *StepBuilder

func (*StepBuilder) Build

func (bldr *StepBuilder) Build() *FixedResultStep

func (*StepBuilder) WithRunReturnsErr

func (bldr *StepBuilder) WithRunReturnsErr(err error) *StepBuilder

func (*StepBuilder) WithRunReturnsStepResult

func (bldr *StepBuilder) WithRunReturnsStepResult(stepResult *proto.StepResult) *StepBuilder

type StepResultBuilder

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

func StepResult

func StepResult() *StepResultBuilder

func (*StepResultBuilder) Build

func (bldr *StepResultBuilder) Build() *proto.StepResult

func (*StepResultBuilder) WithFailedStatus

func (bldr *StepResultBuilder) WithFailedStatus() *StepResultBuilder

func (*StepResultBuilder) WithOutput

func (bldr *StepResultBuilder) WithOutput(name string, value *structpb.Value) *StepResultBuilder

func (*StepResultBuilder) WithSpecDef

func (bldr *StepResultBuilder) WithSpecDef(specDef *proto.SpecDefinition) *StepResultBuilder

func (*StepResultBuilder) WithSuccessStatus

func (bldr *StepResultBuilder) WithSuccessStatus() *StepResultBuilder

type StepsContextBuilder

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

func StepsContext

func StepsContext(t *testing.T) *StepsContextBuilder

func (*StepsContextBuilder) Build

func (bldr *StepsContextBuilder) Build() *runner.StepsContext

func (*StepsContextBuilder) WithEnv

func (bldr *StepsContextBuilder) WithEnv(key, value string) *StepsContextBuilder

func (*StepsContextBuilder) WithGlobalContext

func (bldr *StepsContextBuilder) WithGlobalContext(globalCtx *runner.GlobalContext) *StepsContextBuilder

func (*StepsContextBuilder) WithInput

func (bldr *StepsContextBuilder) WithInput(name string, value *structpb.Value) *StepsContextBuilder

func (*StepsContextBuilder) WithStepResults

func (bldr *StepsContextBuilder) WithStepResults(stepResults map[string]*proto.StepResult) *StepsContextBuilder

Jump to

Keyboard shortcuts

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