database

package
v1.1.14 Latest Latest
Warning

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

Go to latest
Published: May 16, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ping

func Ping(client *mongo.Client) bool

Types

type Client

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

func New

func New() *Client

func (*Client) Connect

func (self *Client) Connect() bool

func (*Client) Disconnect

func (self *Client) Disconnect() bool

func (*Client) Template

func (self *Client) Template() *Template

type DbTemplate

type DbTemplate struct {
	Uuid     string
	Name     string
	Json     string
	CreateAt string
	ImageId  string
}

type Namespace

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

type Template

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

func (*Template) Add

func (self *Template) Add(name, data, imageId string) error

func (*Template) Delete

func (self *Template) Delete(uuid string) error

func (*Template) Get

func (self *Template) Get(uuid string) (DbTemplate, error)

func (*Template) List

func (self *Template) List() []DbTemplate

func (*Template) Update

func (self *Template) Update(uuid, name, json string)

Jump to

Keyboard shortcuts

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