ws

package
v0.0.0-...-f3c9c56 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2018 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serve

func Serve(hub *Hub, w http.ResponseWriter, r *http.Request)

Types

type Client

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

type Hub

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

func NewHub

func NewHub() *Hub

func (*Hub) Run

func (h *Hub) Run()

type Request

type Request struct {
	Method      string `json:"Method"`
	Path        string `json:"Path"`
	RawText     string `json:"RawText"`
	CurlCommand string `json:"CurlCommand"`
}

type Response

type Response struct {
	Status  string `json:"Status"`
	RawText string `json:"RawText"`
}

type Transaction

type Transaction struct {
	ID       uuid.UUID `json:"ID"`
	Request  Request   `json:"Req"`
	Response Response  `json:"Resp"`
	ClientIP string    `json:"ClientIP"`
	BeginAt  time.Time `json:"BeginAt"`
	EndAt    time.Time `json:"EndAt"`
}

Jump to

Keyboard shortcuts

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