pingback

package
v2.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2018 License: Apache-2.0 Imports: 7 Imported by: 49

Documentation

Overview

Package pingback provides verification that specific URLs have been seen by the proxy.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewVerifier

func NewVerifier(url *url.URL) verify.RequestVerifier

NewVerifier returns a new pingback verifier.

Types

type Verifier

type Verifier struct {
	// contains filtered or unexported fields
}

Verifier verifies that the specific URL has been seen.

func (*Verifier) ModifyRequest

func (v *Verifier) ModifyRequest(req *http.Request) error

ModifyRequest verifies that the request URL matches all parts of url.

If the value in url is non-empty, it must be an exact match. If the URL matches the pingback, it is recorded by setting the error to nil. The error will continue to be nil until the verifier has been reset, regardless of subsequent requests matching.

func (*Verifier) ResetRequestVerifications

func (v *Verifier) ResetRequestVerifications()

ResetRequestVerifications clears the failed request verification.

func (*Verifier) VerifyRequests

func (v *Verifier) VerifyRequests() error

VerifyRequests returns an error if pingback never occurred.

Jump to

Keyboard shortcuts

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