Documentation ¶
Index ¶
- func GetDNSRecords(records []*DNSRecord) []string
- type DNSRecord
- type FrontendConf
- type Lab
- func (l *Lab) AddAndStartExercises(ctx context.Context, exerConfs ...exercise.ExerciseConfig) error
- func (l *Lab) AddExercises(ctx context.Context, confs ...exercise.ExerciseConfig) error
- func (l *Lab) Close() error
- func (l *Lab) CreateNetwork(ctx context.Context, isVPN bool) error
- func (lab *Lab) CreateVPNConfigs(wgClient wgproto.WireguardClient, envTag string, vpnConfig VpnConfig) ([]string, []string, error)
- func (l *Lab) GetExercisesInfo() []*proto.Exercise
- func (l *Lab) InstanceInfo() []virtual.InstanceInfo
- func (l *Lab) RdpConnPorts() []uint
- func (l *Lab) RefreshDHCP(ctx context.Context) error
- func (l *Lab) RefreshDNS(ctx context.Context) error
- func (l *Lab) ResetExercise(ctx context.Context, exTag string) error
- func (l *Lab) ResetVm(ctx context.Context, port uint, envTag string) error
- func (l *Lab) Start(ctx context.Context) error
- func (l *Lab) StartExercise(ctx context.Context, exTag string) error
- func (l *Lab) StopExercise(ctx context.Context, exTag string) error
- type LabConf
- type LabType
- type VpnConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDNSRecords ¶
Types ¶
type FrontendConf ¶
type FrontendConf struct { Vm *virtual.Vm Conf virtual.InstanceConfig }
type Lab ¶
type Lab struct { M *sync.RWMutex Tag string Type LabType Frontends map[uint]FrontendConf Exercises map[string]*exercise.Exercise ExerciseConfigs []exercise.ExerciseConfig DisabledExercises []string DnsRecords []*DNSRecord DockerHost virtual.Host Network *virtual.Network DnsServer *dns.Server DhcpServer *dhcp.Server DnsAddress string Vlib *virtual.VboxLibrary IsVPN bool GuacUsername string GuacPassword string VpnConfs []string }
func (*Lab) AddAndStartExercises ¶
Used to add exercises to an already running lab. It configures the containers, refreshes the DNS to add the new records and then starts the new exercise containers
func (*Lab) AddExercises ¶
AddExercises uses exercise configs from the exercise service to configure containers and flags to be started at a later time
func (*Lab) CreateNetwork ¶
CreateNetwork network
func (*Lab) CreateVPNConfigs ¶
func (*Lab) GetExercisesInfo ¶
Returns all exercises currently in lab to be sent to the daemon
func (*Lab) InstanceInfo ¶
func (l *Lab) InstanceInfo() []virtual.InstanceInfo
Get a list of instance information for the VMs and exercises running in the lab
func (*Lab) RdpConnPorts ¶
Get a list of ports for the VMs running in the lab
func (*Lab) StartExercise ¶
TODO: Set status of exercise so user can see weither if it is started or stopped.
type LabConf ¶
type LabConf struct { Vlib *virtual.VboxLibrary Frontends []virtual.InstanceConfig ExerciseConfs []exercise.ExerciseConfig DisabledExercises []string }
Click to show internal directories.
Click to hide internal directories.