Skip to content
This repository was archived by the owner on May 14, 2022. It is now read-only.

Commit 2ce2299

Browse files
committed
feat: add context class, process project definition file
1 parent ad306be commit 2ce2299

1 file changed

Lines changed: 57 additions & 1 deletion

File tree

project.go

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,63 @@
11
package pluginlib
22

3+
type DomainExpose struct {
4+
InternalPort int `yaml:"internal_port"`
5+
ExternalPort int `yaml:"external_port"`
6+
Service string
7+
ProxyWebsocketLocations []string `yaml:"proxy_websocket_locations,omitempty"`
8+
}
9+
10+
type DomainSecurityAuthentication struct {
11+
Type string
12+
Username string
13+
Password string
14+
}
15+
16+
type DomainSecurity struct {
17+
Authentication []DomainSecurityAuthentication `yaml:"authentication,omitempty"`
18+
}
19+
20+
type Domains struct {
21+
Domain string
22+
Expose []DomainExpose
23+
Security DomainSecurity `yaml:"security,omitempty"`
24+
}
25+
26+
type Registries struct {
27+
Username string
28+
Password string
29+
Url string `yaml:"url,omitempty"`
30+
}
31+
32+
type Container struct {
33+
Registries []Registries
34+
Services []ContainerService
35+
}
36+
37+
type ContainerService struct {
38+
Name string
39+
image string
40+
Volumes []ContainerServiceVolume `yaml:"volumes,omitempty"`
41+
Hooks ContainerServiceHooks `yaml:"hooks,omitempty"`
42+
VolumesFrom string `yaml:"volumes_from,omitempty"`
43+
Environment map[string]string `yaml:"environment,omitempty"`
44+
}
45+
46+
type ContainerServiceHooks struct {
47+
ExecuteAfterSetup string `yaml:"execute_after_setup"`
48+
ExecuteBeforeDestroy string `yaml:"execute_before_destroy"`
49+
}
50+
51+
type ContainerServiceVolume struct {
52+
Type string
53+
Src string
54+
Dest string
55+
}
56+
357
type Project struct {
4-
Name string
58+
Name string
59+
Domains []Domains
60+
Container Container
561
}
662

763
func GetProject() *Project {

0 commit comments

Comments
 (0)