preguide

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2020 License: BSD-3-Clause Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GuideStructure

type GuideStructure struct {
	Delims    [2]string
	Presteps  []*Prestep
	Terminals []*Terminal
	Scenarios []*Scenario
	Networks  []string
	Env       []string
}

type GuideStructures

type GuideStructures map[string]*GuideStructure

type Prestep

type Prestep struct {
	Package string
	Path    string
	Args    interface{}
}

type PrestepOut

type PrestepOut struct {
	Vars []string
}

type PrestepServiceConfig

type PrestepServiceConfig map[string]*ServiceConfig

PrestepServiceConfig defines a mapping between the prestep pkg (which is essentially the unique identifier for a prestep) and config for that prestep. For example, github.com/play-with-go/gitea will map to an endpoint that explains where that prestep can be "found". The Networks value represents a (non-production) config that describes which Docker networks the request should be made within.

type Scenario

type Scenario struct {
	Name        string
	Description string
}

type Schemas

type Schemas struct {
	PrestepServiceConfig cue.Value
	Guide                cue.Value
	Command              cue.Value
	CommandFile          cue.Value
	Upload               cue.Value
	UploadFile           cue.Value
	GuideOutput          cue.Value
	CommandStep          cue.Value
	UploadStep           cue.Value
	GuideStructures      cue.Value
}

func LoadSchemas

func LoadSchemas(r *cue.Runtime) (res Schemas, err error)

type ServiceConfig

type ServiceConfig struct {
	Endpoint *url.URL
	Env      []string
	Networks []string
}

ServiceConfig defines a URL endpoint where a prestep can be accessed. It also defines optional Docker networks to join when this service is accessed by preguide in a development mode.

func (*ServiceConfig) UnmarshalJSON

func (p *ServiceConfig) UnmarshalJSON(b []byte) error

type Terminal

type Terminal struct {
	Name        string
	Description string
	Scenarios   map[string]*TerminalScenario
}

type TerminalScenario

type TerminalScenario struct {
	Image string
}

Directories

Path Synopsis
cmd
preguide
preguide is a pre-processor for Play With Docker-based guides
preguide is a pre-processor for Play With Docker-based guides
internal
ci
git

Jump to

Keyboard shortcuts

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