parser

package
v0.0.0-...-275a27f Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package parser provides a parser for data, header, and query parameter input strings.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ParsedHeader

type ParsedHeader struct {
	Name  string
	Value string
}

A ParsedHeader represents a single parsed header. They may be repeated in one input.

type ParsedInput

type ParsedInput struct {
	Headers     []ParsedHeader
	QueryParams []ParsedQueryParam
	Body        any
}

A ParsedInput represents data gathered from a user input string.

func ParseInput

func ParseInput(in []string) (*ParsedInput, error)

ParseInput parses a string of headers.

type ParsedQueryParam

type ParsedQueryParam struct {
	Name  string
	Value string
}

A ParsedQueryParam represents a single parsed query parameter. They may be repeated in one input.

Jump to

Keyboard shortcuts

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