Documentation ¶
Index ¶
- type Store
- func (r *Store) ClearTable(baseTableName string, baseTableSuffix string, baseTenant string, ...) (err error)
- func (r *Store) Create(baseTableName string, baseTableSuffix string, baseTenant string, ...) (err error)
- func (r *Store) CreateTable(baseTableName string, _ string) (err error)
- func (r *Store) Delete(baseTableName string, baseTableSuffix string, baseTenant string, ...) (err error)
- func (r *Store) Get(baseTableName string, baseTableSuffix string, baseTenant string, ...) (res map[string][]byte, err error)
- func (r *Store) Query(baseTableName string, baseTableSuffix string, baseTenant string, ...) (res map[string][]byte, nextKeyStr string, err error)
- func (r *Store) Size(tableName string, baseTableSuffix string, baseTenant string, namespace string) (size int64, err error)
- func (r *Store) Update(baseTableName string, baseTableSuffix string, baseTenant string, ...) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store cache service
func NewDDBStore ¶
NewDDBStore constructor for DynamoDB table.
func (*Store) ClearTable ¶
func (r *Store) ClearTable( baseTableName string, baseTableSuffix string, baseTenant string, namespace string, ) (err error)
ClearTable removes all entries for tenant in table.
func (*Store) Create ¶
func (r *Store) Create( baseTableName string, baseTableSuffix string, baseTenant string, namespace string, id string, value []byte, expiration time.Duration) (err error)
Create adds a new item.
func (*Store) CreateTable ¶
CreateTable helper method creates DDB table.
func (*Store) Delete ¶
func (r *Store) Delete( baseTableName string, baseTableSuffix string, baseTenant string, namespace string, id string, ) (err error)
Delete removes existing item in DDB table.
func (*Store) Get ¶
func (r *Store) Get( baseTableName string, baseTableSuffix string, baseTenant string, namespace string, ids ...string, ) (res map[string][]byte, err error)
Get finds items by ids.
func (*Store) Query ¶
func (r *Store) Query( baseTableName string, baseTableSuffix string, baseTenant string, namespace string, predicate map[string]string, lastEvaluatedKeyStr string, limit int64, ) (res map[string][]byte, nextKeyStr string, err error)
Query searches items by predicates - not very optimal -- better use GSI in the future.
Click to show internal directories.
Click to hide internal directories.