requestParser

package
v0.0.0-...-85f45e4 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidKey = errors.New("this key is not supported")

ErrInvalidKey - If an invalid value is passed for the key parameter.

Functions

This section is empty.

Types

type RequestParams

type RequestParams struct {
	// Label - Label for the visitors.
	Label string
	// LabelBgColor - Background color for the visitors label area.
	LabelBgColor string
	// LabelColor - Color for the visitors label.
	LabelColor string
	// CountBgColor - Background color for the count area.
	CountBgColor string
	// CountColor - Color for the count.
	CountColor string
	// Key - Key for the badge.
	Key string
}

RequestParams - Parameters contaioned in the request.

type RequestParser

type RequestParser interface {
	// Parse - Parses the given HTTP request and returns the badge parameters.
	Parse(r *http.Request) (RequestParams, error)
}

RequestParser - Interface for the request parser.

func NewParser

func NewParser() RequestParser

NewParser - Constructs and returns a new RequestParser.

Jump to

Keyboard shortcuts

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