Documentation ¶
Index ¶
- func DecodeEnrollRequest(ctx context.Context, r *http.Request) (request interface{}, err error)
- func DecodePKCS7CertsOnly(b []byte) ([]*x509.Certificate, error)
- func DecodeReenrollRequest(ctx context.Context, r *http.Request) (request interface{}, err error)
- func DecodeRequest(ctx context.Context, r *http.Request) (request interface{}, err error)
- func DecodeServerkeygenRequest(ctx context.Context, r *http.Request) (request interface{}, err error)
- func EncodeError(_ context.Context, err error, w http.ResponseWriter)
- func EncodeGetCaCertsResponse(ctx context.Context, w http.ResponseWriter, response interface{}) error
- func EncodeMultiPart(boundary string, parts []MultipartPart) (*bytes.Buffer, string, error)
- func EncodeResponse(ctx context.Context, w http.ResponseWriter, response interface{}) error
- func EncodeServerkeygenResponse(ctx context.Context, w http.ResponseWriter, response interface{}) error
- func ErrContentType() error
- func ErrInvalidBase64() error
- func ErrMalformedCert() error
- func ErrMissingAPS() error
- func ErrNoClientCert() error
- func HTTPToContext(logger log.Logger) httptransport.RequestFunc
- func MakeHTTPHandler(service service.Service, lamassuCaClient *lamassuca.LamassuCaClient, ...) http.Handler
- func ReadAllBase64Response(r io.Reader) ([]byte, error)
- func ReadCertResponse(r io.Reader) ([]*x509.Certificate, error)
- func WriteResponse(w http.ResponseWriter, contentType string, encode bool, obj interface{})
- type MultipartPart
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeEnrollRequest ¶
func DecodePKCS7CertsOnly ¶
func DecodePKCS7CertsOnly(b []byte) ([]*x509.Certificate, error)
decodePKCS7CertsOnly decodes a PKCS#7 degenerate "certs-only" response and returns the certificate(s) it contains.
func DecodeReenrollRequest ¶
func DecodeRequest ¶
func EncodeError ¶
func EncodeError(_ context.Context, err error, w http.ResponseWriter)
func EncodeGetCaCertsResponse ¶
func EncodeGetCaCertsResponse(ctx context.Context, w http.ResponseWriter, response interface{}) error
func EncodeMultiPart ¶
func EncodeResponse ¶
func EncodeResponse(ctx context.Context, w http.ResponseWriter, response interface{}) error
func EncodeServerkeygenResponse ¶
func EncodeServerkeygenResponse(ctx context.Context, w http.ResponseWriter, response interface{}) error
func ErrContentType ¶
func ErrContentType() error
func ErrInvalidBase64 ¶
func ErrInvalidBase64() error
func ErrMalformedCert ¶
func ErrMalformedCert() error
func ErrMissingAPS ¶
func ErrMissingAPS() error
func ErrNoClientCert ¶
func ErrNoClientCert() error
func HTTPToContext ¶
func HTTPToContext(logger log.Logger) httptransport.RequestFunc
func MakeHTTPHandler ¶
func MakeHTTPHandler(service service.Service, lamassuCaClient *lamassuca.LamassuCaClient, logger log.Logger, otTracer stdopentracing.Tracer) http.Handler
func ReadCertResponse ¶
func ReadCertResponse(r io.Reader) ([]*x509.Certificate, error)
func WriteResponse ¶
func WriteResponse(w http.ResponseWriter, contentType string, encode bool, obj interface{})
Types ¶
type MultipartPart ¶
type MultipartPart struct { ContentType string Data interface{} }
Click to show internal directories.
Click to hide internal directories.