readeef: github.com/urandom/readeef/content/repo/eventable Index | Files

package eventable

import "github.com/urandom/readeef/content/repo/eventable"

Index

Package Files

article.go bus.go feed.go service.go

Constants

const (
    FeedUpdateEvent  = "feed-update"
    FeedDeleteEvent  = "feed-delete"
    FeedSetTagsEvent = "feed-set-tags"
)
const (
    ArticleStateEvent = "article-state-change"
)

type ArticleStateData Uses

type ArticleStateData struct {
    User    content.Login          `json:"user"`
    State   string                 `json:"state"`
    Value   bool                   `json:"value"`
    Options map[string]interface{} `json:"options"`
}

func (ArticleStateData) UserLogin Uses

func (e ArticleStateData) UserLogin() content.Login

type Event Uses

type Event struct {
    Name string
    Data interface{}
}

type FeedData Uses

type FeedData interface {
    FeedID() content.FeedID
}

type FeedDeleteData Uses

type FeedDeleteData struct {
    Feed content.Feed
}

func (FeedDeleteData) FeedID Uses

func (f FeedDeleteData) FeedID() content.FeedID

func (FeedDeleteData) MarshalJSON Uses

func (f FeedDeleteData) MarshalJSON() ([]byte, error)

type FeedSetTagsData Uses

type FeedSetTagsData struct {
    Feed content.Feed
    User content.User
    Tags []*content.Tag
}

func (FeedSetTagsData) FeedID Uses

func (f FeedSetTagsData) FeedID() content.FeedID

func (FeedSetTagsData) MarshalJSON Uses

func (f FeedSetTagsData) MarshalJSON() ([]byte, error)

type FeedUpdateData Uses

type FeedUpdateData struct {
    Feed        content.Feed
    NewArticles []content.Article
}

func (FeedUpdateData) FeedID Uses

func (f FeedUpdateData) FeedID() content.FeedID

func (FeedUpdateData) MarshalJSON Uses

func (f FeedUpdateData) MarshalJSON() ([]byte, error)

type Service Uses

type Service struct {
    repo.Service
    // contains filtered or unexported fields
}

func NewService Uses

func NewService(ctx context.Context, s repo.Service, log log.Log) Service

func (Service) ArticleRepo Uses

func (s Service) ArticleRepo() repo.Article

func (Service) FeedRepo Uses

func (s Service) FeedRepo() repo.Feed

func (Service) Listener Uses

func (s Service) Listener() Stream

type Stream Uses

type Stream chan Event

type UserData Uses

type UserData interface {
    UserLogin() content.Login
}

Package eventable imports 5 packages (graph) and is imported by 3 packages. Updated 2018-01-02. Refresh now. Tools for package owners.