Back to

Package eventable

Latest Go to latest

The latest major version is .

Published: Jul 8, 2020 | License: LGPL-3.0 | Module:



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

type ArticleStateData

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

func (e ArticleStateData) UserLogin() content.Login

type Event

type Event struct {
	Name string
	Data interface{}

type FeedData

type FeedData interface {
	FeedID() content.FeedID

type FeedDeleteData

type FeedDeleteData struct {
	Feed content.Feed

func (FeedDeleteData) FeedID

func (f FeedDeleteData) FeedID() content.FeedID

func (FeedDeleteData) MarshalJSON

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

type FeedSetTagsData

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

func (FeedSetTagsData) FeedID

func (f FeedSetTagsData) FeedID() content.FeedID

func (FeedSetTagsData) MarshalJSON

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

type FeedUpdateData

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

func (FeedUpdateData) FeedID

func (f FeedUpdateData) FeedID() content.FeedID

func (FeedUpdateData) MarshalJSON

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

type Service

type Service struct {
	// contains filtered or unexported fields

func NewService

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

func (Service) ArticleRepo

func (s Service) ArticleRepo() repo.Article

func (Service) FeedRepo

func (s Service) FeedRepo() repo.Feed

func (Service) Listener

func (s Service) Listener() Stream

type Stream

type Stream chan Event

type UserData

type UserData interface {
	UserLogin() content.Login

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier