Documentation ¶
Index ¶
- Constants
- func Connect(log logrus.FieldLogger, config *Config) (*mongo.Client, error)
- func ConnectWithOptions(log logrus.FieldLogger, replSet string, servers []string, opts ...Option) (*mongo.Client, error)
- func LoadCAFromFiles(cafiles []string) (*x509.CertPool, error)
- func LoadCAFromValue(ca string) (*x509.CertPool, error)
- func LoadCertFromFiles(certFile, keyFile string) (tls.Certificate, error)
- func LoadCertFromValues(certPEM, keyPEM string) (tls.Certificate, error)
- type Auth
- type Config
- type Option
- type TLSConfig
Constants ¶
View Source
const ( CollectionBlobs = "blobs" CollectionResellers = "resellers" CollectionUsers = "users" CollectionSubscriptions = "bb_subscriptions" CollectionSites = "projects" )
Variables ¶
This section is empty.
Functions ¶
func ConnectWithOptions ¶ added in v0.40.0
func LoadCAFromFiles ¶ added in v0.64.0
func LoadCertFromFiles ¶ added in v0.64.0
func LoadCertFromFiles(certFile, keyFile string) (tls.Certificate, error)
func LoadCertFromValues ¶ added in v0.64.0
func LoadCertFromValues(certPEM, keyPEM string) (tls.Certificate, error)
Types ¶
type Option ¶ added in v0.40.0
type Option func(opt *options.ClientOptions) error
func AuthOption ¶ added in v0.40.0
func ConnectionTimeout ¶ added in v0.40.0
func SecondaryPreferred ¶ added in v0.40.0
func SecondaryPreferred() Option
type TLSConfig ¶ added in v0.64.0
type TLSConfig struct { CAFiles []string `mapstructure:"ca_files" envconfig:"ca_files" json:"ca_files" yaml:"ca_files"` KeyFile string `mapstructure:"key_file" split_words:"true" json:"key_file" yaml:"key_file"` CertFile string `mapstructure:"cert_file" split_words:"true" json:"cert_file" yaml:"cert_file"` Cert string `mapstructure:"cert"` Key string `mapstructure:"key"` CA string `mapstructure:"ca"` Insecure bool `default:"false"` Enabled bool `default:"false"` }
Click to show internal directories.
Click to hide internal directories.