transport

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2022 License: MPL-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeEnrollRequest

func DecodeEnrollRequest(ctx context.Context, r *http.Request) (request interface{}, err error)

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 DecodeReenrollRequest(ctx context.Context, r *http.Request) (request interface{}, err error)

func DecodeRequest

func DecodeRequest(ctx context.Context, r *http.Request) (request interface{}, err error)

func DecodeServerkeygenRequest

func DecodeServerkeygenRequest(ctx context.Context, r *http.Request) (request interface{}, err error)

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 EncodeMultiPart(boundary string, parts []MultipartPart) (*bytes.Buffer, string, error)

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 ReadAllBase64Response

func ReadAllBase64Response(r io.Reader) ([]byte, error)

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{}
}

Jump to

Keyboard shortcuts

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