acme

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2022 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultProviderCode = "letsencrypt"

Variables

This section is empty.

Functions

func ParsePrivateKeyFromBase64

func ParsePrivateKeyFromBase64(base64String string) (interface{}, error)

Types

type Account

type Account struct {
	EABKid string
	EABKey string
}

type AuthCallback

type AuthCallback func(domain, token, keyAuth string)

type AuthType

type AuthType = string
const (
	AuthTypeDNS  AuthType = "dns"
	AuthTypeHTTP AuthType = "http"
)

type DNSProvider

type DNSProvider struct {
	// contains filtered or unexported fields
}

func NewDNSProvider

func NewDNSProvider(raw dnsclients.ProviderInterface, dnsDomain string) *DNSProvider

func (*DNSProvider) CleanUp

func (this *DNSProvider) CleanUp(domain, token, keyAuth string) error

func (*DNSProvider) Present

func (this *DNSProvider) Present(domain, token, keyAuth string) error

type HTTPProvider

type HTTPProvider struct {
	// contains filtered or unexported fields
}

func NewHTTPProvider

func NewHTTPProvider(onAuth AuthCallback) *HTTPProvider

func (*HTTPProvider) CleanUp

func (this *HTTPProvider) CleanUp(domain, token, keyAuth string) error

func (*HTTPProvider) Present

func (this *HTTPProvider) Present(domain, token, keyAuth string) error

type Provider

type Provider struct {
	Name           string `json:"name"`
	Code           string `json:"code"`
	Description    string `json:"description"`
	APIURL         string `json:"apiURL"`
	RequireEAB     bool   `json:"requireEAB"`
	EABDescription string `json:"eabDescription"`
}

func FindAllProviders

func FindAllProviders() []*Provider

func FindProviderWithCode

func FindProviderWithCode(code string) *Provider

type Request

type Request struct {
	// contains filtered or unexported fields
}

func NewRequest

func NewRequest(task *Task) *Request

func (*Request) Debug

func (this *Request) Debug()

func (*Request) OnAuth

func (this *Request) OnAuth(onAuth AuthCallback)

func (*Request) Run

func (this *Request) Run() (certData []byte, keyData []byte, err error)

type Task

type Task struct {
	Provider *Provider
	Account  *Account
	User     *User
	AuthType AuthType
	Domains  []string

	// DNS相关
	DNSProvider dnsclients.ProviderInterface
	DNSDomain   string
}

type User

type User struct {
	// contains filtered or unexported fields
}

func NewUser

func NewUser(email string, key crypto.PrivateKey, registerFunc func(resource *registration.Resource) error) *User

func (*User) GetEmail

func (this *User) GetEmail() string

func (*User) GetPrivateKey

func (this *User) GetPrivateKey() crypto.PrivateKey

func (*User) GetRegistration

func (this *User) GetRegistration() *registration.Resource

func (*User) Register

func (this *User) Register(resource *registration.Resource) error

func (*User) SetRegistration

func (this *User) SetRegistration(resourceData []byte) error

Jump to

Keyboard shortcuts

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