File size: 1,533 Bytes
7b9f3e3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package types

import "context"

type Instance struct {
	Name        string          `json:"name" bson:"name"`
	Image       string          `json:"image" bson:"image"`
	Hostname    string          `json:"hostname" bson:"hostname"`
	IP          string          `json:"ip" bson:"ip"`
	RoutableIP  string          `json:"routable_ip" bson:"routable_id"`
	ServerCert  []byte          `json:"server_cert" bson:"server_cert"`
	ServerKey   []byte          `json:"server_key" bson:"server_key"`
	CACert      []byte          `json:"ca_cert" bson:"ca_cert"`
	Cert        []byte          `json:"cert" bson:"cert"`
	Key         []byte          `json:"key" bson:"key"`
	Tls         bool            `json:"tls" bson:"tls"`
	SessionId   string          `json:"session_id" bson:"session_id"`
	ProxyHost   string          `json:"proxy_host" bson:"proxy_host"`
	SessionHost string          `json:"session_host" bson:"session_host"`
	Type        string          `json:"type" bson:"type"`
	WindowsId   string          `json:"-" bson:"windows_id"`
	ctx         context.Context `json:"-" bson:"-"`
}

type WindowsInstance struct {
	Id        string `bson:"id"`
	SessionId string `bson:"session_id"`
}

type InstanceConfig struct {
	ImageName      string
	Privileged     bool
	Hostname       string
	ServerCert     []byte
	ServerKey      []byte
	CACert         []byte
	Cert           []byte
	Key            []byte
	Tls            bool
	PlaygroundFQDN string
	Type           string
	DindVolumeSize string
	Envs           []string
	Networks       []string
}