database

package
v0.0.0-...-03bec22 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InfluxDBConnect

func InfluxDBConnect(conf *InfluxDBConfig) (client.Client, error)

InfluxDBConnect - opens a connection to influxdb and returns the connection object

func MongoDBConnect

func MongoDBConnect(conf *MongoDBConfig) (*mongo.Database, error)

MongoDBConnect - opens a connection to mongodb and returns the connection object

Types

type InfluxDBConfig

type InfluxDBConfig struct {
	Host     string `json:"host" toml:"host" yaml:"host"`
	Database string `json:"database" toml:"database" yaml:"database"`
	Username string `json:"username" toml:"username" yaml:"username"`
	Password string `json:"password" toml:"password" yaml:"password"`
}

InfluxDBConfig - config entry describing a influxdb config

type MongoDBConfig

type MongoDBConfig struct {
	Hosts         []string `json:"hosts" toml:"hosts" yaml:"hosts"`
	AuthMechanism string   `json:"auth_mechanism" toml:"auth_mechanism" yaml:"auth_mechanism"`
	AuthSource    string   `json:"auth_source" toml:"auth_source" yaml:"auth_source"`
	Username      string   `json:"username" toml:"username" yaml:"username"`
	Password      string   `json:"password" toml:"password" yaml:"password"`
	Database      string   `json:"database" toml:"database" yaml:"database"`
}

MongoDBConfig - config entry describing a database config

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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