echo
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Index¶
- Variables
- func ProvisionApplyWithAgent(authToken string) []*proto.Response
- func ProvisionApplyWithAgentAndAPIKeyScope(authToken string, apiKeyScope string) []*proto.Response
- func Serve(ctx context.Context, options *provisionersdk.ServeOptions) error
- func Tar(responses *Responses) ([]byte, error)
- func TarWithOptions(ctx context.Context, logger slog.Logger, responses *Responses) ([]byte, error)
- type Responses
Constants¶
This section is empty.
Variables¶
var (// ParseComplete is a helper to indicate an empty parse completion.ParseComplete = []*proto.Response{{Type: &proto.Response_Parse{Parse: &proto.ParseComplete{},},}}// PlanComplete is a helper to indicate an empty provision completion.PlanComplete = []*proto.Response{{Type: &proto.Response_Plan{Plan: &proto.PlanComplete{Plan: []byte("{}"),ModuleFiles: []byte{},},},}}// ApplyComplete is a helper to indicate an empty provision completion.ApplyComplete = []*proto.Response{{Type: &proto.Response_Apply{Apply: &proto.ApplyComplete{},},}}// PlanFailed is a helper to convey a failed plan operationPlanFailed = []*proto.Response{{Type: &proto.Response_Plan{Plan: &proto.PlanComplete{Error: "failed!",},},}}// ApplyFailed is a helper to convey a failed apply operationApplyFailed = []*proto.Response{{Type: &proto.Response_Apply{Apply: &proto.ApplyComplete{Error: "failed!",},},}})
Functions¶
funcProvisionApplyWithAgent¶
ProvisionApplyWithAgent returns provision responses that will mock a fake"aws_instance" resource with an agent that has the given auth token.
funcProvisionApplyWithAgentAndAPIKeyScope¶added inv2.22.0
ProvisionApplyWithAgent returns provision responses that will mock a fake"aws_instance" resource with an agent that has the given auth token.
funcServe¶
func Serve(ctxcontext.Context, options *provisionersdk.ServeOptions)error
Serve starts the echo provisioner.
Types¶
typeResponses¶
type Responses struct {Parse []*proto.Response// ProvisionApply and ProvisionPlan are used to mock ALL responses of// Apply and Plan, regardless of transition.ProvisionApply []*proto.ResponseProvisionPlan []*proto.Response// ProvisionApplyMap and ProvisionPlanMap are used to mock specific// transition responses. They are prioritized over the generic responses.ProvisionApplyMap map[proto.WorkspaceTransition][]*proto.ResponseProvisionPlanMap map[proto.WorkspaceTransition][]*proto.ResponseExtraFiles map[string][]byte}
Responses is a collection of mocked responses to Provision operations.