chttp

package
v0.0.2-0...-0d7cfed Latest Latest
Warning

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

Go to latest
Published: May 14, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateEnrolmentProfReqHandler

func CreateEnrolmentProfReqHandler(r *http.Request) []byte

func CreateHTTPResponse

func CreateHTTPResponse(statuscode int, req *http.Request, ctype, body string) []byte

func GetCACertReqHandler

func GetCACertReqHandler(req *http.Request, id string) []byte

func GetCreateEnrolProfRequest

func GetCreateEnrolProfRequest(eid, esec, caprof, caname, role string) []byte

func GetFailureJson

func GetFailureJson(reason string) string

func GetFingerprintReqHandler

func GetFingerprintReqHandler(r *http.Request) []byte

func GetFingerprintRequest

func GetFingerprintRequest(caname string) []byte

func GetGetCACertRequest

func GetGetCACertRequest() []byte

func GetSimpleEnrollRequest

func GetSimpleEnrollRequest(payload string) []byte

func GetSuccessJson

func GetSuccessJson() string

func HandleCreateEnrolProfResponse

func HandleCreateEnrolProfResponse(res []byte) bool

func HandleGetCACertResponse

func HandleGetCACertResponse(res []byte) (string, error)

func HandleGetFingerprintResponse

func HandleGetFingerprintResponse(res []byte) (int, []byte, error)

func HandleInvalidRequest

func HandleInvalidRequest(r *http.Request) []byte

func HandleSimpleEnrollResponse

func HandleSimpleEnrollResponse(res []byte) (string, error)

func HttpHandleAdminRequest

func HttpHandleAdminRequest(data []byte) []byte

func HttpHandleESTRequest

func HttpHandleESTRequest(data []byte, id string) []byte

func RevokeCertificateReqHandler

func RevokeCertificateReqHandler(w http.ResponseWriter, r *http.Request)

TODO: This api is not being used yet.. will be supported

func SimpleEnrollReqHandler

func SimpleEnrollReqHandler(req *http.Request, id string) []byte

Types

type Ca

type Ca struct {
	Caname string `json:"caname"`
}

type ClosingBuffer

type ClosingBuffer struct {
	*bytes.Buffer
}

func (*ClosingBuffer) Close

func (cb *ClosingBuffer) Close() error

type CreateEnrolProf

type CreateEnrolProf struct {
	EnrollId     string `json:"enrollId"`
	EnrollSecret string `json:"enrollSecret"`
	CaProfile    string `json:"caProfile"`
	CaName       string `json:"caName"`
	Role         string `json:"role"`
}

type EnrollResponse

type EnrollResponse struct {
	Success string `json:"Success"`
	Message string `json:"Message"`
}

type FingerprintRes

type FingerprintRes struct {
	Fingerprint string `json:"Fingerprint"`
	FpAlgo      int    `json:"FpAlgo"`
}

type RevokeCert

type RevokeCert struct {
	EnrollId string `json:"enrollId"`
	SerialNo int64  `json:"serialNo"`
	OcspCode string `json:"ocspcode"`
}

Jump to

Keyboard shortcuts

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