storages

package
v0.0.0-...-7b7cc06 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MongoStorage

type MongoStorage struct {
	DialInfo      *mgo.DialInfo
	Configuration *MongoStorageConfiguration
	// contains filtered or unexported fields
}

func (*MongoStorage) Close

func (mongoStorage *MongoStorage) Close() (bool, error)

func (*MongoStorage) Initialize

func (mongoStorage *MongoStorage) Initialize() error

<editor-fold desc="MongoStorage Storage methods">

func (*MongoStorage) LoadStorageEntry

func (mongoStorage *MongoStorage) LoadStorageEntry(id string) (bool, error, sharexhandler.Entry)

func (*MongoStorage) NewStorageEntry

func (mongoStorage *MongoStorage) NewStorageEntry() sharexhandler.Entry

type MongoStorageConfiguration

type MongoStorageConfiguration struct {
	// Database name where the upload collection is created
	DatabaseName string
	// Name of the upload collection
	UploadCollectionName string
	// The folder path has to end with a slash ("/") so the files can be read correctly
	FileFolderPath string
}

type MongoStorageEntry

type MongoStorageEntry struct {
	Id           bson.ObjectId `bson:"_id,omitempty"`
	Author       string        `bson:"author,omitempty"`
	Filename     string        `bson:"filename,omitempty"`
	ContentType  string        `bson:"content_type,omitempty"`
	LastModified time.Time     `bson:"last_modified,omitempty"`
	UploadDate   time.Time     `bson:"upload_date,omitempty"`
	// contains filtered or unexported fields
}

func (*MongoStorageEntry) Delete

func (mongoStorageEntry *MongoStorageEntry) Delete() error

func (*MongoStorageEntry) GetAuthor

func (mongoStorageEntry *MongoStorageEntry) GetAuthor() string

func (*MongoStorageEntry) GetContentType

func (mongoStorageEntry *MongoStorageEntry) GetContentType() string

func (*MongoStorageEntry) GetFilename

func (mongoStorageEntry *MongoStorageEntry) GetFilename() string

func (*MongoStorageEntry) GetId

func (mongoStorageEntry *MongoStorageEntry) GetId() string

<editor-fold desc="MongoStorageEntry Getter and Setter methods">

func (*MongoStorageEntry) GetLastModifiedValue

func (mongoStorageEntry *MongoStorageEntry) GetLastModifiedValue() time.Time

func (*MongoStorageEntry) GetReadSeeker

func (mongoStorageEntry *MongoStorageEntry) GetReadSeeker() (io.ReadSeeker, error)

func (*MongoStorageEntry) GetUploadDate

func (mongoStorageEntry *MongoStorageEntry) GetUploadDate() time.Time

func (*MongoStorageEntry) GetWriter

func (mongoStorageEntry *MongoStorageEntry) GetWriter() (io.WriteCloser, error)

func (*MongoStorageEntry) Save

func (mongoStorageEntry *MongoStorageEntry) Save() error

<editor-fold desc="MongoStorageEntry Storage methods">

func (*MongoStorageEntry) SetAuthor

func (mongoStorageEntry *MongoStorageEntry) SetAuthor(author string)

func (*MongoStorageEntry) SetContentType

func (mongoStorageEntry *MongoStorageEntry) SetContentType(contentType string)

func (*MongoStorageEntry) SetFilename

func (mongoStorageEntry *MongoStorageEntry) SetFilename(filename string)

func (*MongoStorageEntry) SetLastModifiedValue

func (mongoStorageEntry *MongoStorageEntry) SetLastModifiedValue(lastModified time.Time)

func (*MongoStorageEntry) SetUploadDate

func (mongoStorageEntry *MongoStorageEntry) SetUploadDate(uploadDate time.Time)

func (*MongoStorageEntry) Update

func (mongoStorageEntry *MongoStorageEntry) Update() error

Jump to

Keyboard shortcuts

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