package
0.0.0-20240712091308-0d802d755989
Repository: https://github.com/marchammersc/goca.git
Documentation: pkg.go.dev
# Functions
AddCA is the handler of Certificate Authorities endpoint @Summary Create new Certificate Authorities (CA) or Intermediate Certificate Authorities (ICA) @Description create a new Certificate Authority Root or Intermediate @Tags CA @Accept json @Produce json @Param json_payload body models.Payload true "Add new Certificate Authority or Intermediate Certificate Authority" @Success 200 {object} models.ResponseCA @Failure 404 {object} models.ResponseError @Failure 500 Internal Server Error @Router /api/v1/ca [post].
GetCA is the handler of Certificate Authorities endpoint @Summary List Certificate Authorities (CA) @Description list all the Certificate Authorities @Tags CA @Produce json @Success 200 {object} models.ResponseList @Failure 404 {object} models.ResponseError @Failure 500 Internal Server Error @Router /api/v1/ca [get].
GetCACommonName is the handler of Certificate Authorities endpoint @Summary Certificate Authorities (CA) Information based in Common Name @Description list the Certificate Authorities data @Tags CA @Produce json @Param cn path string true "Common Name" @Success 200 {object} models.ResponseCA @Failure 404 {object} models.ResponseError @Failure 500 Internal Server Error @Router /api/v1/ca/{cn} [get].
GetCertificates is the handler of Certificates by Authorities Certificates endpoint @Summary List all Certificates managed by a certain Certificate Authority @Description list all certificates managed by a certain Certificate Authority (cn) @Tags CA/{CN}/Certificates @Produce json @Param cn path string true "Common Name of the Certificate Authority" @Success 200 {object} models.ResponseCA @Failure 404 {object} models.ResponseError @Failure 500 Internal Server Error @Router /api/v1/ca/{cn}/certificates [get].
GetCertificatesCommonName is the handler of Certificates by Authorities Certificates endpoint @Summary Get information about a Certificate @Description get information about a certificate issued by a certain CA @Tags CA/{CN}/Certificates @Produce json @Param cn path string true "Common Name of the Certificate Authority" @Param certificate_cn path string true "Common Name of Certificate" @Success 200 {object} models.ResponseCertificates @Failure 404 {object} models.ResponseError @Failure 500 Internal Server Error @Router /api/v1/ca/{cn}/certificates/{certificate_cn} [get].
AddCertificates is the handler of Certificates by Authorities Certificates endpoint @Summary CA issue new certificate @Description the Certificate Authority issues a new Certificate @Tags CA/{CN}/Certificates @Produce json @Accept json @Param cn path string true "Common Name of the Certificate Authority" @Param ca body models.Payload true "Add new Certificate Authority or Intermediate Certificate Authority" @Success 200 {object} models.ResponseCertificates @Failure 404 {object} models.ResponseError @Failure 500 Internal Server Error @Router /api/v1/ca/{cn}/certificates [post].
RevokeCertificate is the handler of Certificates by Authorities Certificates endpoint @Summary CA revoke a existent certificate managed by CA @Description the Certificate Authority revokes a managed Certificate @Tags CA/{CN}/Certificates @Produce json @Accept json @Param cn path string true "Common Name of the Certificate Authority" @Param certificate_cn path string true "Common Name of Certificate" @Success 200 {object} models.CABody @Failure 404 {object} models.ResponseError @Failure 500 Internal Server Error @Router /api/v1/ca/{cn}/certificates/{certificate_cn} [delete].
SignCSR is the handler of Certificate Authorities endpoint @Summary Certificate Authorities (CA) Signer for Certificate Sigining Request (CSR) @Description create a new certificate signing a Certificate Sigining Request (CSR) @Tags CA @Accept json @Produce json @Param file formData file true "Attached CSR file" @Param valid query int false "Number certificate valid days" @Success 200 {object} models.ResponseCertificates @Failure 404 {object} models.ResponseError @Failure 500 Internal Server Error @Router /api/v1/ca/{cn}/sign [post].
UploadCertificateICA is the handler of Intermediate Certificate Authorities endpoint @Summary Upload a Certificate to an Intermediate CA @Description Upload a Certificate to a ICA pending certificate @Tags CA @Produce json @Param file formData file true "Attached signed Certificate file" @Success 200 {object} models.ResponseCA @Failure 404 {object} models.ResponseError @Failure 500 Internal Server Error @Router /api/v1/ca/{cn}/upload [post].