storage

package
v0.0.0-...-fac03c6 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2016 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoltManager

type BoltManager struct {
	ORM *storm.DB
	// contains filtered or unexported fields
}

BoltManager is the Manager for the Key-Value-Store Boltdb

func NewBoltManager

func NewBoltManager() *BoltManager

NewBoltManager is the factore method for BoltManager

func (*BoltManager) BackupDownload

func (m *BoltManager) BackupDownload(resp engine.Response) error

BackupDownload creates a download of the database file

func (*BoltManager) ContentType

func (m *BoltManager) ContentType() ContentTypeManager

ContentType returns stats for the database

func (*BoltManager) GetStats

func (m *BoltManager) GetStats() interface{}

GetStats returns stats for the database

func (*BoltManager) Record

func (m *BoltManager) Record() RecordManager

Record holds the rocerd manager

type ContentTypeManager

type ContentTypeManager interface {
	// Put inserts or creates a new contenttype
	Put(contenttype.ContentType) error

	// Get return a single contenttype entry
	Get(key string) (contenttype.ContentType, error)

	// Delete removes a single contenttype
	Delete(contenttype.ContentType) error

	// FindAll returns the complete list of all content types
	FindAll() ([]contenttype.ContentType, error)
}

ContentTypeManager interface to store contenttypes in storage

type Manager

type Manager interface {
	// Record holds the rocerd manager
	Record() RecordManager

	// ContentType holds the contenttype manager
	ContentType() ContentTypeManager

	// GetStats returns an interface which then will get json encoded for output
	GetStats() interface{}

	// BackupDownload writes to a given response
	BackupDownload(engine.Response) error
}

Manager interface for storage

func NewManager

func NewManager(c *config.Config) (Manager, error)

NewManager is the factory method to create the storage manager from config

type RecordManager

type RecordManager interface {
	// Put inserts or creates a new record
	Put(record.Record) error

	// Get return a single record entry
	Get(contentType, key string) (record.Record, error)

	// GetRevisions returns a list of revisions for a given record
	GetRevisions(record.Record) ([]record.Revision, error)

	// Delete removes a single record
	Delete(record.Record) error
}

RecordManager interface to store records in storage

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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