st

package
v0.0.0-...-f7687f2 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//DB DB
	DB = "im"
	//TableMessage TableMessage
	TableMessage = "message"
	//TableSeq TableSeq
	TableSeq = "message_seq"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MongoStorage

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

MongoStorage MongoStorage

func NewMongoStorage

func NewMongoStorage(url string) *MongoStorage

NewMongoStorage NewMongoStorage

func (*MongoStorage) Fetch

func (s *MongoStorage) Fetch(topicID string, minSID int64, maxCount int64) ([]*pr.Message, int64, error)

Fetch Fetch

func (*MongoStorage) Store

func (s *MongoStorage) Store(message *pr.Message) (isNew bool, err error)

Store Store

type Storage

type Storage interface {
	Store(message *pr.Message) (isNew bool, err error)
	Fetch(topicID string, minSID int64, maxCount int64) ([]*pr.Message, int64, error)
}

Storage Storage

type StorageImpl

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

StorageImpl StorageImpl

func NewStorageImpl

func NewStorageImpl() *StorageImpl

NewStorageImpl NewStorageImpl

func (*StorageImpl) Fetch

func (s *StorageImpl) Fetch(topicID string, minSID int64, maxCount int64) ([]*pr.Message, int64, error)

Fetch Fetch

func (*StorageImpl) Store

func (s *StorageImpl) Store(message *pr.Message) (isNew bool, err error)

Store Store

Jump to

Keyboard shortcuts

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