Documentation ¶
Index ¶
Constants ¶
View Source
const ( VerifyResultTypeBody verifyResultType = "body" VerifyResultTypeUrl verifyResultType = "url" )
Variables ¶
View Source
var ( SignCounter = prometheus.NewCounterVec(prometheus.CounterOpts{ Name: "adscert_sign_count", Help: "The total number of requests signed", }, []string{signErrorLabel}) VerifyCounter = prometheus.NewCounterVec(prometheus.CounterOpts{ Name: "adscert_verify_count", Help: "The total number of requests verified", }, []string{verifyErrorLabel}) VerifyResultCounter = prometheus.NewCounterVec(prometheus.CounterOpts{ Name: "adscert_verify_result_count", Help: "The total number of valid signed requests", }, []string{verifyResultTypeLabel, verifyResultValidLabel}) )
Creates all metrics
Functions ¶
func GetAdscertMetricsRegistry ¶
func GetAdscertMetricsRegistry() *prometheus.Registry
func RecordSigningMetrics ¶
func RecordSigningMetrics(err SignErrorCode)
func RecordVerifyMetrics ¶
func RecordVerifyMetrics(err VerifyErrorCode)
func RecordVerifyResultMetrics ¶
func RecordVerifyResultMetrics(t verifyResultType, valid bool)
Types ¶
type SignErrorCode ¶
type SignErrorCode string
Signing Errors
const ( SignErrorNone SignErrorCode = "no_error" SignErrorParseUrl SignErrorCode = "parsing_url_error" SignErrorGenerateNonce SignErrorCode = "generate_nonce_error" SignErrorEmboss SignErrorCode = "emboss_error" )
type VerifyErrorCode ¶
type VerifyErrorCode string
Verification Errors
const ( VerifyErrorNone VerifyErrorCode = "no_error" VerifyErrorParseUrl VerifyErrorCode = "url_parse" VerifyErrorSignatureDecode VerifyErrorCode = "signature_decode" VerifyErrorCounterPartyLookUp VerifyErrorCode = "counter_party_lookup" )
Click to show internal directories.
Click to hide internal directories.