nvpair

package
v0.18.6 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MeasureNameValuePairs

func MeasureNameValuePairs(params []*NameValuePair) (n int)

MeasureNameValuePairs calculates memory size, or content length, required for storing or transmitting the specified name-value pairs.

func PrintParameters added in v0.13.0

func PrintParameters(params []*NameValuePair)

PrintParameters is used for debugging parameters.

Types

type NameValuePair

type NameValuePair struct {
	NameLength  *vl.VariableLength
	ValueLength *vl.VariableLength

	Name  []byte
	Value []byte
}

NameValuePair is a name-value pair in accordance to the FastCGI Specification Version 1.1.

func NewNameValuePairFromStream

func NewNameValuePairFromStream(stream io.Reader) (nvp *NameValuePair, err error)

NewNameValuePairFromStream reads a name-value pair from a byte stream.

func NewNameValuePairWithTextValue

func NewNameValuePairWithTextValue(name string, value string) (nvp *NameValuePair, err error)

NewNameValuePairWithTextValue creates a name-value pair using the specified textual arguments.

func NewNameValuePairWithTextValueU

func NewNameValuePairWithTextValueU(name string, value string) (nvp *NameValuePair)

NewNameValuePairWithTextValueU is an unsafe version of the 'NewNameValuePairWithTextValue' function. It is a helper-function for fast creation of a name-value pair using textual arguments. Please note that this function returns a NULL pointer on error.

func (*NameValuePair) Measure

func (nvp *NameValuePair) Measure() (n int)

Measure calculates memory size, or content length, required for storing or transmitting of a single name-value pair as a FastCGI data.

func (*NameValuePair) ToBytes

func (nvp *NameValuePair) ToBytes() (ba []byte, err error)

ToBytes returns the bytes storing the name-value pair in accordance to the FastCGI Specification Version 1.1.

Jump to

Keyboard shortcuts

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