history

package
v0.0.0-...-0ffb788 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTMLOutagesHandler

func HTMLOutagesHandler(c *gin.Context)

HTMLOutagesHandler returns a html page with all outage historys in a given period

func HTMLRestartsHandler

func HTMLRestartsHandler(c *gin.Context)

func HTMLTicketsHandler

func HTMLTicketsHandler(c *gin.Context)

func HTMLUpdatesHandler

func HTMLUpdatesHandler(c *gin.Context)

func HTMLVersionsHandler

func HTMLVersionsHandler(c *gin.Context)

func InputOutageHandler

func InputOutageHandler(c *gin.Context)

InputOutageHandler saves an outage message to the outage_history collection

func InputRestartHandler

func InputRestartHandler(c *gin.Context)

func InputUpdateHandler

func InputUpdateHandler(c *gin.Context)

func InputUpdateHandlerByID

func InputUpdateHandlerByID(c *gin.Context)

func InputUpdateVersionsHandler

func InputUpdateVersionsHandler(c *gin.Context)

func InputVersionHandlerByWebVersion

func InputVersionHandlerByWebVersion(c *gin.Context)

func InputVersionsHandler

func InputVersionsHandler(c *gin.Context)

Types

type ClientRestart

type ClientRestart struct {
	ClientId      string `json:"client_id" binding:"Required"`
	ServerAddress string `json:"server_address"`
	CreationDate  string
	User          string `json:"user" binding:"Required"`
	Description   string `json:"description"`
}

type ClientUpdate

type ClientUpdate struct {
	ClientId        string `json:"client_id" binding:"Required"`
	Platform        string `json:"platform" binding:"Required"`
	Date            string `json:"date"`
	PreviousVersion string `json:"previous_version" binding:"Required"`
	UpdatedVersion  string `json:"updated_version" binding:"Required"`
	User            string `json:"user" binding:"Required"`
}

type OutageRecord

type OutageRecord struct {
	ClientID      string `json:"client_id" binding:"Required"`
	CreationDate  string
	ServerAddress string `json:"server_address"`
	Description   string `json:"description"`
	TopClients    string `json:"top_clients"`
	User          string `json:"user" binding:"Required"`
	Agent         string `json:"agent" binding:"Required"`
	State         string `json:"state" binding:"Required"`
	Duration      time.Duration
}

OutageRecord is the structure for an outage message provenient from Nagios or another monitoring tool

type Ticket

type Ticket struct {
	ClientID     string
	CreationDate string
	Open         bool
}

func GetOpenTickets

func GetOpenTickets(clientId string) (Ticket, error)

func New

func New(clientId, creationDate string, open bool) Ticket

func (*Ticket) CloseTicket

func (t *Ticket) CloseTicket() error

func (*Ticket) OpenTicket

func (t *Ticket) OpenTicket(clientId string) error

func (*Ticket) Validate

func (t *Ticket) Validate() bool

type Versions

type Versions struct {
	WebVersion     string `json:"web_version" binding:"Required"`
	IosVersion     string `json:"ios_version" binding:"Required"`
	AndroidVersion string `json:"android_version" binding:"Required"`
}

Jump to

Keyboard shortcuts

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