def

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ImportLessonDefs

func ImportLessonDefs(syringeConfig *config.SyringeConfig, fileList []string) (map[int32]*LessonDefinition, error)

Types

type Connection

type Connection struct {
	A      string `json:"a" yaml:"a"`
	B      string `json:"b" yaml:"b"`
	Subnet string `json:"subnet" yaml:"subnet"`
}

type Endpoint

type Endpoint struct {
	Name        string  `json:"name" yaml:"name"`
	Image       string  `json:"image" yaml:"image"`
	Sshuser     string  `json:"sshuser" yaml:"sshuser"`
	Sshpassword string  `json:"sshpassword" yaml:"sshpassword"`
	Ports       []int32 `json:"ports" yaml:"ports"`
}

type IframeDetails

type IframeDetails struct {
	Name     string `json:"name" yaml:"name"`
	Protocol string `json:"protocol" yaml:"protocol"`
	URI      string `json:"uri" yaml:"uri"`
	Port     int32  `json:"port" yaml:"port"`
}

type LessonDefinition

type LessonDefinition struct {
	LessonName    string                 `json:"lessonName" yaml:"lessonName"`
	LessonID      int32                  `json:"lessonID" yaml:"lessonID"`
	Disabled      bool                   `json:"disabled" yaml:"disabled"`
	Devices       []*Endpoint            `json:"devices" yaml:"devices"`
	Utilities     []*Endpoint            `json:"utilities" yaml:"utilities"`
	Blackboxes    []*Endpoint            `json:"blackboxes" yaml:"blackboxes"`
	Connections   []*Connection          `json:"connections" yaml:"connections"`
	TopologyType  string                 `json:"topologyType" yaml:"topologyType"`
	Stages        map[int32]*LessonStage `json:"stages" yaml:"stages"`
	Category      string                 `json:"category" yaml:"category"`
	LessonDiagram string                 `json:"lessondiagram" yaml:"lessondiagram"`
	LessonVideo   string                 `json:"lessonvideo" yaml:"lessonvideo"`
}

func (*LessonDefinition) JSON

func (ld *LessonDefinition) JSON() string

JSON exports the lesson definition as JSON

type LessonStage

type LessonStage struct {
	LabGuide       string            `json:"labguide" yaml:"labguide"`
	Configs        map[string]string `json:"configs" yaml:"configs"`
	IframeResource IframeDetails     `json:"iframeresource" yaml:"iframeresource"`
	Description    string            `json:"description" yaml:"description"`
}

Jump to

Keyboard shortcuts

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