chatapi

package
v0.0.0-...-e09aa0e Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2020 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenCrt

func GenCrt(host string)

func MarshalPKCS8PrivateKey

func MarshalPKCS8PrivateKey(key *rsa.PrivateKey) ([]byte, error)

func ServeWs

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

serveWs handles websocket requests from the peer.

Types

type BurpMetaData

type BurpMetaData struct {
	Host     string `json:"host"`
	Port     int    `json:"port"`
	Protocol string `json:"protocol"`
}

func (BurpMetaData) String

func (b BurpMetaData) String() string

type BurpRequestResponse

type BurpRequestResponse struct {
	Request     []int         `json:"request"`
	Response    []int         `json:"response"`
	HttpService *BurpMetaData `json:"httpService"`
	Comments    []Comment     `json:"comments"`
}

func (BurpRequestResponse) String

func (b BurpRequestResponse) String() string

type BurpTCMessage

type BurpTCMessage struct {
	BurpRequestResponse *BurpRequestResponse `json:"burpmsg"`
	MessageTarget       string               `json:"messageTarget"`
	MessageType         string               `json:"msgtype"`
	Data                string               `json:"data"`
}

func NewBurpTCMessage

func NewBurpTCMessage() *BurpTCMessage

func (BurpTCMessage) String

func (b BurpTCMessage) String() string

type Client

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

Client is a middleman between the websocket connection and the hub.

type Comment

type Comment struct {
	Comment          string       `json:"comment"`
	UserWhoCommented string       `json:"userWhoCommented"`
	TimeOfComment    JavaJsonTime `json:"timeOfComment"`
}

func (*Comment) String

func (c *Comment) String() string

type Comments

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

func NewComments

func NewComments() Comments

type Hub

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

Hub maintains the set of active clients and broadcasts messages to the clients.

func NewHub

func NewHub(password string) *Hub

func (*Hub) Run

func (h *Hub) Run()

type JavaJsonTime

type JavaJsonTime struct {
	T time.Time
}

func (JavaJsonTime) MarshalJSON

func (j JavaJsonTime) MarshalJSON() ([]byte, error)

func (JavaJsonTime) String

func (j JavaJsonTime) String() string

func (*JavaJsonTime) UnmarshalJSON

func (j *JavaJsonTime) UnmarshalJSON(b []byte) error

type PKCS8Key

type PKCS8Key struct {
	Version             int
	PrivateKeyAlgorithm []asn1.ObjectIdentifier
	PrivateKey          []byte
}

type Room

type Room struct {
	*sync.RWMutex
	// contains filtered or unexported fields
}

func NewRoom

func NewRoom(password string) *Room

Jump to

Keyboard shortcuts

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