validator

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckContentAndReport

func CheckContentAndReport(r *http.Request, BaselineContent *client.Content, errBaseline error, TestContent *client.Content, errTest error)

func GetBaselineContent

func GetBaselineContent(r *http.Request) (*client.Content, error)

func GetTestContent

func GetTestContent(r *http.Request) (*client.Content, error)

func MarshalContent

func MarshalContent(v interface{}) ([]byte, error)

func PushRequest

func PushRequest(r *http.Request)

func UnmarshalContent

func UnmarshalContent(data []byte) (*client.Content, error)

Types

type Validator

type Validator struct{}
var DefaultValidator *Validator

func (*Validator) CheckRequest

func (v *Validator) CheckRequest(r *http.Request) bool

func (*Validator) PushRequest

func (v *Validator) PushRequest(r *http.Request)

func (*Validator) Validate

func (v *Validator) Validate(r *http.Request)

Jump to

Keyboard shortcuts

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