api

package
v0.15.16-rc7 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2021 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(auth *authority.Authority) api.RouterHandler

NewHandler returns a new Authority Config Handler.

Types

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 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 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 ACME 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