agenttransportv1beta1

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: Apache-2.0 Imports: 20 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentTransportHandler

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

AgentTransportHandler is not split into per-resource files the way v1beta1/v1alpha1 are - every method lives in this one handler.go. CreateCertificateSigningRequest is the one genuinely cross-resource method: it looks up the requesting device (to check decommission status) before creating/auto-approving the CSR, so it needs both the device and certificatesigningrequest fields.

func NewAgentTransportHandler

func NewAgentTransportHandler(
	deviceSvc device.Service,
	enrollmentrequestSvc enrollmentrequest.Service,
	certificatesigningrequestSvc certificatesigningrequest.Service,
	converter convertv1beta1.Converter,
	ca *crypto.CAClient,
	log logrus.FieldLogger,
) *AgentTransportHandler

func (*AgentTransportHandler) CreateCertificateSigningRequest

func (s *AgentTransportHandler) CreateCertificateSigningRequest(w http.ResponseWriter, r *http.Request)

(POST /api/v1/certificatesigningrequests)

func (*AgentTransportHandler) CreateEnrollmentRequest

func (s *AgentTransportHandler) CreateEnrollmentRequest(w http.ResponseWriter, r *http.Request)

(POST /api/v1/enrollmentrequests)

func (*AgentTransportHandler) GetCertificateSigningRequest

func (s *AgentTransportHandler) GetCertificateSigningRequest(w http.ResponseWriter, r *http.Request, name string)

(GET /api/v1/certificatesigningrequests/{name})

func (*AgentTransportHandler) GetEnrollmentRequest

func (s *AgentTransportHandler) GetEnrollmentRequest(w http.ResponseWriter, r *http.Request, name string)

(GET /api/v1/enrollmentrequests/{name})

func (*AgentTransportHandler) GetRenderedDevice

func (s *AgentTransportHandler) GetRenderedDevice(w http.ResponseWriter, r *http.Request, name string, params api.GetRenderedDeviceParams)

(GET /api/v1/devices/{name}/rendered)

func (*AgentTransportHandler) PatchDeviceStatus

func (s *AgentTransportHandler) PatchDeviceStatus(w http.ResponseWriter, r *http.Request, name string)

(PATCH) /api/v1/devices/{name}/status)

func (*AgentTransportHandler) ReplaceDeviceStatus

func (s *AgentTransportHandler) ReplaceDeviceStatus(w http.ResponseWriter, r *http.Request, name string)

(PUT /api/v1/devices/{name}/status)

func (*AgentTransportHandler) SetParseFailureResponse

func (s *AgentTransportHandler) SetParseFailureResponse(w http.ResponseWriter, err error)

SetParseFailureResponse writes an error response for JSON decode failures.

func (*AgentTransportHandler) SetResponse

func (s *AgentTransportHandler) SetResponse(w http.ResponseWriter, body any, status domain.Status)

SetResponse writes an HTTP response, converting domain.Status to the v1beta1 API Status via the handler's converter. For 2xx responses, body is encoded; for non-2xx, the converted status is encoded.

Jump to

Keyboard shortcuts

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