common

package
v0.0.0-...-a3451e6 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2019 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddEvent

func AddEvent(tracer types.Tracer, event types.TracerEvent) ([]byte, error)

AddEvent is the common functionality to add an event to the database.

func AddEventData

func AddEventData(eventData string) (types.RawEvent, error)

AddEventData adds a raw event if it's the first of that type of event, Otherwise, it returns the first event that looks like it. It also tags the raw data as either HTML or JSON.

func AddSubscriber

func AddSubscriber(conn *websocket.Conn) int

AddSubscriber takes a websocket connection and adds it to the list of subscribers. New events that happen in package common get pushed these events.

func AddTracer

func AddTracer(request types.Request) ([]byte, error)

AddTracer is the common functionality to add a tracer to the database.

func ChangeTracer

func ChangeTracer(key, tracer int)

ChangeTracer changes the tracer to send event updates for.

func DeleteProject

func DeleteProject(p string) error

DeleteProject closes the currently opened database, and deletes the file associated with it.

func EditTracer

func EditTracer(tracer types.Tracer, id uint) ([]byte, error)

EditTracer updates a tracer in the database.

func GetConfig

func GetConfig() ([]byte, error)

GetConfig is the common functionality for getting the global configuration.

func GetEvents

func GetEvents(tracerID uint) ([]byte, error)

GetEvents is the common functionality for getting all the events for a given tracer ID from the database.

func GetProjects

func GetProjects() ([]byte, error)

GetProjects queries the tracy path for all the available database files and returns the names of the files.

func GetTracer

func GetTracer(tracerID uint) ([]byte, error)

GetTracer is the common functionality to get a tracer from the database by it's ID.

func GetTracerRequest

func GetTracerRequest(tracerID uint) ([]byte, error)

GetTracerRequest gets the raw request for the tracer specified by an ID.

func GetTracers

func GetTracers() ([]byte, error)

GetTracers is the common functionality to get all the tracers from database.

func RemoveSubscriber

func RemoveSubscriber(key int)

RemoveSubscriber removes the websocket from the list of subscribers.

func ServerError

func ServerError(err error) []byte

ServerError is the common function for logging an internal server error and serving back something generic.

func StartReproductions

func StartReproductions(tracerID, contextID uint)

StartReproductions makes the raw HTTP request that initatied the tracer, then sends off the event to the extension via websocket to be completed by the extension.

func SwitchProject

func SwitchProject(p string) error

SwitchProject closes the currently opened database, sets the new database file and opens it.

func UpdateReproduction

func UpdateReproduction(tracerID, contextID, reproID uint, repro types.ReproductionTest) error

UpdateReproduction changes the status of a tracer event to reproduced. This should only happen once the extensions injected script is called from one of its reproduction tabs.

func UpdateSubscribers

func UpdateSubscribers(update interface{})

UpdateSubscribers sends an update to all the subscribers.

Types

This section is empty.

Jump to

Keyboard shortcuts

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