Documentation ¶
Overview ¶
Package influxdb includes InfluxDB implementation of Gnomock Preset interface. This Preset can be passed to gnomock.Start() function to create a configured InfluxDB container to use in tests.
Currently this preset only supports InfluxDB 2.x. If you are interested in earlier versions, please consider opening an issue.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
type Option func(*P)
Option is an optional configuration of this Gnomock preset. Use available Options to configure the container.
func WithAuthToken ¶
WithAuthToken sets authentication token to be used to connect to this container.
func WithBucket ¶
WithBucket sets the initial bucket name for this container.
type P ¶
type P struct { Version string `json:"version"` Username string `json:"username"` Password string `json:"password"` Org string `json:"org"` Bucket string `json:"bucket"` AuthToken string `json:"auth_token"` }
P is a Gnomock Preset implementation for InfluxDB.
func (*P) Ports ¶
func (p *P) Ports() gnomock.NamedPorts
Ports returns ports that should be used to access this container.