forked from jetstack/kube-lego
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinterfaces.go
84 lines (75 loc) · 1.77 KB
/
interfaces.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
package kubelego
import (
"net"
"time"
"github.com/Sirupsen/logrus"
"k8s.io/apimachinery/pkg/util/intstr"
"k8s.io/client-go/kubernetes"
k8sApi "k8s.io/client-go/pkg/api/v1"
k8sExtensions "k8s.io/client-go/pkg/apis/extensions/v1beta1"
)
type KubeLego interface {
KubeClient() *kubernetes.Clientset
Log() *logrus.Entry
AcmeClient() Acme
LegoHTTPPort() intstr.IntOrString
LegoEmail() string
LegoURL() string
LegoNamespace() string
LegoWatchNamespace() string
LegoIngressNameNginx() string
LegoServiceNameNginx() string
LegoServiceNameGce() string
LegoDefaultIngressClass() string
LegoSupportedIngressClass() []string
LegoSupportedIngressProvider() []string
LegoCheckInterval() time.Duration
LegoMinimumValidity() time.Duration
LegoPodIP() net.IP
IngressProvider(string) (IngressProvider, error)
Version() string
AcmeUser() (map[string][]byte, error)
SaveAcmeUser(map[string][]byte) error
}
type Acme interface {
ObtainCertificate(domains []string) (map[string][]byte, error)
}
type Tls interface {
Hosts() []string
SecretMetadata() *k8sApi.ObjectMeta
IngressMetadata() *k8sApi.ObjectMeta
Process() error
}
type Service interface {
Object() *k8sApi.Service
SetKubeLegoSpec()
SetEndpoints([]string) error
Save() error
Delete() error
}
type Secret interface {
Object() *k8sApi.Secret
KubeLego() KubeLego
Exists() bool
Save() error
TlsDomains() ([]string, error)
TlsDomainsInclude(domains []string) bool
TlsExpireTime() (time.Time, error)
}
type Ingress interface {
Object() *k8sExtensions.Ingress
KubeLego() KubeLego
Log() *logrus.Entry
Save() error
Delete() error
IngressClass() string
IngressProvider() string
Tls() []Tls
Ignore() bool
}
type IngressProvider interface {
Log() *logrus.Entry
Process(Ingress) error
Reset() error
Finalize() error
}