123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- package model
-
- import (
- "github.com/xenolf/lego/certcrypto"
- "time"
- )
-
- // CertActions define what will be done with a certificate
- type CertActions uint8
-
- // constants defining CertActions
- const (
- // COMBINE the full chain and private key into one file
- COMBINE CertActions = 1 << iota
- // FLATTEN the directory structure so all files are in one dir
- FLATTEN
- // CHMOD the files so they are world readable (potentially dangerous!)
- CHMOD
- )
-
- // Container models a docker container that is running on the system.
- type Container struct {
- Id string
- Name string
- Labels map[string]string
- }
-
- // LabelConfig describes the labels used for various properties.
- type LabelConfig struct {
- Hostnames string
- RequireAuth string
- }
-
- // AcmeConfig describes the configuration to use for getting certs using ACME.
- type AcmeConfig struct {
- Email string
- DnsProvider string
- Endpoint string
- KeyType certcrypto.KeyType
- CacheLocation string
- }
-
- // Hostname describes a DNS name used for proxying, retrieving certificates, etc.
- type Hostname struct {
- Name string
- Alternatives map[string]bool
- Containers []*Container
- CertActions CertActions
- CertDestination string
- RequiresAuth bool
- AuthGroup string
- }
-
- // Config is the user-definable configuration for Dotege.
- type Config struct {
- Templates []TemplateConfig
- Signals []ContainerSignal
- Labels LabelConfig
- DefaultCertActions CertActions
- DefaultCertDestination string
- Acme AcmeConfig
- }
-
- // TemplateConfig configures a single template for the generator.
- type TemplateConfig struct {
- Source string
- Destination string
- }
-
- // ContainerSignal describes a container that should be sent a signal when the config/certs change.
- type ContainerSignal struct {
- Name string
- Signal string
- }
-
- // FoundCertificate describes a certificate we've located on disk.
- type FoundCertificate struct {
- Hostname string
- Cert string
- Chain string
- FullChain string
- PrivateKey string
- ModTime time.Time
- }
|