connection

package
v0.1.54 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base struct {
	Environment      string `yaml:"environment"`
	Username         string `yaml:"username"`
	Password         string `yaml:"password"`
	Host             string `yaml:"host"`
	Port             string `yaml:"port"`
	AuthDatabase     string `yaml:"authdatabase"`
	Tls              bool   `yaml:"tls"`
	Protocol         string `yaml:"protocol"`
	AuthMechanism    string `yaml:"authmechanism"`
	ReadPreference   string `yaml:"readpreference"`
	DirectConnection bool   `yaml:"directbection"`
	Debug            bool   `yaml:"debug"`
}

Connection, Databases access data

func New

func New(name string) (*Base, error)

GetConnection, Databases access data predefined

func (*Base) Env

func (b *Base) Env() string

func (*Base) GetClientOpt

func (b *Base) GetClientOpt(debug bool) *options.ClientOptions

func (*Base) GetUri

func (b *Base) GetUri() (string, options.Credential)

getUri, return (Uri, Credentials)

Jump to

Keyboard shortcuts

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