Movatterモバイル変換


[0]ホーム

URL:


echo

package
v2.23.0Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2025 License:AGPL-3.0Imports:13Imported by:0

Details

Repository

github.com/coder/coder

Links

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

func ProvisionApplyWithAgent(authTokenstring) []*proto.Response

ProvisionApplyWithAgent returns provision responses that will mock a fake"aws_instance" resource with an agent that has the given auth token.

funcProvisionApplyWithAgentAndAPIKeyScopeadded inv2.22.0

func ProvisionApplyWithAgentAndAPIKeyScope(authTokenstring, apiKeyScopestring) []*proto.Response

ProvisionApplyWithAgent returns provision responses that will mock a fake"aws_instance" resource with an agent that has the given auth token.

funcServe

Serve starts the echo provisioner.

funcTar

func Tar(responses *Responses) ([]byte,error)

Tar returns a tar archive of responses to provisioner operations.

funcTarWithOptionsadded inv2.4.0

func TarWithOptions(ctxcontext.Context, loggerslog.Logger, responses *Responses) ([]byte,error)

TarWithOptions returns a tar archive of responses to provisioner operations,but it gives more insight into the archiving process.

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.

funcWithExtraFilesadded inv2.22.0

func WithExtraFiles(extraFiles map[string][]byte) *Responses

funcWithResourcesadded inv2.1.4

func WithResources(resources []*proto.Resource) *Responses

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp