cloudh

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2020 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetServers added in v0.0.3

func GetServers(token string, filter ServerFilter) ([]byte, error)

func WaitForIp added in v0.0.2

func WaitForIp() bool

Types

type AcmeUser added in v0.0.3

type AcmeUser struct {
	Email        string                 `json:"email,omitempty"`
	Registration *registration.Resource `json:"registration,omitempty"`
	// contains filtered or unexported fields
}

func (*AcmeUser) GetEmail added in v0.0.3

func (u *AcmeUser) GetEmail() string

func (*AcmeUser) GetPrivateKey added in v0.0.3

func (u *AcmeUser) GetPrivateKey() crypto.PrivateKey

func (AcmeUser) GetRegistration added in v0.0.3

func (u AcmeUser) GetRegistration() *registration.Resource

type AutoTls added in v0.0.3

type AutoTls struct {
	Config         TlsConfig
	Storage        TlsStorage
	AccountStorage TlsStorage
}

func (*AutoTls) Issue added in v0.0.4

func (at *AutoTls) Issue() error

Issue requests new cert.

func (*AutoTls) List added in v0.0.4

func (at *AutoTls) List() ([]TlsCert, error)

func (*AutoTls) Renew added in v0.0.4

func (at *AutoTls) Renew(reuseKey bool) error

type LabelSelector added in v0.0.3

type LabelSelector struct {
	MustLabels    map[string]string
	MustNotLabels map[string]string
}

LabelSelector https://docs.hetzner.cloud/#label-selector

func (*LabelSelector) String added in v0.0.3

func (ls *LabelSelector) String() string

type Meta added in v0.0.3

type Meta struct {
	Pagination `json:"pagination,omitempty"`
}

type Metadata

type Metadata struct {
	ID          string `json:"id,omitempty"`
	Hostname    string `json:"hostname,omitempty"`
	PrivateIpv4 string `json:"ip,omitempty"`
	PublicIpv4  string `json:"public_ip,omitempty"`
}

func GetMetadata

func GetMetadata() (*Metadata, error)

type Pagination added in v0.0.3

type Pagination struct {
	Page     int `json:"page,omitempty"`
	PerPage  int `json:"per_page,omitempty"`
	LastPage int `json:"last_page,omitempty"`
	Total    int `json:"total_entries,omitempty"`
}

type Server added in v0.0.3

type Server struct {
	Meta `json:"meta,omitempty"`
}

type ServerFilter added in v0.0.3

type ServerFilter struct {
	ByLabel        LabelSelector
	ExpectedAmount int
}

type ServerMetadata

type ServerMetadata struct {
	Hostname   string `yaml:"hostname"`
	PublicIpv4 string `yaml:"public-ipv4"`
	InstanceID string `yaml:"instance-id"`
}

type ServerMetadataPrivateNetwork

type ServerMetadataPrivateNetwork struct {
	Ip           string   `yaml:"ip"`
	AliasIps     []string `yaml:"alias_ips"`
	InterfaceNum int      `yaml:"interface_num"`
	MacAddress   string   `yaml:"mac_address"`
	NetworkID    string   `yaml:"network_id"`
	NetworkName  string   `yaml:"network_name"`
	Network      string   `yaml:"network"`
	Subnet       string   `yaml:"subnet"`
	Gateway      string   `yaml:"gateway"`
}

type ServerMetadataPrivateNetworks

type ServerMetadataPrivateNetworks = []ServerMetadataPrivateNetwork

type TlsCert added in v0.0.3

type TlsCert struct {
	CommonName string
	DNS        []string
	Expiry     time.Time
	Path       string
}

type TlsConfig added in v0.0.4

type TlsConfig struct {
	DnsToken          string
	Email             string
	AccountPathPrefix string
	CertPathPrefix    string
	Domains           []string
	Debug             bool
}

type TlsConsulStorage added in v0.0.5

type TlsConsulStorage struct {
	KV *consulapi.KV
}

func (*TlsConsulStorage) Exists added in v0.0.5

func (fs *TlsConsulStorage) Exists(ctx context.Context, key string) (bool, error)

func (*TlsConsulStorage) Find added in v0.0.5

func (fs *TlsConsulStorage) Find(ctx context.Context, key string, ext string) ([]string, error)

func (*TlsConsulStorage) Read added in v0.0.5

func (fs *TlsConsulStorage) Read(ctx context.Context, key string) ([]byte, error)

func (*TlsConsulStorage) Write added in v0.0.5

func (fs *TlsConsulStorage) Write(ctx context.Context, key string, b []byte) error

type TlsFileStorage added in v0.0.4

type TlsFileStorage struct{}

func (*TlsFileStorage) Exists added in v0.0.4

func (fs *TlsFileStorage) Exists(ctx context.Context, key string) (bool, error)

func (*TlsFileStorage) Find added in v0.0.4

func (fs *TlsFileStorage) Find(ctx context.Context, key string, ext string) ([]string, error)

func (*TlsFileStorage) Read added in v0.0.4

func (fs *TlsFileStorage) Read(ctx context.Context, key string) ([]byte, error)

func (*TlsFileStorage) Write added in v0.0.4

func (fs *TlsFileStorage) Write(ctx context.Context, key string, b []byte) error

type TlsNullStorage added in v0.0.5

type TlsNullStorage struct{}

func (*TlsNullStorage) Exists added in v0.0.5

func (fs *TlsNullStorage) Exists(ctx context.Context, key string) (bool, error)

func (*TlsNullStorage) Find added in v0.0.5

func (fs *TlsNullStorage) Find(ctx context.Context, key string, ext string) ([]string, error)

func (*TlsNullStorage) Read added in v0.0.5

func (fs *TlsNullStorage) Read(ctx context.Context, key string) ([]byte, error)

func (*TlsNullStorage) Write added in v0.0.5

func (fs *TlsNullStorage) Write(ctx context.Context, key string, b []byte) error

type TlsStorage added in v0.0.3

type TlsStorage interface {
	Exists(ctx context.Context, key string) (bool, error)
	Write(ctx context.Context, key string, b []byte) error
	Read(ctx context.Context, key string) ([]byte, error)
	Find(ctx context.Context, key string, ext string) ([]string, error)
}

func TlsStorageById added in v0.0.5

func TlsStorageById(id string) TlsStorage

type TlsVaultStorage added in v0.0.5

type TlsVaultStorage struct{}

func (*TlsVaultStorage) Exists added in v0.0.5

func (fs *TlsVaultStorage) Exists(ctx context.Context, key string) (bool, error)

func (*TlsVaultStorage) Find added in v0.0.5

func (fs *TlsVaultStorage) Find(ctx context.Context, key string, ext string) ([]string, error)

func (*TlsVaultStorage) Read added in v0.0.5

func (fs *TlsVaultStorage) Read(ctx context.Context, key string) ([]byte, error)

func (*TlsVaultStorage) Write added in v0.0.5

func (fs *TlsVaultStorage) Write(ctx context.Context, key string, b []byte) error

Jump to

Keyboard shortcuts

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