db

package
v0.0.0-...-1db3b71 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2023 License: GPL-3.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 Connection

type Connection struct {
	Scheme         string
	Username       string
	Password       string
	ClusterName    string
	ServerEndpoint string
	Client         *mongo.Client
	DBName         string
}

func New

func New(scheme string, user string, passwd string, clusterName string, serverEndpoint string, dbName string) *Connection

func (*Connection) Connect

func (c *Connection) Connect() *Connection

func (*Connection) Disconnect

func (c *Connection) Disconnect() bool

func (*Connection) InsertNewTask

func (c *Connection) InsertNewTask(myTask Task) error

func (*Connection) PingDB

func (c *Connection) PingDB() bool

type Task

type Task struct {
	ID          primitive.ObjectID `bson:"_id,omitempty"`
	Tag         string             `bson:"tag"`
	Summary     string             `bson:"summary"`
	Comments    []string           `bson:"comments"`
	CreatedAt   time.Time          `bson:"createdAt"`
	LastUpdated time.Time          `bson:"lastUpdated"`
}

Jump to

Keyboard shortcuts

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