mongodb

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	STANDARD_FORMAT    = "standard"
	DNSSEEDLIST_FORMAT = "mongodb+srv"
	GUI_OPTIONS        = "gui"
	URI_OPTIONS        = "uri"
)

Variables

View Source
var (
	CONNECTION_FORMAT = map[string]string{STANDARD_FORMAT: "mongodb", DNSSEEDLIST_FORMAT: "mongodb+srv"}
)

Functions

This section is empty.

Types

type AggregateContent

type AggregateContent struct {
	Aggregation string
	Options     string
}

type BulkWriteContent

type BulkWriteContent struct {
	Operations string
	Options    string
}

type CommandContent

type CommandContent struct {
	Document string
}

type Connector

type Connector struct {
	Resource Options
	Action   Query
}

func (*Connector) GetMetaInfo

func (m *Connector) GetMetaInfo(resourceOptions map[string]interface{}) (common.MetaInfoResult, error)

func (*Connector) Run

func (m *Connector) Run(resourceOptions map[string]interface{}, actionOptions map[string]interface{}) (common.RuntimeResult, error)

func (*Connector) TestConnection

func (m *Connector) TestConnection(resourceOptions map[string]interface{}) (common.ConnectionResult, error)

func (*Connector) ValidateActionOptions

func (m *Connector) ValidateActionOptions(actionOptions map[string]interface{}) (common.ValidateResult, error)

func (*Connector) ValidateResourceOptions

func (m *Connector) ValidateResourceOptions(resourceOptions map[string]interface{}) (common.ValidateResult, error)

type CountContent

type CountContent struct {
	Query string
}

type DeleteManyContent

type DeleteManyContent struct {
	Filter string
}

type DeleteOneContent

type DeleteOneContent struct {
	Filter string
}

type DistinctContent

type DistinctContent struct {
	Query   string
	Field   string
	Options string
}

type FindContent

type FindContent struct {
	Query      string
	Projection string
	SortBy     string
	Limit      string
	Skip       string
}

type FindOneAndUpdateContent

type FindOneAndUpdateContent struct {
	Filter  string
	Update  string
	Options string
}

type FindOneContent

type FindOneContent struct {
	Query      string
	Projection string
	Skip       string
}

type GUIOptions

type GUIOptions struct {
	Host             string `validate:"required"`
	ConnectionFormat string `validate:"required,oneof=standard mongodb+srv"`
	Port             string `validate:"required_unless=ConnectionFormat mongodb+srv"`
	DatabaseName     string
	DatabaseUsername string
	DatabasePassword string
}

type InsertManyContent

type InsertManyContent struct {
	Document string
}

type InsertOneContent

type InsertOneContent struct {
	Document string
}

type ListCollectionsContent

type ListCollectionsContent struct {
	Query string
}

type Options

type Options struct {
	ConfigType    string                 `validate:"required,oneof=gui uri"`
	ConfigContent map[string]interface{} `validate:"required"`
	SSL           SSLOptions             `validate:"required"`
}

type Query

type Query struct {
	ActionType  string `validate:"required"`
	Collection  string
	TypeContent map[string]interface{} `validate:"required"`
}

type QueryRunner

type QueryRunner struct {
	// contains filtered or unexported fields
}

type SSLOptions

type SSLOptions struct {
	Open   bool
	Client string
	CA     string
}

type URIOptions

type URIOptions struct {
	URI string `validate:"required"`
}

type UpdateManyContent

type UpdateManyContent struct {
	Filter  string
	Update  string
	Options string
}

type UpdateOneContent

type UpdateOneContent struct {
	Filter  string
	Update  string
	Options string
}

Jump to

Keyboard shortcuts

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