mongo

package
v0.0.0-...-a529c89 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Contact

type Contact struct {
	Name    string
	Email   string
	Account string
}

Contact object is saved into DB

type MongoDB

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

func (*MongoDB) Close

func (m *MongoDB) Close()

close the db session

func (*MongoDB) LastDate

func (m *MongoDB) LastDate() (string, error)

LastDate retrieves the last message date that was processed

func (*MongoDB) NewMongo

func (m *MongoDB) NewMongo(server string, db string, accountName string) error

creates a new mongo DB connection

func (*MongoDB) SetContact

func (m *MongoDB) SetContact(name string, email string) error

SetContact saves contact in DB

func (*MongoDB) SetLastDate

func (m *MongoDB) SetLastDate(lastSaved string) error

SetLastDate sets the last message date that was processed

type Setting

type Setting struct {
	ID      bson.ObjectId `bson:"_id,omitempty"`
	Saved   string
	Account string
}

Settings represnts a setings table

Jump to

Keyboard shortcuts

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