statistics

package
v0.0.0-...-aeaf823 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// DB is public so other packages can do selects on it
	DB *sql.DB
	// Tables is public so other packages can range over it
	Tables = []string{"baremetal", "cluster", "config", "document", "image", "phase", "secret"}
)

Functions

func Init

func Init()

Init will create the database if it doesn't exist or open the existing database

Types

type Transaction

type Transaction struct {
	Table        configs.WsComponentType
	SubComponent configs.WsSubComponentType
	User         *string
	ActionType   *string
	Target       *string
	Started      int64
	Recordable   bool
}

Transaction will record the details of the CTL transaction and record them to the DB

func NewTransaction

func NewTransaction(user *string, request configs.WsMessage) *Transaction

NewTransaction establishes the transaction which will record

func (*Transaction) Complete

func (transaction *Transaction) Complete(errorMessageNotPresent bool)

Complete will put an entry into the statistics database for the transaction

Jump to

Keyboard shortcuts

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