documents

package
v0.0.0-...-cbce884 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2020 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetRoutes

func SetRoutes(engine *gin.Engine, datastore interfaces.Datastore, cache redis.UniversalClient, processor *events.Processor, config *config.AppConfig) error

SetRoutes sets all of the appropriate routes to handlers for project collections

Types

type Documents

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

Documents contains the datastore and any HTTP handlers for project resource documents

func New

New returns a pointer to a new `Documents` struct

func (*Documents) AddObject

func (h *Documents) AddObject(c *gin.Context)

AddObject creates a new document of the resource definition

func (*Documents) DeleteObject

func (h *Documents) DeleteObject(c *gin.Context)

DeleteObject deletes the object from the collection

func (*Documents) GetObject

func (h *Documents) GetObject(c *gin.Context)

GetObject returns a single object with the resourceID for this resource

func (*Documents) GetStats

func (d *Documents) GetStats(c *gin.Context)

GetStats returns the size of the collections

func (*Documents) ListCollectionUsage

func (d *Documents) ListCollectionUsage(c *gin.Context)

ListCollectionUsage returns the list of activity logs for a project

func (*Documents) ListObjects

func (h *Documents) ListObjects(c *gin.Context)

ListObjects returns the list of objects for a resource

func (*Documents) PutObject

func (h *Documents) PutObject(c *gin.Context)

PutObject updates an existing document of the resource definition

type Usage

type Usage struct {
	RequestCount      int64         `json:"request_count"`
	TotalResponseTime int64         `json:"-"`
	AvgResponse       int64         `json:"avg_response"`
	StatusCodes       map[int]int64 `json:"status_codes"`
}

Jump to

Keyboard shortcuts

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