Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ERR_NO_EXIST = errors.New("Key doesn't exist") ERR_NO_PK = errors.New("No field is marked as primary key") ERR_INVALID_PK = errors.New("The field maked as pk is not a []byte or a string or is nil") ERR_MULTIPLE_PK = errors.New("Either one field can be marked as primary key or the GetPrimaryKey function returns one") ERR_NO_POINTER = errors.New("A pointer is required to unmarshal data into it") ERR_DATA_TYPE_MISMATCH = errors.New("Data stored and expected value in struct do not match") )
Functions ¶
func IsErrDuplicateKey ¶
func IsErrIndexExists ¶
Types ¶
type ChanRecord ¶
type ChanRecord struct {
Record interface{}
Error error
}
type DB ¶
type DB interface {
LinkRecordToDB(RecordObject) RecordObject
CreateNewRecord(RecordObject) error
DeleteRecord(RecordObject) (bool, error)
GetRecord([]byte, RecordObject) error
TouchRecord(RecordObject) error
ExistsRecord(r RecordObject) (bool, error)
ReplaceRecord(r RecordObject) error
ScanRecords(r RecordObject) chan ChanRecord
RegisterIndexes(r RecordObject) error
DeleteIndexes(r RecordObject) error
Search(RecordObject, string, string) chan ChanRecord
}
type Record ¶
type Record struct {
// contains filtered or unexported fields
}
func (Record) GetCreatedAt ¶
func (Record) GetExpiration ¶
func (Record) GetGeneration ¶
func (*Record) GetPrimaryKey ¶
func (Record) GetUpdatedAt ¶
func (*Record) SetExpiration ¶
type RecordObject ¶
type RecordObject interface {
Validate() error
// contains filtered or unexported methods
}
Click to show internal directories.
Click to hide internal directories.