config

package
v0.0.0-...-1465e64 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DnsProviderTypeCloudflare   string = "cloudflare"
	DnsProviderTypeTencentCloud string = "tencentcloud"
	HttpProviderTypeS3          string = "s3"
	HttpProviderTypeLocal       string = "local"
)
View Source
const (
	ChallengeTypeDns01  string = "dns"
	ChallengeTypeHttp01 string = "http"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ACMEConfig

type ACMEConfig struct {
	ChallengeType  string   `toml:"challengeType" json:"challenge_type,omitempty"`
	Email          string   `toml:"email" json:"email,omitempty"`
	Provider       string   `toml:"provider" json:"provider,omitempty"`
	RetryCount     int      `toml:"retryCount" json:"retry_count,omitempty"`
	CertLifeTime   string   `toml:"certLifeTime" json:"cert_life_time,omitempty"`
	RenewTimeLeft  string   `toml:"renewTimeLeft" json:"renew_time_left,omitempty"`
	AllowedDomains []string `toml:"allowedDomains" json:"allowed_domains,omitempty"`

	CertLifeTimeDuration  time.Duration `toml:"-" json:"-"`
	RenewTimeLeftDuration time.Duration `toml:"-" json:"-"`
}

func (*ACMEConfig) Validate

func (c *ACMEConfig) Validate() error

type ClientCertification

type ClientCertification struct {
	Name          string   `toml:"name" json:"name,omitempty"`
	SavePath      string   `toml:"savePath" json:"save_path,omitempty"`
	Domains       []string `toml:"domains" json:"domains,omitempty"`
	ReloadCommand string   `toml:"reloadCommand" json:"reload_command,omitempty"`
}

func (*ClientCertification) GetFullChainAndKeyPath

func (c *ClientCertification) GetFullChainAndKeyPath() (fullchain, key string)

type ClientConfigT

type ClientConfigT struct {
	Server ClientServerConfig `toml:"Server" json:"server,omitempty"`

	Http struct {
		MainServer    ClientHttpServer `toml:"MainServer" json:"main_server,omitempty"`
		StandbyServer ClientHttpServer `toml:"StandbyServer" json:"standby_server,omitempty"`
	} `toml:"Http" json:"http,omitempty"`

	GRPC struct {
		MainServer    ClientGRPCServer `toml:"MainServer" json:"main_server,omitempty"`
		StandbyServer ClientGRPCServer `toml:"StandbyServer" json:"standby_server,omitempty"`
	} `toml:"GRPC" json:"GRPC,omitempty"`

	Certifications []ClientCertification `toml:"Certifications" json:"certifications,omitempty"`
}

func (*ClientConfigT) SetDefault

func (c *ClientConfigT) SetDefault()

type ClientGRPCServer

type ClientGRPCServer struct {
	Server      string `toml:"server" json:"server,omitempty"`
	CA          string `toml:"ca" json:"ca,omitempty"`
	Certificate string `toml:"certificate" json:"certificate,omitempty"`
	Key         string `toml:"key" json:"key,omitempty"`
}

type ClientHttpServer

type ClientHttpServer struct {
	Url   string `toml:"url" json:"url,omitempty"`
	Token string `toml:"token" json:"token,omitempty"`
}

type ClientServerConfig

type ClientServerConfig struct {
	RetryCount        int    `toml:"retryCount" json:"retry_count,omitempty"`
	Mode              string `toml:"mode" json:"mode,omitempty"`
	ReconnectInterval string `toml:"reconnectInterval" json:"reconnect_interval,omitempty"`

	ReconnectDuration time.Duration `toml:"-" json:"-"`
}

type DnsProvider

type DnsProvider struct {
	Type                                  string `toml:"type" json:"type,omitempty"`
	DisableCompletePropagationRequirement bool   `toml:"disableCompletePropagationRequirement" json:"disable_complete_propagation_requirement,omitempty"`

	// cloudflare global
	Email  string `toml:"email" json:"email,omitempty"`
	APIKey string `toml:"apiKey" json:"api_key,omitempty"`

	// cloudflare zone
	AuthToken string `toml:"authToken" json:"auth_token,omitempty"`
	ZoneToken string `toml:"zoneToken" json:"zone_token,omitempty"`

	// tencentcloud
	SecretID  string `toml:"secretID" json:"secret_id,omitempty"`
	SecretKey string `toml:"secretKey" json:"secret_key,omitempty"`
}

func (*DnsProvider) Validate

func (p *DnsProvider) Validate() error

type GRPCServerConfig

type GRPCServerConfig struct {
	Enabled bool     `toml:"enabled" json:"enabled,omitempty"`
	Listen  string   `toml:"listen" json:"listen,omitempty"`
	Names   []string `toml:"names" json:"names,omitempty"`
}

func (*GRPCServerConfig) Validate

func (c *GRPCServerConfig) Validate() error

type GoogleCloudCredential

type GoogleCloudCredential map[string]string

type HttpProvider

type HttpProvider struct {
	Type string `toml:"type" json:"type,omitempty"`

	S3    *S3Client `toml:"S3" json:"s3,omitempty"`
	Local *string   `toml:"local" json:"local,omitempty"`
}

func (*HttpProvider) Validate

func (p *HttpProvider) Validate() error

type HttpServerConfig

type HttpServerConfig struct {
	Enabled bool     `toml:"enabled" json:"enabled,omitempty"`
	Listen  string   `toml:"listen" json:"listen,omitempty"`
	APIPath string   `toml:"apiPath" json:"api_path,omitempty"`
	Secure  bool     `toml:"secure" json:"secure,omitempty"`
	Names   []string `toml:"names" json:"names,omitempty"`
	Token   string   `toml:"token" json:"token,omitempty"`
}

func (*HttpServerConfig) Validate

func (c *HttpServerConfig) Validate() error

type S3Client

type S3Client struct {
	Region          string `toml:"region" json:"region,omitempty"`
	Bucket          string `toml:"bucket" json:"bucket,omitempty"`
	PartitionID     string `toml:"partitionId" json:"partition_id,omitempty"`
	URL             string `toml:"url" json:"url,omitempty"`
	AccessKeyId     string `toml:"accessKeyId" json:"access_key_id,omitempty"`
	AccessKeySecret string `toml:"accessKeySecret" json:"access_key_secret,omitempty"`
	SessionToken    string `toml:"sessionToken" json:"session_token,omitempty"`
}

type ServerConfigT

type ServerConfigT struct {
	ACME ACMEConfig `toml:"ACME" json:"acme,omitempty"`

	GoogleCloudCredential GoogleCloudCredential `toml:"GoogleCloudCredential" json:"google_cloud_credential,omitempty"`

	DnsProvider  *DnsProvider  `toml:"DnsProvider" json:"dns_provider,omitempty"`
	HttpProvider *HttpProvider `toml:"HttpProvider" json:"http_provider,omitempty"`

	HttpServer    HttpServerConfig `toml:"HttpServer" json:"http_server,omitempty"`
	GRPCSDSServer GRPCServerConfig `toml:"gRPCSDSServer" json:"grpc_sds_server,omitempty"`
}

func (*ServerConfigT) SetDefault

func (c *ServerConfigT) SetDefault()

func (*ServerConfigT) Validate

func (c *ServerConfigT) Validate() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL