storage

package
v0.0.0-...-b59ab19 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type A

type A struct {
	Id          bson.ObjectId `json:"id" bson:"_id"`
	Date        *time.Time    `json:"date,omitempty" bson:"date"`
	Price       float32       `json:"price" bson:"price"`
	Subject     string        `json:"subject,omitempty" bson:"subject"`
	Description string        `json:"description,omitempty" bson:"description"`
	Photo       []string      `json:"photo,omitempty" bson:"photo"`
}

type Storage

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

func New

func New(info *mgo.DialInfo) (*Storage, error)

func (*Storage) Close

func (s *Storage) Close()

func (*Storage) Search

func (s *Storage) Search(ids []string, fields []string, limit int, offset int, sorts []string) (interface{}, error)

func (*Storage) Store

func (s *Storage) Store(price float32, subject string, description string, photos []string) (interface{}, error)

Jump to

Keyboard shortcuts

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