mongodb

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Provider

func Provider() *schema.Provider

Types

type ClientConfig added in v0.0.5

type ClientConfig struct {
	Host               string
	Port               string
	Username           string
	Password           string
	DB                 string
	Ssl                bool
	InsecureSkipVerify bool
	ReplicaSet         string
	Certificate        string
}

func (*ClientConfig) MongoClient added in v0.0.5

func (c *ClientConfig) MongoClient() (*mongo.Client, error)

type DbUser

type DbUser struct {
	Name     string `json:"name"`
	Password string `json:"password"`
}

type Privilege

type Privilege struct {
	Resource Resource `json:"resource"`
	Actions  []string `json:"actions"`
}

func (Privilege) String

func (privilege Privilege) String() string

type PrivilegeDto

type PrivilegeDto struct {
	Db         string   `json:"db"`
	Collection string   `json:"collection"`
	Actions    []string `json:"actions"`
}

type Resource

type Resource struct {
	Db         string `json:"db"`
	Collection string `json:"collection"`
}

func (Resource) String

func (resource Resource) String() string

type Role

type Role struct {
	Role string `json:"role"`
	Db   string `json:"db"`
}

func (Role) String

func (role Role) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳