dynamodb

package
v0.0.0-...-8ecda37 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2022 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustOpen

func MustOpen(dataSource string) store.TiddlerStore

MustOpen opens a dynamoDB store at storePath, creating tables if needed, and returns a TiddlerStore.

func NewDynamodbStore

func NewDynamodbStore(url string) *dynamodbStore

NewDynamodbStore requires an URL to the dynamoDB instance and returns an object which implements TiddlerStore

Types

type TiddlerData

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

TiddlerData is the structure representing the tiddler itself

func NewTiddlerData

func NewTiddlerData(store *dynamodbStore, tableName string) *TiddlerData

NewTiddlerData returns a pointer to a TiddlerData

func (*TiddlerData) CreateTable

func (t *TiddlerData) CreateTable() error

CreateTable creates the table in which the tiddlers should be stored in. If the table exists, then the method just returns with no error

func (*TiddlerData) Delete

func (t *TiddlerData) Delete(key string) error

Delete deletes a tiddler from the table

func (*TiddlerData) Put

func (t *TiddlerData) Put(tiddler store.Tiddler) (int, error)

Put creates a new tiddler and puts it into the table

type TiddlerHistory

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

TiddlerHistory is the DynamoDB table containing revisions

func NewTiddlerHistory

func NewTiddlerHistory(store *dynamodbStore, tableName string) *TiddlerHistory

NewTiddlerHistory returns a pointer to a TiddlerHistory object

func (*TiddlerHistory) CreateTable

func (t *TiddlerHistory) CreateTable() error

CreateTable creates the table in which the tiddlers history should be stored in. If the table exists, then the method just returns with no error

func (*TiddlerHistory) Delete

func (t *TiddlerHistory) Delete(key string, rev int) error

Delete deletes a tiddler revision

func (*TiddlerHistory) Put

func (t *TiddlerHistory) Put(tiddler store.Tiddler, rev int) (int, error)

Put creates a new tiddler revision and puts it into the table

type TiddlerRevision

type TiddlerRevision struct {
	Key      string
	Revision int
	Text     string
}

TiddlerRevision stores a revision of a tiddler

Jump to

Keyboard shortcuts

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