storage

package
v0.0.0-...-8da9279 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(up, down MigrationFunc)

Types

type A

type A []interface{}

type Cursor

type Cursor interface {
	Next(interface{}) bool
	Close() error
	Done() bool
	Err() error
}

type Migration

type Migration struct {
	Id      int `bson:"_id"`
	Notes   string
	Applied time.Time
	// contains filtered or unexported fields
}

func (Migration) Down

func (m Migration) Down(db *mgo.Database) (err error)

func (Migration) Up

func (m Migration) Up(db *mgo.Database) (err error)

type MigrationFunc

type MigrationFunc func(db *mgo.Database) error

type Mongo

type Mongo mgo.DialInfo

func (*Mongo) Info

func (m *Mongo) Info() *mgo.DialInfo

type Products

type Products interface {
	Push(string, float64) (int, error)
	Table
}

type Storage

type Storage struct {
	*Mongo
	// contains filtered or unexported fields
}

func (*Storage) Products

func (s *Storage) Products() Products

func (*Storage) Start

func (s *Storage) Start(id uint32) (err error)

func (*Storage) Stop

func (s *Storage) Stop()

type Table

type Table interface {
	List(limit, offset uint32, sort []string) Cursor
}

Jump to

Keyboard shortcuts

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