api

package
v0.15.16-rc6 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: 11 Imported by: 0

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 Clock

type Clock struct{}

Clock that returns time in UTC rounded to seconds.

func (*Clock) Now

func (c *Clock) Now() time.Time

Now returns the UTC time rounded to seconds.

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(c *admin.Collection) error

Validate validates a new-admin request body.

type CreateProvisionerRequest

type CreateProvisionerRequest struct {
	Type             string           `json:"type"`
	Name             string           `json:"name"`
	Claims           *linkedca.Claims `json:"claims"`
	Details          []byte           `json:"details"`
	X509Template     string           `json:"x509Template"`
	X509TemplateData []byte           `json:"x509TemplateData"`
	SSHTemplate      string           `json:"sshTemplate"`
	SSHTemplateData  []byte           `json:"sshTemplateData"`
}

CreateProvisionerRequest represents the body for a CreateProvisioner request.

func (*CreateProvisionerRequest) Validate

Validate validates a new-provisioner 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 all 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 all 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.

type UpdateProvisionerRequest

type UpdateProvisionerRequest struct {
	Type             string           `json:"type"`
	Name             string           `json:"name"`
	Claims           *linkedca.Claims `json:"claims"`
	Details          []byte           `json:"details"`
	X509Template     string           `json:"x509Template"`
	X509TemplateData []byte           `json:"x509TemplateData"`
	SSHTemplate      string           `json:"sshTemplate"`
	SSHTemplateData  []byte           `json:"sshTemplateData"`
}

UpdateProvisionerRequest represents the body for a UpdateProvisioner request.

func (*UpdateProvisionerRequest) Validate

Validate validates a update-provisioner request body.

Jump to

Keyboard shortcuts

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