types

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context added in v0.10.0

type Context map[string]any

type FParam added in v0.11.0

type FParam struct {
	Key      string
	Type     reflect.Type
	Default  *string
	Optional bool
	IsFile   bool
}

type FormFile added in v0.11.0

type FormFile struct {
	Header *multipart.FileHeader
	// contains filtered or unexported fields
}

func (FormFile) Mock added in v1.0.1

func (self FormFile) Mock(
	filename string,
	Header textproto.MIMEHeader,
	content []byte,
) FormFile

func (FormFile) ReadAll added in v0.13.0

func (self FormFile) ReadAll() ([]byte, error)

type HParam added in v0.6.0

type HParam struct {
	Key  string
	Type reflect.Type
}

type HeaderDiff added in v0.8.0

type HeaderDiff struct {
	Key  string
	Type HeaderDiffType
	Val  string
}

type HeaderDiffType added in v0.8.0

type HeaderDiffType int
const (
	HeaderDiffTypeSet HeaderDiffType = iota
	HeaderDiffTypeDel
)

type InternalRequest added in v0.8.0

type InternalRequest struct {
	Req     any
	Context Context
}

type InternalResponse added in v0.8.0

type InternalResponse struct {
	Data   []byte
	Status int
}

type None added in v0.12.0

type None struct{}

type PathItemTp added in v0.7.0

type PathItemTp int
const (
	PathItemCommon PathItemTp = iota
	PathItemVar
	PathItemRest
)

type PathPttrn added in v0.7.0

type PathPttrn struct {
	Src       string
	Items     []string
	ItemTypes []PathItemTp
}

func (PathPttrn) EndsWithRest added in v0.7.0

func (self PathPttrn) EndsWithRest() bool

func (PathPttrn) Parse added in v0.7.0

func (self PathPttrn) Parse(src string) (PathPttrn, error)

type QParam added in v0.6.0

type QParam struct {
	Key      string
	Type     reflect.Type
	Default  []string
	Optional bool
	List     bool
}

type Response added in v0.8.0

type Response struct {
	Data      any
	Status    int
	HeaderOps []HeaderDiff
}

Jump to

Keyboard shortcuts

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