forked from mongodb/terraform-provider-mongodbatlas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config_model.go
48 lines (40 loc) · 1.21 KB
/
config_model.go
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
47
48
package config
type Config struct {
Resources map[string]Resource `yaml:"resources"`
}
type Resource struct {
Create *APIOperation `yaml:"create"`
Read *APIOperation `yaml:"read"`
Update *APIOperation `yaml:"update"`
Delete *APIOperation `yaml:"delete"`
SchemaOptions SchemaOptions `yaml:"schema"`
}
type APIOperation struct {
Path string `yaml:"path"`
Method string `yaml:"method"`
}
type SchemaOptions struct {
Ignores []string `yaml:"ignores"`
Aliases map[string]string `yaml:"aliases"`
Overrides map[string]Override `yaml:"overrides"`
Timeouts []string `yaml:"timeouts"`
}
type Override struct {
Computability *Computability `yaml:"computability,omitempty"`
Description string `yaml:"description"`
PlanModifiers []PlanModifier `yaml:"plan_modifiers"`
Validators []Validator `yaml:"validators"`
}
type PlanModifier struct {
Definition string `yaml:"definition"`
Imports []string `yaml:"imports"`
}
type Validator struct {
Definition string `yaml:"definition"`
Imports []string `yaml:"imports"`
}
type Computability struct {
Optional bool `yaml:"optional"`
Computed bool `yaml:"computed"`
Required bool `yaml:"required"`
}