furball

package
v0.0.0-...-cd6b1fc Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveBallFile

func SaveBallFile(ball *Ball, path string) (rerr error)

Types

type Ball

type Ball struct {
	Entries []Entry `json:"entries"`
}

func LoadBallFile

func LoadBallFile(path string) (*Ball, error)

func (*Ball) BeginRecording

func (b *Ball) BeginRecording(rq *gopher.Request, at time.Time) gopher.Recording

type Duration

type Duration time.Duration

Duration provides a time.Duration that marshals to/from a float representing milliseconds.

func (Duration) MarshalJSON

func (d Duration) MarshalJSON() ([]byte, error)

func (Duration) String

func (d Duration) String() string

func (*Duration) UnmarshalJSON

func (d *Duration) UnmarshalJSON(b []byte) (err error)

type Entry

type Entry struct {
	URL    gopher.URL    `json:"url"`
	At     time.Time     `json:"at"`
	Taken  Duration      `json:"taken"`
	Status gopher.Status `json:"status,omitempty"`
	Msg    string        `json:"msg,omitempty"`
	In     []byte        `json:"in,omitempty"`
	Out    []byte        `json:"out"`
}

type EntryRecording

type EntryRecording struct {
	// contains filtered or unexported fields
}

func (*EntryRecording) Done

func (e *EntryRecording) Done(at time.Time)

func (*EntryRecording) RequestWriter

func (e *EntryRecording) RequestWriter() io.Writer

func (*EntryRecording) ResponseWriter

func (e *EntryRecording) ResponseWriter() io.Writer

func (*EntryRecording) SetStatus

func (e *EntryRecording) SetStatus(status gopher.Status, msg string)

Jump to

Keyboard shortcuts

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