forked from weaveworks/weave-gitops
-
Notifications
You must be signed in to change notification settings - Fork 0
/
options_for_global.go
192 lines (149 loc) · 3.95 KB
/
options_for_global.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
package fluxexec
import "time"
type AsOption struct {
as string
}
// As represents the --as flag.
func As(as string) *AsOption {
return &AsOption{as}
}
type AsGroupOption struct {
asGroup []string
}
// AsGroup represents the --as-group flag.
func AsGroup(asGroup ...string) *AsGroupOption {
return &AsGroupOption{asGroup}
}
type AsUIDOption struct {
asUID string
}
// AsUID represents the --as-uid flag.
func AsUID(asUID string) *AsUIDOption {
return &AsUIDOption{asUID}
}
type CacheDirOption struct {
cacheDir string
}
// CacheDir represents the --cache-dir flag.
func CacheDir(cacheDir string) *CacheDirOption {
return &CacheDirOption{cacheDir}
}
type CertificateAuthorityOption struct {
certificateAuthority string
}
// CertificateAuthority represents the --certificate-authority flag.
func CertificateAuthority(certificateAuthority string) *CertificateAuthorityOption {
return &CertificateAuthorityOption{certificateAuthority}
}
type ClientCertificateOption struct {
clientCertificate string
}
// ClientCertificate represents the --client-certificate flag.
func ClientCertificate(clientCertificate string) *ClientCertificateOption {
return &ClientCertificateOption{clientCertificate}
}
type ClientKeyOption struct {
clientKey string
}
// ClientKey represents the --client-key flag.
func ClientKey(clientKey string) *ClientKeyOption {
return &ClientKeyOption{clientKey}
}
type ClusterOption struct {
cluster string
}
// Cluster represents the --cluster flag.
func Cluster(cluster string) *ClusterOption {
return &ClusterOption{cluster}
}
type ContextOption struct {
context string
}
// KubeContext represents the --context flag.
func KubeContext(context string) *ContextOption {
return &ContextOption{context}
}
type InsecureSkipTLSVerifyOption struct {
insecureSkipTLSVerify bool
}
// InsecureSkipTLSVerify represents the --insecure-skip-tls-verify flag.
func InsecureSkipTLSVerify(insecureSkipTLSVerify bool) *InsecureSkipTLSVerifyOption {
return &InsecureSkipTLSVerifyOption{insecureSkipTLSVerify}
}
type KubeAPIBurstOption struct {
kubeAPIBurst int
}
// KubeAPIBurst represents the --kube-api-burst flag.
func KubeAPIBurst(kubeAPIBurst int) *KubeAPIBurstOption {
return &KubeAPIBurstOption{kubeAPIBurst}
}
type KubeAPIQPSOption struct {
kubeAPIQPS float32
}
// KubeAPIQPS represents the --kube-api-qps flag.
func KubeAPIQPS(kubeAPIQPS float32) *KubeAPIQPSOption {
return &KubeAPIQPSOption{kubeAPIQPS}
}
type KubeconfigOption struct {
kubeconfig string
}
// Kubeconfig represents the --kubeconfig flag.
func Kubeconfig(kubeconfig string) *KubeconfigOption {
return &KubeconfigOption{kubeconfig}
}
type NamespaceOption struct {
namespace string
}
// Namespace represents the --namespace flag.
func Namespace(namespace string) *NamespaceOption {
return &NamespaceOption{namespace}
}
type ServerOption struct {
server string
}
// Server represents the --server flag.
func Server(server string) *ServerOption {
return &ServerOption{server}
}
type TimeoutOption struct {
timeout time.Duration
}
// Timeout represents the --timeout flag.
func Timeout(timeout time.Duration) *TimeoutOption {
return &TimeoutOption{timeout}
}
type TLSServerNameOption struct {
tlsServerName string
}
// TLSServerName represents the --tls-server-name flag.
func TLSServerName(tlsServerName string) *TLSServerNameOption {
return &TLSServerNameOption{tlsServerName}
}
type TokenOption struct {
token string
}
// Token represents the --token flag.
func Token(token string) *TokenOption {
return &TokenOption{token}
}
type UserOption struct {
user string
}
// User represents the --user flag.
func User(user string) *UserOption {
return &UserOption{user}
}
type VerboseOption struct {
verbose bool
}
// Verbose represents the --verbose flag.
func Verbose(verbose bool) *VerboseOption {
return &VerboseOption{verbose}
}
type VersionOption struct {
version string
}
// Version represents the --version flag.
func Version(version string) *VersionOption {
return &VersionOption{version}
}