@@ -20,78 +20,78 @@ import (
20
20
"sigs.k8s.io/kubebuilder/v3/pkg/model/resource"
21
21
)
22
22
23
- // Config defines the interface that project configuration types must follow
23
+ // Config defines the interface that project configuration types must follow.
24
24
type Config interface {
25
25
/* Version */
26
26
27
- // GetVersion returns the current project version
27
+ // GetVersion returns the current project version.
28
28
GetVersion () Version
29
29
30
30
/* String fields */
31
31
32
- // GetDomain returns the project domain
32
+ // GetDomain returns the project domain.
33
33
GetDomain () string
34
- // SetDomain sets the project domain
34
+ // SetDomain sets the project domain.
35
35
SetDomain (domain string ) error
36
36
37
37
// GetRepository returns the project repository.
38
38
GetRepository () string
39
- // SetRepository sets the project repository
39
+ // SetRepository sets the project repository.
40
40
SetRepository (repository string ) error
41
41
42
- // GetProjectName returns the project name
42
+ // GetProjectName returns the project name.
43
43
// This method was introduced in project version 3.
44
44
GetProjectName () string
45
- // SetProjectName sets the project name
45
+ // SetProjectName sets the project name.
46
46
// This method was introduced in project version 3.
47
47
SetProjectName (name string ) error
48
48
49
- // GetLayout returns the config layout
49
+ // GetPluginChain returns the plugin chain.
50
50
// This method was introduced in project version 3.
51
- GetLayout () string
52
- // SetLayout sets the Config layout
51
+ GetPluginChain () [] string
52
+ // SetPluginChain sets the plugin chain.
53
53
// This method was introduced in project version 3.
54
- SetLayout ( layout string ) error
54
+ SetPluginChain ( pluginChain [] string ) error
55
55
56
56
/* Boolean fields */
57
57
58
- // IsMultiGroup checks if multi-group is enabled
58
+ // IsMultiGroup checks if multi-group is enabled.
59
59
IsMultiGroup () bool
60
- // SetMultiGroup enables multi-group
60
+ // SetMultiGroup enables multi-group.
61
61
SetMultiGroup () error
62
- // ClearMultiGroup disables multi-group
62
+ // ClearMultiGroup disables multi-group.
63
63
ClearMultiGroup () error
64
64
65
- // IsComponentConfig checks if component config is enabled
65
+ // IsComponentConfig checks if component config is enabled.
66
66
// This method was introduced in project version 3.
67
67
IsComponentConfig () bool
68
- // SetComponentConfig enables component config
68
+ // SetComponentConfig enables component config.
69
69
// This method was introduced in project version 3.
70
70
SetComponentConfig () error
71
- // ClearComponentConfig disables component config
71
+ // ClearComponentConfig disables component config.
72
72
// This method was introduced in project version 3.
73
73
ClearComponentConfig () error
74
74
75
75
/* Resources */
76
76
77
- // ResourcesLength returns the number of tracked resources
77
+ // ResourcesLength returns the number of tracked resources.
78
78
ResourcesLength () int
79
- // HasResource checks if the provided GVK is stored in the Config
79
+ // HasResource checks if the provided GVK is stored in the Config.
80
80
HasResource (gvk resource.GVK ) bool
81
- // GetResource returns the stored resource matching the provided GVK
81
+ // GetResource returns the stored resource matching the provided GVK.
82
82
GetResource (gvk resource.GVK ) (resource.Resource , error )
83
- // GetResources returns all the stored resources
83
+ // GetResources returns all the stored resources.
84
84
GetResources () ([]resource.Resource , error )
85
- // AddResource adds the provided resource if it was not present, no-op if it was already present
85
+ // AddResource adds the provided resource if it was not present, no-op if it was already present.
86
86
AddResource (res resource.Resource ) error
87
- // UpdateResource adds the provided resource if it was not present, modifies it if it was already present
87
+ // UpdateResource adds the provided resource if it was not present, modifies it if it was already present.
88
88
UpdateResource (res resource.Resource ) error
89
89
90
- // HasGroup checks if the provided group is the same as any of the tracked resources
90
+ // HasGroup checks if the provided group is the same as any of the tracked resources.
91
91
HasGroup (group string ) bool
92
- // ListCRDVersions returns a list of the CRD versions in use by the tracked resources
92
+ // ListCRDVersions returns a list of the CRD versions in use by the tracked resources.
93
93
ListCRDVersions () []string
94
- // ListWebhookVersions returns a list of the webhook versions in use by the tracked resources
94
+ // ListWebhookVersions returns a list of the webhook versions in use by the tracked resources.
95
95
ListWebhookVersions () []string
96
96
97
97
/* Plugins */
@@ -105,8 +105,8 @@ type Config interface {
105
105
106
106
/* Persistence */
107
107
108
- // Marshal returns the YAML representation of the Config
109
- Marshal () ([]byte , error )
110
- // Unmarshal loads the Config fields from its YAML representation
111
- Unmarshal ([]byte ) error
108
+ // Marshal returns the YAML representation of the Config.
109
+ MarshalYAML () ([]byte , error )
110
+ // Unmarshal loads the Config fields from its YAML representation.
111
+ UnmarshalYAML ([]byte ) error
112
112
}
0 commit comments