api

package
v0.13.3 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2019 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(acmeAuth acme.Interface) api.RouterHandler

New returns a new ACME API router.

Types

type FinalizeRequest

type FinalizeRequest struct {
	CSR string `json:"csr"`
	// contains filtered or unexported fields
}

FinalizeRequest captures the body for a Finalize order request.

func (*FinalizeRequest) Validate

func (f *FinalizeRequest) Validate() error

Validate validates a finalize request body.

type Handler

type Handler struct {
	Auth acme.Interface
}

Handler is the ACME request handler.

func (*Handler) FinalizeOrder

func (h *Handler) FinalizeOrder(w http.ResponseWriter, r *http.Request)

FinalizeOrder attemptst to finalize an order and create a certificate.

func (*Handler) GetAuthz

func (h *Handler) GetAuthz(w http.ResponseWriter, r *http.Request)

GetAuthz ACME api for retrieving an Authz.

func (*Handler) GetCertificate

func (h *Handler) GetCertificate(w http.ResponseWriter, r *http.Request)

GetCertificate ACME api for retrieving a Certificate.

func (*Handler) GetChallenge

func (h *Handler) GetChallenge(w http.ResponseWriter, r *http.Request)

GetChallenge ACME api for retrieving a Challenge.

func (*Handler) GetDirectory

func (h *Handler) GetDirectory(w http.ResponseWriter, r *http.Request)

GetDirectory is the ACME resource for returning a directory configuration for client configuration.

func (*Handler) GetNonce

func (h *Handler) GetNonce(w http.ResponseWriter, r *http.Request)

GetNonce just sets the right header since a Nonce is added to each response by middleware by default.

func (*Handler) GetOrder

func (h *Handler) GetOrder(w http.ResponseWriter, r *http.Request)

GetOrder ACME api for retrieving an order.

func (*Handler) GetOrdersByAccount

func (h *Handler) GetOrdersByAccount(w http.ResponseWriter, r *http.Request)

GetOrdersByAccount ACME api for retrieving the list of order urls belonging to an account.

func (*Handler) GetUpdateAccount

func (h *Handler) GetUpdateAccount(w http.ResponseWriter, r *http.Request)

GetUpdateAccount is the api for updating an ACME account.

func (*Handler) NewAccount

func (h *Handler) NewAccount(w http.ResponseWriter, r *http.Request)

NewAccount is the handler resource for creating new ACME accounts.

func (*Handler) NewOrder

func (h *Handler) NewOrder(w http.ResponseWriter, r *http.Request)

NewOrder ACME api for creating a new order.

func (*Handler) Route

func (h *Handler) Route(r api.Router)

Route traffic and implement the Router interface.

type NewAccountRequest

type NewAccountRequest struct {
	Contact              []string `json:"contact"`
	OnlyReturnExisting   bool     `json:"onlyReturnExisting"`
	TermsOfServiceAgreed bool     `json:"termsOfServiceAgreed"`
}

NewAccountRequest represents the payload for a new account request.

func (*NewAccountRequest) Validate

func (n *NewAccountRequest) Validate() error

Validate validates a new-account request body.

type NewOrderRequest

type NewOrderRequest struct {
	Identifiers []acme.Identifier `json:"identifiers"`
	NotBefore   time.Time         `json:"notBefore,omitempty"`
	NotAfter    time.Time         `json:"notAfter,omitempty"`
}

NewOrderRequest represents the body for a NewOrder request.

func (*NewOrderRequest) Validate

func (n *NewOrderRequest) Validate() error

Validate validates a new-order request body.

type UpdateAccountRequest

type UpdateAccountRequest struct {
	Contact []string `json:"contact"`
	Status  string   `json:"status"`
}

UpdateAccountRequest represents an update-account request.

func (*UpdateAccountRequest) IsDeactivateRequest

func (u *UpdateAccountRequest) IsDeactivateRequest() bool

IsDeactivateRequest returns true if the update request is a deactivation request, false otherwise.

func (*UpdateAccountRequest) Validate

func (u *UpdateAccountRequest) Validate() error

Validate validates a update-account request body.

Jump to

Keyboard shortcuts

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