Documentation ¶
Index ¶
- Constants
- Variables
- func GenerateID() (uint64, error)
- func GenerateToken() (string, error)
- type AccountRequest
- type ErrorResponse
- type KeyChangeRequest
- type KeyChangeResponse
- type NewAccountRequest
- type NewKeyPayload
- type NewOrderRequest
- type OrderFinalizeRequest
- type Params
- type RestService
- func (s *RestService) AccountHandler(w http.ResponseWriter, r *http.Request)
- func (s *RestService) AuthorizationHandler(w http.ResponseWriter, r *http.Request)
- func (s *RestService) CABundleHandler(w http.ResponseWriter, r *http.Request)
- func (s *RestService) CertificateHandler(w http.ResponseWriter, r *http.Request)
- func (s *RestService) ChallengeHandler(w http.ResponseWriter, r *http.Request)
- func (s *RestService) DirectoryHandler(w http.ResponseWriter, r *http.Request)
- func (s *RestService) KeyChangeHandler(w http.ResponseWriter, r *http.Request)
- func (s *RestService) NewAccountHandler(w http.ResponseWriter, r *http.Request)
- func (s *RestService) NewNonceHandler(w http.ResponseWriter, r *http.Request)
- func (s *RestService) NewOrderHandler(w http.ResponseWriter, r *http.Request)
- func (s *RestService) OrderFinalizeHandler(w http.ResponseWriter, r *http.Request)
- func (s *RestService) OrderHandler(w http.ResponseWriter, r *http.Request)
- func (s *RestService) OrdersListHandler(w http.ResponseWriter, r *http.Request)
- func (s *RestService) RevokeCertHandler(w http.ResponseWriter, r *http.Request)
- type RestServicer
- type RevokeCertRequest
Constants ¶
View Source
const ( RevocationReasonUnspecified = 0 // Unspecified reason for revocation RevocationReasonKeyCompromise = 1 // The key associated with the certificate has been compromised RevocationReasonCACertCompromise = 2 // The issuing CA certificate has been compromised RevocationReasonAffiliationChanged = 3 // The entity's affiliation with the domain has changed RevocationReasonSuperseded = 4 // The certificate has been superseded by another certificate RevocationReasonCessationOfOperation = 5 // The entity has ceased its operations (e.g., the domain is no longer used) RevocationReasonCertificateHold = 6 // The certificate is placed on hold (temporary revocation) )
Revocation statuses (for /revoke-cert)
Variables ¶
View Source
var (
ErrKIDAndJWKNotAllowed = errors.New("both kid and jwk not allowed in JWS header")
)
Functions ¶
func GenerateID ¶
func GenerateToken ¶
Types ¶
type AccountRequest ¶
type AccountRequest struct { Status string `json:"status,omitempty"` Contact []string `json:"contact,omitempty"` }
AccountRequest represents the structure of the incoming account update/deactivation request body.
type ErrorResponse ¶
ErrorResponse represents an error response for the API.
type KeyChangeRequest ¶
type KeyChangeRequest struct { AccountURL string `json:"account"` // The account URL OldKey keystore.KeyMap `json:"oldKey"` // The old key in JWK format }
KeyChangeRequest represents the key change request body.
type KeyChangeResponse ¶
type KeyChangeResponse struct {
Message string `json:"message"`
}
KeyChangeResponse represents the successful key change response.
type NewAccountRequest ¶
type NewAccountRequest struct { Contact []string `yaml:"contact" json:"contact,omitempty"` TermsOfServiceAgreed bool `yaml:"termsOfServiceAgreed" json:"termsOfServiceAgreed,omitempty"` OnlyReturnExisting bool `yaml:"onlyReturnExisting" json:"onlyReturnExisting,omitempty"` ExternalAccountBinding interface{} `yaml:"externalAccountBinding" json:"externalAccountBinding,omitempty"` }
type NewKeyPayload ¶
type NewKeyPayload struct {
JWK string `json:"jwk"`
}
type NewOrderRequest ¶
type NewOrderRequest struct { Identifiers []entities.ACMEIdentifier `yaml:"identifiers" json:"identifiers"` NotBefore string `yaml:"not-before" json:"notBefore,omitempty"` NotAfter string `yaml:"not-after" json:"notAfter,omitempty"` }
type OrderFinalizeRequest ¶
type OrderFinalizeRequest struct {
CSR string `json:"csr"`
}
type RestService ¶
type RestService struct { RestServicer // contains filtered or unexported fields }
func (*RestService) AccountHandler ¶
func (s *RestService) AccountHandler(w http.ResponseWriter, r *http.Request)
func (*RestService) AuthorizationHandler ¶
func (s *RestService) AuthorizationHandler(w http.ResponseWriter, r *http.Request)
func (*RestService) CABundleHandler ¶
func (s *RestService) CABundleHandler(w http.ResponseWriter, r *http.Request)
func (*RestService) CertificateHandler ¶
func (s *RestService) CertificateHandler(w http.ResponseWriter, r *http.Request)
func (*RestService) ChallengeHandler ¶
func (s *RestService) ChallengeHandler(w http.ResponseWriter, r *http.Request)
func (*RestService) DirectoryHandler ¶
func (s *RestService) DirectoryHandler(w http.ResponseWriter, r *http.Request)
DirectoryHandler responds to /acme/directory requests.
func (*RestService) KeyChangeHandler ¶
func (s *RestService) KeyChangeHandler(w http.ResponseWriter, r *http.Request)
KeyChangeHandler handles key-change requests according to RFC 8555 Section 7.3.5 Account Key Rollover.
func (*RestService) NewAccountHandler ¶
func (s *RestService) NewAccountHandler(w http.ResponseWriter, r *http.Request)
func (*RestService) NewNonceHandler ¶
func (s *RestService) NewNonceHandler(w http.ResponseWriter, r *http.Request)
func (*RestService) NewOrderHandler ¶
func (s *RestService) NewOrderHandler(w http.ResponseWriter, r *http.Request)
func (*RestService) OrderFinalizeHandler ¶
func (s *RestService) OrderFinalizeHandler(w http.ResponseWriter, r *http.Request)
func (*RestService) OrderHandler ¶
func (s *RestService) OrderHandler(w http.ResponseWriter, r *http.Request)
func (*RestService) OrdersListHandler ¶
func (s *RestService) OrdersListHandler(w http.ResponseWriter, r *http.Request)
func (*RestService) RevokeCertHandler ¶
func (s *RestService) RevokeCertHandler(w http.ResponseWriter, r *http.Request)
type RestServicer ¶
type RestServicer interface { AccountHandler(w http.ResponseWriter, r *http.Request) AuthorizationHandler(w http.ResponseWriter, r *http.Request) CertificateHandler(w http.ResponseWriter, r *http.Request) ChallengeHandler(w http.ResponseWriter, r *http.Request) DirectoryHandler(w http.ResponseWriter, r *http.Request) NewAccountHandler(w http.ResponseWriter, r *http.Request) NewNonceHandler(w http.ResponseWriter, r *http.Request) NewOrderHandler(w http.ResponseWriter, r *http.Request) OrderHandler(w http.ResponseWriter, r *http.Request) OrdersListHandler(w http.ResponseWriter, r *http.Request) OrderFinalizeHandler(w http.ResponseWriter, r *http.Request) RevokeCertHandler(w http.ResponseWriter, r *http.Request) KeyChangeHandler(w http.ResponseWriter, r *http.Request) // Non-RFC 8555 compliant handlers CABundleHandler(w http.ResponseWriter, r *http.Request) }
func NewRestService ¶
func NewRestService(params *Params) (RestServicer, error)
type RevokeCertRequest ¶
Click to show internal directories.
Click to hide internal directories.