logs

package
v0.0.0-...-82869e8 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2020 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Events = make(chan Event)

Events channel for integrations

Functions

func Create

func Create(c *gin.Context)

Create handler creates new log record

func Delete

func Delete(c *gin.Context)

Delete handler deletes log by id

func DeleteAll

func DeleteAll(c *gin.Context)

DeleteAll handler clears app's logs

func Get

func Get(c *gin.Context)

Get handler returns log record by id

func GetAll

func GetAll(c *gin.Context)

GetAll handler returns app's logs

func VerifyToken

func VerifyToken() gin.HandlerFunc

VerifyToken middleware

Types

type Event

type Event struct {
	App     primitive.ObjectID     `bson:"_id" json:"id"`
	Data    map[string]interface{} `json:"data" binding:"required"`
	Created time.Time              `json:"created"`
}

type Record

type Record struct {
	ID      primitive.ObjectID     `bson:"_id" json:"id,omitempty"`
	Data    map[string]interface{} `json:"data" binding:"required"`
	Created time.Time              `json:"created"`
}

Jump to

Keyboard shortcuts

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