journal

package
v1.9.9 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const JournalHeader = "Journal-Id"

Variables

This section is empty.

Functions

func ToJournalHeader

func ToJournalHeader(header http.Header) map[string]string

Types

type Journal

type Journal struct {
	ID          string      `json:"id"`
	Request     *Request    `json:"request"`
	Responses   []*Response `json:"responses"`
	Success     bool        `json:"success"`
	CostSeconds float64     `json:"cost_seconds"`
}

func NewJournal

func NewJournal(id string) *Journal

func (*Journal) AppendResponse

func (j *Journal) AppendResponse(resp *Response)

type Request

type Request struct {
	TTL        string            `json:"ttl"`
	Method     string            `json:"method"`
	DecodedURL string            `json:"decoded_url"`
	Header     map[string]string `json:"header"`
	Body       string            `json:"body"`
}

type Response

type Response struct {
	Header      map[string]string `json:"header"`
	StatusCode  int               `json:"status_code"`
	Status      string            `json:"status"`
	Body        interface{}       `json:"body"`
	CostSeconds float64           `json:"cost_seconds"`
}

Jump to

Keyboard shortcuts

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