core

package
v0.0.0-...-accb53d Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2018 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	DBConnection *sql.DB
	// contains filtered or unexported fields
}

DB class to work with MySQL database

func (*DB) Connect

func (db *DB) Connect() error

Connect to the MySQL server

func (*DB) New

func (db *DB) New(mysqlServer string, mysqlDB string, mysqlUser string, mysqlPw string) (*sql.DB, error)

New will create a database connection and return the sql.DB

func (*DB) SetMysqlDB

func (db *DB) SetMysqlDB(mysqlDB string)

SetMysqlDB allows setting the MySQL database to use

func (*DB) SetMysqlPw

func (db *DB) SetMysqlPw(mysqlPw string)

SetMysqlPw allows setting the MySQL password to use

func (*DB) SetMysqlServer

func (db *DB) SetMysqlServer(mysqlServer string)

SetMysqlServer allows setting the MySQL server to use

func (*DB) SetMysqlUser

func (db *DB) SetMysqlUser(mysqlUser string)

SetMysqlUser allows setting the MySQL user to use

type InfluxDB

type InfluxDB struct {
	DBConnection *sql.DB
	// contains filtered or unexported fields
}

DB class to work with MySQL database

func (*InfluxDB) AddMetric

func (iDB *InfluxDB) AddMetric(name string, tags map[string]string, fields map[string]interface{}) error

func (*InfluxDB) Flush

func (iDB *InfluxDB) Flush()

func (*InfluxDB) New

func (iDB *InfluxDB) New(influxDBHost, influxDBDatabase, influxDBUser, influxDBPassword, appName, version string) error

New will create a database connection and return the sql.DB

func (*InfluxDB) Reconnect

func (iDB *InfluxDB) Reconnect() error

func (*InfluxDB) Stop

func (iDB *InfluxDB) Stop()

type RedisState

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

func (*RedisState) Delete

func (rS *RedisState) Delete() error

func (*RedisState) Get

func (rS *RedisState) Get(key string) string

func (*RedisState) HKeys

func (rS *RedisState) HKeys() []string

func (*RedisState) New

func (rS *RedisState) New(redis *redis.Client, identifier string)

func (*RedisState) Set

func (rS *RedisState) Set(key string, value string) error

func (*RedisState) SetM

func (rS *RedisState) SetM(set map[string]interface{}) error

Jump to

Keyboard shortcuts

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