boltdb

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: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CacheSize gives the number of elements in LRU Cache
	CacheSize = 100
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ContentTypeStore

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

ContentTypeStore represents the content type store

func NewContentTypeStore

func NewContentTypeStore(db *storm.DB) *ContentTypeStore

NewContentTypeStore is the factory for ContentTypeStore

func (*ContentTypeStore) Delete

Delete removes a single contenttype

func (*ContentTypeStore) FindAll

func (s *ContentTypeStore) FindAll() ([]contenttype.ContentType, error)

FindAll returns a list of all content types

func (*ContentTypeStore) Get

Get return a single contenttype entry

func (*ContentTypeStore) Put

Put inserts or creates a new contenttype

type RecordStore

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

RecordStore is the store for records

func NewRecordStore

func NewRecordStore(db *storm.DB, cs *ContentTypeStore) *RecordStore

NewRecordStore creates a new recordstore

func (*RecordStore) Delete

func (s *RecordStore) Delete(r record.Record) error

Delete removes a single record and all revesions

func (*RecordStore) Get

func (s *RecordStore) Get(contentType, key string) (record.Record, error)

Get return a single record entry

func (*RecordStore) GetRevisions

func (s *RecordStore) GetRevisions(r record.Record) ([]record.Revision, error)

GetRevisions returns a list of revisions for a given record

func (*RecordStore) Put

func (s *RecordStore) Put(rec record.Record) error

Put inserts or creates a new contenttype

Jump to

Keyboard shortcuts

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