redis

package
v0.0.0-...-ba21cce Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UnmarshalJSONItem

func UnmarshalJSONItem(js []byte) (web.Item, error)

UnmarshalJSONItem unmarshals a JSON payload into an item depending on whether the item is a message or a thread

Types

type RedisControllerStore

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

func NewRedisControllerStore

func NewRedisControllerStore(host string) (*RedisControllerStore, error)

func (*RedisControllerStore) Add

func (rcs *RedisControllerStore) Add(botID web.BotID) error

func (*RedisControllerStore) Get

func (rcs *RedisControllerStore) Get(botID web.BotID) (web.ItemStore, error)

func (*RedisControllerStore) Remove

func (rcs *RedisControllerStore) Remove(botID web.BotID) error

type RedisConversationStore

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

func NewRedisConversationStore

func NewRedisConversationStore(host string) (*RedisConversationStore, error)

func (*RedisConversationStore) Active

func (cs *RedisConversationStore) Active(botid web.BotID) (id, state string, err error)

func (*RedisConversationStore) End

func (cs *RedisConversationStore) End(botid web.BotID) error

func (*RedisConversationStore) GetData

func (cs *RedisConversationStore) GetData(botid web.BotID, key string) (string, error)

func (*RedisConversationStore) IsActive

func (cs *RedisConversationStore) IsActive(botid web.BotID) bool

func (*RedisConversationStore) SetData

func (cs *RedisConversationStore) SetData(botid web.BotID, key, value string) error

func (*RedisConversationStore) SetState

func (cs *RedisConversationStore) SetState(botid web.BotID, state string) error

func (*RedisConversationStore) Start

func (cs *RedisConversationStore) Start(botid web.BotID, id string) error

type RedisItemStore

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

func (*RedisItemStore) Add

func (is *RedisItemStore) Add(item web.Item) error

func (*RedisItemStore) Get

func (is *RedisItemStore) Get(id, threadID web.ItemID) (web.Item, error)

func (*RedisItemStore) Last

func (is *RedisItemStore) Last(n int64, thread web.ItemID) (items []web.Item, err error)

func (*RedisItemStore) Update

func (is *RedisItemStore) Update(item web.Item) error

Jump to

Keyboard shortcuts

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