Add SessionProvisioner and InstanceProvisionerFactory

Remove AllowedImages and IsDockerHost as it is not really being used for
anything useful
This commit is contained in:
Jonathan Leibiusky @xetorthio
2017-08-24 15:36:59 -03:00
parent 11d9d59975
commit 438fe9f6e7
15 changed files with 187 additions and 131 deletions

View File

@@ -3,23 +3,22 @@ package types
import "context"
type Instance struct {
Image string `json:"image" bson:"image"`
Name string `json:"name" bson:"name"`
Hostname string `json:"hostname" bson:"hostname"`
IP string `json:"ip" bson:"ip"`
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"`
IsDockerHost bool `json:"is_docker_host" bson:"is_docker_host"`
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"`
Session *Session `json:"-" bson:"-"`
ctx context.Context `json:"-" bson:"-"`
WindowsId string `json:"-" bson:"windows_id"`
Image string `json:"image" bson:"image"`
Name string `json:"name" bson:"name"`
Hostname string `json:"hostname" bson:"hostname"`
IP string `json:"ip" bson:"ip"`
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"`
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"`
Session *Session `json:"-" bson:"-"`
ctx context.Context `json:"-" bson:"-"`
WindowsId string `json:"-" bson:"windows_id"`
}
type WindowsInstance struct {