mongo

package
v0.2.4-0...-bb5b233 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2017 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FileSystemCollection = "bfs"
	CounterCollection    = "bfs_counters"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BytesHeader

type BytesHeader struct {
	Filepointer string `bson:"filepointer"`
	Mime        string `bson:"mime"`
	Size        int64  `bson:"size"`
}

BFS Bytes Header

type Config

type Config struct {
	Addresses    []string      `json:"addresses"`
	Timeout      time.Duration `json:"timeout"`
	AuthDatabase string        `json:"authdb"`
	Username     string        `json:"username"`
	Password     string        `json:"password"`
}

type CounterItem

type CounterItem struct {
	Name  string `json:"name"`
	Value int64  `json:"value"`
}

type Directory

type Directory struct {
	Header NodeHeader `bson:"__header__"`
	Id     string     `bson:"_id"`
}

BFS Directory

type File

type File struct {
	Header  NodeHeader             `bson:"__header__"`
	AHeader BytesHeader            `bson:"__bytes__"`
	Id      string                 `bson:"_id"`
	Content map[string]interface{} `bson:"content"`
}

BFS File

type FileSystem

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

func NewFileSystem

func NewFileSystem() *FileSystem

func (*FileSystem) BQLSearch

func (m *FileSystem) BQLSearch(db string, query map[string]interface{}) (interface{}, error)

func (*FileSystem) BQLSet

func (m *FileSystem) BQLSet(db string, query map[string]interface{}) (int, error)

func (*FileSystem) BQLUnset

func (m *FileSystem) BQLUnset(db string, query map[string]interface{}) (int, error)

func (*FileSystem) ClearAll

func (m *FileSystem) ClearAll() ([]string, error)

func (*FileSystem) Copy

func (m *FileSystem) Copy(from, to, db string) error

func (*FileSystem) CreateDatabase

func (m *FileSystem) CreateDatabase(db string) error

func (*FileSystem) Delete

func (m *FileSystem) Delete(p, db string) error

func (*FileSystem) DeleteBytes

func (m *FileSystem) DeleteBytes(p, db string) error

func (*FileSystem) DirectAccess

func (m *FileSystem) DirectAccess(fp, db, layer string) (map[string]interface{}, string, error)

func (*FileSystem) DropDatabase

func (m *FileSystem) DropDatabase(db string) error

func (*FileSystem) FileAccess

func (m *FileSystem) FileAccess(p, db string, protect bool) error

func (*FileSystem) Info

func (m *FileSystem) Info(p, db string) (map[string]interface{}, error)

func (*FileSystem) ListCounter

func (m *FileSystem) ListCounter(filter, db string) (map[string]int64, error)

func (*FileSystem) ListDatabase

func (m *FileSystem) ListDatabase(filter string) ([]string, error)

func (*FileSystem) ListDir

func (m *FileSystem) ListDir(p, filter, db string) (map[string][]string, error)

func (*FileSystem) Move

func (m *FileSystem) Move(from, to, db string) error

func (*FileSystem) NewDir

func (m *FileSystem) NewDir(p, db string) error

func (*FileSystem) NewFile

func (m *FileSystem) NewFile(p, db string, j map[string]interface{}) error

func (*FileSystem) ReadBytes

func (m *FileSystem) ReadBytes(fp, db string) (string, error)

func (*FileSystem) ReadJson

func (m *FileSystem) ReadJson(p, db string, fields []string) (interface{}, error)

func (*FileSystem) Rename

func (m *FileSystem) Rename(p, newname, db string) error

func (*FileSystem) SetCounter

func (m *FileSystem) SetCounter(counter, action string, value int64, db string) (int64, error)

func (*FileSystem) Start

func (m *FileSystem) Start(config string, b *bytengine.ByteStore) error

func (*FileSystem) UpdateJson

func (m *FileSystem) UpdateJson(p, db string, j map[string]interface{}) error

func (*FileSystem) WriteBytes

func (m *FileSystem) WriteBytes(p, ap, db string) (int64, error)

type NodeHeader

type NodeHeader struct {
	Name     string `bson:"name"`
	Type     string `bson:"type"`
	IsPublic bool   `bson:"ispublic"`
	Created  string `bson:"created"`
	Parent   string `bson:"parent"`
}

BFS Node Header

type SimpleResultItem

type SimpleResultItem struct {
	Header  NodeHeader  `bson:"__header__"`
	AHeader BytesHeader `bson:"__bytes__"`
	Id      string      `bson:"_id"`
}

Jump to

Keyboard shortcuts

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