ssl

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateSSL

func GenerateSSL(domain string) error

func GetPrivateKey

func GetPrivateKey(priKey crypto.PrivateKey) []byte

Types

type AcmeClient

type AcmeClient struct {
	Config *lego.Config
	Client *lego.Client
	User   *AcmeUser
}

func NewAcmeClient

func NewAcmeClient(email, privateKey string) (*AcmeClient, error)

func NewPrivateKeyClient

func NewPrivateKeyClient(email string, privateKey string) (*AcmeClient, error)

func NewRegisterClient

func NewRegisterClient(email string) (*AcmeClient, error)

func (*AcmeClient) GetDNSResolve

func (c *AcmeClient) GetDNSResolve(domains []string) (map[string]Resolve, error)

func (*AcmeClient) ObtainSSL

func (c *AcmeClient) ObtainSSL(domains []string) (certificate.Resource, error)

func (*AcmeClient) RenewSSL

func (c *AcmeClient) RenewSSL(certUrl string) (certificate.Resource, error)

func (*AcmeClient) UseDns

func (c *AcmeClient) UseDns(dnsType DnsType, params string) error

func (*AcmeClient) UseHTTP

func (c *AcmeClient) UseHTTP(path string) error

func (*AcmeClient) UseManualDns

func (c *AcmeClient) UseManualDns() error

type AcmeUser

type AcmeUser struct {
	Email        string
	Registration *registration.Resource
	Key          crypto.PrivateKey
}

func (*AcmeUser) GetEmail

func (u *AcmeUser) GetEmail() string

func (*AcmeUser) GetPrivateKey

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

func (*AcmeUser) GetRegistration

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

type DNSParam

type DNSParam struct {
	ID        string `json:"id"`
	Token     string `json:"token"`
	AccessKey string `json:"accessKey"`
	SecretKey string `json:"secretKey"`
	Email     string `json:"email"`
	APIkey    string `json:"APIkey"`
}

type DnsType

type DnsType string
const (
	DnsPod     DnsType = "DnsPod"
	AliYun     DnsType = "AliYun"
	CloudFlare DnsType = "CloudFlare"
)

type Resolve

type Resolve struct {
	Key   string
	Value string
	Err   string
}

Jump to

Keyboard shortcuts

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