lurch

package
v0.0.0-...-1bef8a8 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2013 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exception

type Exception struct {
	Id        bson.ObjectId "_id,omitempty"
	UniqueId  uint32
	Name      string
	Message   string
	Status    string
	Comments  []string
	Instances []time.Time
	Traces    []*Trace `bson:"Trace",omitempty`
}

func FindException

func FindException(uniqueId uint32, db *mgo.Database) (exception *Exception, err error)

Find an Exception by UniqueId from Mongo

func GetExceptions

func GetExceptions(db *mgo.Database) (exceptions []*Exception, err error)

Find an Exception by UniqueId from Mongo

func NewException

func NewException(name, message string, backtrace []string) (exception *Exception, err error)

func (*Exception) Insert

func (exception *Exception) Insert(db *mgo.Database) (err error)

func (*Exception) Upsert

func (exception *Exception) Upsert(trace *Trace, db *mgo.Database) (err error)

Upsert will insert a new Exception if nothing matching uniqueid exists Then, it will add to instances/traces of the Exception

type Trace

type Trace struct {
	Message   string
	Backtrace []string
	Context   interface{}
}

func NewTrace

func NewTrace(message string, backtrace []string, context interface{}) (trace *Trace, err error)

Jump to

Keyboard shortcuts

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