notifications

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2016 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(client *rpc.Client, db *mgo.Database) (*blockfetcher.Context, error)

Types

type BlockProcessor

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

func New

func New(client *rpc.Client, db *mgo.Database) (*BlockProcessor, error)

func (*BlockProcessor) BlockRange

func (processor *BlockProcessor) BlockRange() (from, to uint32)

func (*BlockProcessor) DispatchCommentPublishedEvent

func (processor *BlockProcessor) DispatchCommentPublishedEvent(userId string, event *events.CommentPublished)

func (*BlockProcessor) DispatchCommentVotedEvent

func (processor *BlockProcessor) DispatchCommentVotedEvent(userId string, event *events.CommentVoted)

func (*BlockProcessor) DispatchStoryPublishedEvent

func (processor *BlockProcessor) DispatchStoryPublishedEvent(userId string, event *events.StoryPublished)

func (*BlockProcessor) DispatchStoryVotedEvent

func (processor *BlockProcessor) DispatchStoryVotedEvent(userId string, event *events.StoryVoted)

func (*BlockProcessor) DispatchUserMentionedEvent added in v0.2.0

func (processor *BlockProcessor) DispatchUserMentionedEvent(userId string, event *events.UserMentioned)

func (*BlockProcessor) Finalize

func (processor *BlockProcessor) Finalize() error

func (*BlockProcessor) HandleCommentPublishedEvent

func (processor *BlockProcessor) HandleCommentPublishedEvent(event *events.CommentPublished) error

func (*BlockProcessor) HandleCommentVotedEvent

func (processor *BlockProcessor) HandleCommentVotedEvent(event *events.CommentVoted) error

func (*BlockProcessor) HandleStoryPublishedEvent

func (processor *BlockProcessor) HandleStoryPublishedEvent(event *events.StoryPublished) error

func (*BlockProcessor) HandleStoryVotedEvent

func (processor *BlockProcessor) HandleStoryVotedEvent(event *events.StoryVoted) error

func (*BlockProcessor) HandleUserMentionedEvent added in v0.2.0

func (processor *BlockProcessor) HandleUserMentionedEvent(event *events.UserMentioned) error

func (*BlockProcessor) ProcessBlock

func (processor *BlockProcessor) ProcessBlock(block *rpc.Block) error

type BlockProcessorConfig

type BlockProcessorConfig struct {
	NextBlockNum uint32 `bson:"nextBlockNum"`
}

type EventMiner

type EventMiner interface {
	MineEvent(*rpc.Operation, *rpc.Content) (events []interface{})
}

type Notifier

type Notifier interface {
	DispatchUserMentionedEvent(userId string, userSettings bson.Raw, event *events.UserMentioned) error
	DispatchStoryPublishedEvent(userId string, userSettings bson.Raw, event *events.StoryPublished) error
	DispatchStoryVotedEvent(userId string, userSettings bson.Raw, event *events.StoryVoted) error
	DispatchCommentPublishedEvent(userId string, userSettings bson.Raw, event *events.CommentPublished) error
	DispatchCommentVotedEvent(userId string, userSettings bson.Raw, event *events.CommentVoted) error
}

type NotifierDoc

type NotifierDoc struct {
	NotifierId string   `bson:"notifierId"`
	Settings   bson.Raw `bson:"settings"`
}

Directories

Path Synopsis
notifiers

Jump to

Keyboard shortcuts

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