ddb

package
v0.0.0-...-5a6395a Latest Latest
Warning

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

Go to latest
Published: May 4, 2020 License: Unlicense Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalKey

func MarshalKey(chatID int64) map[string]*dynamodb.AttributeValue

func MarshalMap

func MarshalMap(in interface{}) map[string]*dynamodb.AttributeValue

Types

type DDBChatStateMap

type DDBChatStateMap struct {
	*dynamodb.DynamoDB
	Table string
}

func NewDDBChatStateMap

func NewDDBChatStateMap(table string) DDBChatStateMap

func (DDBChatStateMap) Get

func (ddb DDBChatStateMap) Get(chatID int64) (*chatstate.ChatState, func())

func (DDBChatStateMap) Unlock

func (ddb DDBChatStateMap) Unlock(chatID int64, cs *chatstate.ChatState)

type DDBChatStateMapItem

type DDBChatStateMapItem struct {
	ID      int64
	Expired time.Time `dynamodbav:",unixtime"` // Time at which DDB can erase this item.
	Locked  time.Time `dynamodbav:",unixtime"` // Time until which this item is locked by the handler, or 0.
	CS      []byte
}

Jump to

Keyboard shortcuts

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