har

package
v0.1.16 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Export

func Export(flows []store.FlowMeta, fetch DataFetcher) ([]byte, error)

Export converts flows to HAR 1.2 JSON.

Types

type DataFetcher

type DataFetcher func(id store.FlowID) *store.FlowData

DataFetcher retrieves FlowData for a given ID.

type HARContent

type HARContent struct {
	Size     int    `json:"size"`
	MimeType string `json:"mimeType"`
	Text     string `json:"text"`
}

type HARCreator

type HARCreator struct {
	Name    string `json:"name"`
	Version string `json:"version"`
}

type HAREntry

type HAREntry struct {
	StartedDateTime string      `json:"startedDateTime"`
	Time            float64     `json:"time"`
	Request         HARRequest  `json:"request"`
	Response        HARResponse `json:"response"`
	Timings         HARTimings  `json:"timings"`
}

type HARHeader

type HARHeader struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type HARLog

type HARLog struct {
	Version string     `json:"version"`
	Creator HARCreator `json:"creator"`
	Entries []HAREntry `json:"entries"`
}

type HARParam

type HARParam struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type HARPost

type HARPost struct {
	MimeType string `json:"mimeType"`
	Text     string `json:"text"`
}

type HARRequest

type HARRequest struct {
	Method      string      `json:"method"`
	URL         string      `json:"url"`
	HTTPVersion string      `json:"httpVersion"`
	Headers     []HARHeader `json:"headers"`
	QueryString []HARParam  `json:"queryString"`
	BodySize    int         `json:"bodySize"`
	PostData    *HARPost    `json:"postData,omitempty"`
}

type HARResponse

type HARResponse struct {
	Status      int         `json:"status"`
	StatusText  string      `json:"statusText"`
	HTTPVersion string      `json:"httpVersion"`
	Headers     []HARHeader `json:"headers"`
	Content     HARContent  `json:"content"`
	BodySize    int         `json:"bodySize"`
}

type HARRoot

type HARRoot struct {
	Log HARLog `json:"log"`
}

type HARTimings

type HARTimings struct {
	Send    float64 `json:"send"`
	Wait    float64 `json:"wait"`
	Receive float64 `json:"receive"`
}

Jump to

Keyboard shortcuts

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