Skip to content

Commit 5b7b800

Browse files
fixing lint errors
1 parent b8e1d98 commit 5b7b800

File tree

1 file changed

+35
-35
lines changed

1 file changed

+35
-35
lines changed

pkg/apis/configuration/v1/types.go

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ type PolicyReference struct {
116116

117117
// Upstream defines an upstream.
118118
type Upstream struct {
119-
//The name of the upstream. Must be a valid DNS label as defined in RFC 1035. For example, hello and upstream-123 are valid. The name must be unique among all upstreams of the resource.
119+
// The name of the upstream. Must be a valid DNS label as defined in RFC 1035. For example, hello and upstream-123 are valid. The name must be unique among all upstreams of the resource.
120120
Name string `json:"name"`
121121
// The name of a service. The service must belong to the same namespace as the resource. If the service doesn’t exist, NGINX will assume the service has zero endpoints and return a 502 response for requests for this upstream. For NGINX Plus only, services of type ExternalName are also supported (check the prerequisites ).
122122
Service string `json:"service"`
@@ -164,7 +164,7 @@ type Upstream struct {
164164
Queue *UpstreamQueue `json:"queue"`
165165
// The SessionCookie field configures session persistence which allows requests from the same client to be passed to the same upstream server. The information about the designated upstream server is passed in a session cookie generated by NGINX Plus.
166166
SessionCookie *SessionCookie `json:"sessionCookie"`
167-
//Enables using the Cluster IP and port of the service instead of the default behavior of using the IP and port of the pods. When this field is enabled, the fields that configure NGINX behavior related to multiple upstream servers (like lb-method and next-upstream) will have no effect, as NGINX Ingress Controller will configure NGINX with only one upstream server that will match the service Cluster IP.
167+
// Enables using the Cluster IP and port of the service instead of the default behavior of using the IP and port of the pods. When this field is enabled, the fields that configure NGINX behavior related to multiple upstream servers (like lb-method and next-upstream) will have no effect, as NGINX Ingress Controller will configure NGINX with only one upstream server that will match the service Cluster IP.
168168
UseClusterIP bool `json:"use-cluster-ip"`
169169
// Allows proxying requests with NTLM Authentication. See the ntlm directive. In order for NTLM authentication to work, it is necessary to enable keepalive connections to upstream servers using the keepalive field. Note: this feature is supported only in NGINX Plus.
170170
NTLM bool `json:"ntlm"`
@@ -179,9 +179,9 @@ type Upstream struct {
179179
// UpstreamBuffers defines Buffer Configuration for an Upstream.
180180
type UpstreamBuffers struct {
181181
// Configures the number of buffers. The default is set in the proxy-buffers ConfigMap key.
182-
Number int `json:"number"`
182+
Number int `json:"number"`
183183
// Configures the size of a buffer. The default is set in the proxy-buffers ConfigMap key.
184-
Size string `json:"size"`
184+
Size string `json:"size"`
185185
}
186186

187187
// UpstreamTLS defines a TLS configuration for an Upstream.
@@ -233,7 +233,7 @@ type HealthCheck struct {
233233
// Header defines an HTTP Header.
234234
type Header struct {
235235
// The name of the header.
236-
Name string `json:"name"`
236+
Name string `json:"name"`
237237
// The value of the header.
238238
Value string `json:"value"`
239239
}
@@ -304,7 +304,7 @@ type ActionRedirect struct {
304304
type ActionReturn struct {
305305
// The status code of the response. The allowed values are: 2XX, 4XX or 5XX. The default is 200.
306306
Code int `json:"code"`
307-
//The MIME type of the response. The default is text/plain.
307+
// The MIME type of the response. The default is text/plain.
308308
Type string `json:"type"`
309309
// The body of the response. Supports NGINX variables*. Variables must be enclosed in curly brackets. For example: Request is ${request_uri}\n.
310310
Body string `json:"body"`
@@ -524,13 +524,13 @@ type UpstreamQueue struct {
524524
// VirtualServerRouteStatus defines the status for the VirtualServerRoute resource.
525525
type VirtualServerRouteStatus struct {
526526
// Represents the current state of the resource. There are three possible values: Valid, Invalid and Warning. Valid indicates that the resource has been validated and accepted by the Ingress Controller. Invalid means the resource failed validation or NGINX
527-
State string `json:"state"`
527+
State string `json:"state"`
528528
// The reason of the current state of the resource.
529-
Reason string `json:"reason"`
529+
Reason string `json:"reason"`
530530
// The message of the current state of the resource. It can contain more detailed information about the reason.
531-
Message string `json:"message"`
531+
Message string `json:"message"`
532532
// Defines how other resources reference this resource.
533-
ReferencedBy string `json:"referencedBy"`
533+
ReferencedBy string `json:"referencedBy"`
534534
// Defines the IPs, hostnames and ports used to connect to this resource.
535535
ExternalEndpoints []ExternalEndpoint `json:"externalEndpoints,omitempty"`
536536
}
@@ -558,19 +558,19 @@ type GlobalConfigurationSpec struct {
558558
// Listener defines a listener.
559559
type Listener struct {
560560
// The name of the listener. The name must be unique across all listeners.
561-
Name string `json:"name"`
561+
Name string `json:"name"`
562562
// The protocol of the listener. For example, HTTP.
563563
Protocol string `json:"protocol"`
564564
// The port on which the listener will accept connections.
565-
Port int `json:"port"`
565+
Port int `json:"port"`
566566
// Custom SNI processing for listener. Allows listener to be used as a passthrough for SNI processing
567567
PassSNI bool `json:"passSNI"`
568568
// ipv4 and ipv6 addresses that NGINX will listen on. Defaults to listening on all available IPv4 and IPv6 addresses.
569-
IPv4 string `json:"ipv4"`
569+
IPv4 string `json:"ipv4"`
570570
// ipv6 addresses that NGINX will listen on.
571-
IPv6 string `json:"ipv6"`
571+
IPv6 string `json:"ipv6"`
572572
// Whether the listener will be listening for SSL connections
573-
Ssl bool `json:"ssl"`
573+
Ssl bool `json:"ssl"`
574574
}
575575

576576
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
@@ -599,31 +599,31 @@ type TransportServer struct {
599599
metav1.TypeMeta `json:",inline"`
600600
metav1.ObjectMeta `json:"metadata,omitempty"`
601601
// spec field of the TransportServer resource
602-
Spec TransportServerSpec `json:"spec"`
602+
Spec TransportServerSpec `json:"spec"`
603603
// status field of the TransportServer resource
604604
Status TransportServerStatus `json:"status"`
605605
}
606606

607607
// TransportServerSpec is the spec of the TransportServer resource.
608608
type TransportServerSpec struct {
609609
// Specifies which Ingress Controller must handle the VirtualServer resource.
610-
IngressClass string `json:"ingressClassName"`
610+
IngressClass string `json:"ingressClassName"`
611611
// The TLS termination configuration.
612-
TLS *TransportServerTLS `json:"tls"`
612+
TLS *TransportServerTLS `json:"tls"`
613613
// Sets a custom HTTP and/or HTTPS listener. Valid fields are listener.http and listener.https. Each field must reference the name of a valid listener defined in a GlobalConfiguration resource
614-
Listener TransportServerListener `json:"listener"`
614+
Listener TransportServerListener `json:"listener"`
615615
// Sets a custom snippet in server context. Overrides the server-snippets ConfigMap key.
616-
ServerSnippets string `json:"serverSnippets"`
616+
ServerSnippets string `json:"serverSnippets"`
617617
// Sets a custom snippet in the stream context. Overrides the stream-snippets ConfigMap key.
618-
StreamSnippets string `json:"streamSnippets"`
618+
StreamSnippets string `json:"streamSnippets"`
619619
// The host (domain name) of the server. Must be a valid subdomain as defined in RFC 1123, such as my-app or hello.example.com. When using a wildcard domain like *.example.com the domain must be contained in double quotes. The host value needs to be unique among all Ingress and VirtualServer resources. See also Handling Host and Listener Collisions.
620-
Host string `json:"host"`
620+
Host string `json:"host"`
621621
// A list of upstreams.
622-
Upstreams []TransportServerUpstream `json:"upstreams"`
622+
Upstreams []TransportServerUpstream `json:"upstreams"`
623623
// The UpstreamParameters are set on stream context
624-
UpstreamParameters *UpstreamParameters `json:"upstreamParameters"`
624+
UpstreamParameters *UpstreamParameters `json:"upstreamParameters"`
625625
// The parameters of the session to be used for the Server context
626-
SessionParameters *SessionParameters `json:"sessionParameters"`
626+
SessionParameters *SessionParameters `json:"sessionParameters"`
627627
// The action to perform for a request.
628628
Action *TransportServerAction `json:"action"`
629629
}
@@ -636,7 +636,7 @@ type TransportServerTLS struct {
636636
// TransportServerListener defines a listener for a TransportServer.
637637
type TransportServerListener struct {
638638
// The name of a listener defined in a GlobalConfiguration resource.
639-
Name string `json:"name"`
639+
Name string `json:"name"`
640640
// The protocol of the listener.
641641
Protocol string `json:"protocol"`
642642
}
@@ -724,9 +724,9 @@ type TransportServerAction struct {
724724
// TransportServerStatus defines the status for the TransportServer resource.
725725
type TransportServerStatus struct {
726726
// Represents the current state of the resource. There are three possible values: Valid, Invalid and Warning. Valid indicates that the resource has been validated and accepted by the Ingress Controller. Invalid means the resource failed validation or
727-
State string `json:"state"`
727+
State string `json:"state"`
728728
// The reason of the current state of the resource.
729-
Reason string `json:"reason"`
729+
Reason string `json:"reason"`
730730
// The message of the current state of the resource. It can contain more detailed information about the reason.
731731
Message string `json:"message"`
732732
}
@@ -755,17 +755,17 @@ type Policy struct {
755755
metav1.TypeMeta `json:",inline"`
756756
metav1.ObjectMeta `json:"metadata,omitempty"`
757757
// spec field of the Policy resource
758-
Spec PolicySpec `json:"spec"`
758+
Spec PolicySpec `json:"spec"`
759759
// status field of the Policy resource
760760
Status PolicyStatus `json:"status"`
761761
}
762762

763763
// PolicyStatus is the status of the policy resource
764764
type PolicyStatus struct {
765765
// Represents the current state of the resource. There are three possible values: Valid, Invalid and Warning. Valid indicates that the resource has been validated and accepted by the Ingress Controller. Invalid means the resource failed validation or
766-
State string `json:"state"`
766+
State string `json:"state"`
767767
// The reason of the current state of the resource.
768-
Reason string `json:"reason"`
768+
Reason string `json:"reason"`
769769
// The message of the current state of the resource. It can contain more detailed information about the reason.
770770
Message string `json:"message"`
771771
}
@@ -990,18 +990,18 @@ type SecurityLog struct {
990990
LogDest string `json:"logDest"`
991991
}
992992

993-
// The API Key policy configures NGINX to authorize requests which provide a valid API Key in a specified header or query param.
993+
// The APIKey policy configures NGINX to authorize requests which provide a valid API Key in a specified header or query param.
994994
type APIKey struct {
995995
// The location of the API Key. For example, $http_auth, $arg_apikey, $cookie_auth. Accepted variables are $http_, $arg_, $cookie_.
996-
SuppliedIn *SuppliedIn `json:"suppliedIn"`
996+
SuppliedIn *SuppliedIn `json:"suppliedIn"`
997997
// The key to which the API key is applied. Can contain text, variables, or a combination of them. Accepted variables are $http_, $arg_, $cookie_.
998-
ClientSecret string `json:"clientSecret"`
998+
ClientSecret string `json:"clientSecret"`
999999
}
10001000

10011001
// SuppliedIn defines the locations API Key should be supplied in.
10021002
type SuppliedIn struct {
10031003
// The location of the API Key as a request header. For example, $http_auth. Accepted variables are $http_.
10041004
Header []string `json:"header"`
10051005
// The location of the API Key as a query param. For example, $arg_apikey. Accepted variables are $arg_.
1006-
Query []string `json:"query"`
1006+
Query []string `json:"query"`
10071007
}

0 commit comments

Comments
 (0)