-
Notifications
You must be signed in to change notification settings - Fork 88
/
fabrictraefik.go
55 lines (49 loc) · 2.36 KB
/
fabrictraefik.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
/*
* Copyright Kungfusoftware.es. All Rights Reserved.
*
* SPDX-License-Identifier: Apache-2.0
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1
// FabricTraefikApplyConfiguration represents an declarative configuration of the FabricTraefik type for use
// with apply.
type FabricTraefikApplyConfiguration struct {
Entrypoints []string `json:"entryPoints,omitempty"`
Middlewares []FabricTraefikMiddlewareApplyConfiguration `json:"middlewares,omitempty"`
Hosts []string `json:"hosts,omitempty"`
}
// FabricTraefikApplyConfiguration constructs an declarative configuration of the FabricTraefik type for use with
// apply.
func FabricTraefik() *FabricTraefikApplyConfiguration {
return &FabricTraefikApplyConfiguration{}
}
// WithEntrypoints adds the given value to the Entrypoints field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Entrypoints field.
func (b *FabricTraefikApplyConfiguration) WithEntrypoints(values ...string) *FabricTraefikApplyConfiguration {
for i := range values {
b.Entrypoints = append(b.Entrypoints, values[i])
}
return b
}
// WithMiddlewares adds the given value to the Middlewares field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Middlewares field.
func (b *FabricTraefikApplyConfiguration) WithMiddlewares(values ...*FabricTraefikMiddlewareApplyConfiguration) *FabricTraefikApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithMiddlewares")
}
b.Middlewares = append(b.Middlewares, *values[i])
}
return b
}
// WithHosts adds the given value to the Hosts field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Hosts field.
func (b *FabricTraefikApplyConfiguration) WithHosts(values ...string) *FabricTraefikApplyConfiguration {
for i := range values {
b.Hosts = append(b.Hosts, values[i])
}
return b
}