m

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 License: Apache-2.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 Connector

type Connector struct {
	Name     string          `json:"name,omitempty"`
	Version  string          `json:"version,omitempty"`
	Options  Options         `json:"options"`
	Client   *mongo.Client   `json:"-"`
	Database *mongo.Database `json:"-"`
	// contains filtered or unexported fields
}

Connector the ConnectorDB struct

func (*Connector) ID

func (m *Connector) ID() string

ID get connector id

func (*Connector) Is

func (m *Connector) Is(typ int) bool

Is the connections from dsl

func (*Connector) Register

func (m *Connector) Register(file string, id string, dsl []byte) error

Register the connections from dsl

type Host

type Host struct {
	Host string `json:"host,omitempty"`
	Port string `json:"port,omitempty"`
	User string `json:"user,omitempty"`
	Pass string `json:"pass,omitempty"`
}

Host the connection host

type Options

type Options struct {
	DB      string                 `json:"db"`
	Timeout int                    `json:"timeout,omitempty"`
	Hosts   []Host                 `json:"hosts"`
	Params  map[string]interface{} `json:"params"`
	// contains filtered or unexported fields
}

Options the connetion options

Jump to

Keyboard shortcuts

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