api

package
v0.18.2 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2022 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(auth adminAuthority, adminDB admin.DB, acmeDB acme.DB, acmeResponder acmeAdminResponderInterface) api.RouterHandler

NewHandler returns a new Authority Config Handler.

Types

type ACMEAdminResponder added in v0.18.2

type ACMEAdminResponder struct{}

ACMEAdminResponder is responsible for writing ACME admin responses

func NewACMEAdminResponder added in v0.18.2

func NewACMEAdminResponder() *ACMEAdminResponder

NewACMEAdminResponder returns a new ACMEAdminResponder

func (*ACMEAdminResponder) CreateExternalAccountKey added in v0.18.2

func (h *ACMEAdminResponder) CreateExternalAccountKey(w http.ResponseWriter, r *http.Request)

CreateExternalAccountKey writes the response for the EAB key POST endpoint

func (*ACMEAdminResponder) DeleteExternalAccountKey added in v0.18.2

func (h *ACMEAdminResponder) DeleteExternalAccountKey(w http.ResponseWriter, r *http.Request)

DeleteExternalAccountKey writes the response for the EAB key DELETE endpoint

func (*ACMEAdminResponder) GetExternalAccountKeys added in v0.18.2

func (h *ACMEAdminResponder) GetExternalAccountKeys(w http.ResponseWriter, r *http.Request)

GetExternalAccountKeys writes the response for the EAB keys GET endpoint

type ContextKey

type ContextKey string

ContextKey is the key type for storing and searching for ACME request essentials in the context of a request.

type CreateAdminRequest

type CreateAdminRequest struct {
	Subject     string              `json:"subject"`
	Provisioner string              `json:"provisioner"`
	Type        linkedca.Admin_Type `json:"type"`
}

CreateAdminRequest represents the body for a CreateAdmin request.

func (*CreateAdminRequest) Validate

func (car *CreateAdminRequest) Validate() error

Validate validates a new-admin request body.

type CreateExternalAccountKeyRequest added in v0.18.1

type CreateExternalAccountKeyRequest struct {
	Reference string `json:"reference"`
}

CreateExternalAccountKeyRequest is the type for POST /admin/acme/eab requests

func (*CreateExternalAccountKeyRequest) Validate added in v0.18.1

func (r *CreateExternalAccountKeyRequest) Validate() error

Validate validates a new ACME EAB Key request body.

type DeleteResponse

type DeleteResponse struct {
	Status string `json:"status"`
}

DeleteResponse is the resource for successful DELETE responses.

type GetAdminsResponse

type GetAdminsResponse struct {
	Admins     []*linkedca.Admin `json:"admins"`
	NextCursor string            `json:"nextCursor"`
}

GetAdminsResponse for returning a list of admins.

type GetExternalAccountKeysResponse added in v0.18.1

type GetExternalAccountKeysResponse struct {
	EAKs       []*linkedca.EABKey `json:"eaks"`
	NextCursor string             `json:"nextCursor"`
}

GetExternalAccountKeysResponse is the type for GET /admin/acme/eab responses

type GetProvisionersResponse

type GetProvisionersResponse struct {
	Provisioners provisioner.List `json:"provisioners"`
	NextCursor   string           `json:"nextCursor"`
}

GetProvisionersResponse is the type for GET /admin/provisioners responses.

type Handler

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

Handler is the Admin API request handler.

func (*Handler) CreateAdmin

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

CreateAdmin creates a new admin.

func (*Handler) CreateProvisioner

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

CreateProvisioner creates a new prov.

func (*Handler) DeleteAdmin

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

DeleteAdmin deletes admin.

func (*Handler) DeleteProvisioner

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

DeleteProvisioner deletes a provisioner.

func (*Handler) GetAdmin

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

GetAdmin returns the requested admin, or an error.

func (*Handler) GetAdmins

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

GetAdmins returns a segment of admins associated with the authority.

func (*Handler) GetProvisioner

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

GetProvisioner returns the requested provisioner, or an error.

func (*Handler) GetProvisioners

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

GetProvisioners returns the given segment of provisioners associated with the authority.

func (*Handler) Route

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

Route traffic and implement the Router interface.

func (*Handler) UpdateAdmin

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

UpdateAdmin updates an existing admin.

func (*Handler) UpdateProvisioner

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

UpdateProvisioner updates an existing prov.

type UpdateAdminRequest

type UpdateAdminRequest struct {
	Type linkedca.Admin_Type `json:"type"`
}

UpdateAdminRequest represents the body for a UpdateAdmin request.

func (*UpdateAdminRequest) Validate

func (uar *UpdateAdminRequest) Validate() error

Validate validates a new-admin request body.

Jump to

Keyboard shortcuts

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