events

package
v1.4.6 Latest Latest
Warning

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

Go to latest
Published: May 15, 2019 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	E_COLLECTION_CREATE               = "COLLECTION_CREATE"
	E_COLLECTION_UPDATE               = "COLLECTION_UPDATE"
	E_COLLECTION_DELETE               = "COLLECTION_DELETE"
	E_COLLECTION_PUBLISHED_CHANGE     = "COLLECTION_PUBLISHED_CHANGE"
	E_COLLECTION_CONTENT_UNITS_CHANGE = "COLLECTION_CONTENT_UNITS_CHANGE"

	E_CONTENT_UNIT_CREATE             = "CONTENT_UNIT_CREATE"
	E_CONTENT_UNIT_UPDATE             = "CONTENT_UNIT_UPDATE"
	E_CONTENT_UNIT_DELETE             = "CONTENT_UNIT_DELETE"
	E_CONTENT_UNIT_PUBLISHED_CHANGE   = "CONTENT_UNIT_PUBLISHED_CHANGE"
	E_CONTENT_UNIT_DERIVATIVES_CHANGE = "CONTENT_UNIT_DERIVATIVES_CHANGE"
	E_CONTENT_UNIT_SOURCES_CHANGE     = "CONTENT_UNIT_SOURCES_CHANGE"
	E_CONTENT_UNIT_TAGS_CHANGE        = "CONTENT_UNIT_TAGS_CHANGE"
	E_CONTENT_UNIT_PERSONS_CHANGE     = "CONTENT_UNIT_PERSONS_CHANGE"
	E_CONTENT_UNIT_PUBLISHERS_CHANGE  = "CONTENT_UNIT_PUBLISHERS_CHANGE"

	E_FILE_UPDATE    = "FILE_UPDATE"
	E_FILE_PUBLISHED = "FILE_PUBLISHED"
	E_FILE_INSERT    = "FILE_INSERT"
	E_FILE_REPLACE   = "FILE_REPLACE"
	E_FILE_REMOVE    = "FILE_REMOVE"

	E_SOURCE_CREATE = "SOURCE_CREATE"
	E_SOURCE_UPDATE = "SOURCE_UPDATE"

	E_TAG_CREATE = "TAG_CREATE"
	E_TAG_UPDATE = "TAG_UPDATE"

	E_PERSON_CREATE = "PERSON_CREATE"
	E_PERSON_UPDATE = "PERSON_UPDATE"
	E_PERSON_DELETE = "PERSON_DELETE"

	E_PUBLISHER_CREATE = "PUBLISHER_CREATE"
	E_PUBLISHER_UPDATE = "PUBLISHER_UPDATE"

	E_BLOG_POST_CREATE = "BLOG_POST_CREATE"
	E_BLOG_POST_UPDATE = "BLOG_POST_UPDATE"
	E_BLOG_POST_DELETE = "BLOG_POST_DELETE"

	E_TWEET_CREATE = "TWEET_CREATE"
	E_TWEET_UPDATE = "TWEET_UPDATE"
	E_TWEET_DELETE = "TWEET_DELETE"
)

Variables

This section is empty.

Functions

func AssetsAPI added in v0.7.0

func AssetsAPI(path string, uid string)

AssetsAPI sends request to unzip api by file UID

func BlogPostCreate added in v1.1.8

func BlogPostCreate(d Data)

func BlogPostDelete added in v1.1.8

func BlogPostDelete(d Data)

func BlogPostUpdate added in v1.1.8

func BlogPostUpdate(d Data)

func CollectionContentUnitsChange

func CollectionContentUnitsChange(d Data)

func CollectionCreate

func CollectionCreate(d Data)

func CollectionDelete

func CollectionDelete(d Data)

func CollectionPublishedChange

func CollectionPublishedChange(d Data)

func CollectionUpdate

func CollectionUpdate(d Data)

func ContentUnitCreate

func ContentUnitCreate(d Data)

func ContentUnitDelete

func ContentUnitDelete(d Data)

func ContentUnitDerivativesChange

func ContentUnitDerivativesChange(d Data)

func ContentUnitPersonsChange

func ContentUnitPersonsChange(d Data)

func ContentUnitPublishedChange

func ContentUnitPublishedChange(d Data)

func ContentUnitPublishersChange

func ContentUnitPublishersChange(d Data)

func ContentUnitSourcesChange

func ContentUnitSourcesChange(d Data)

func ContentUnitTagsChange

func ContentUnitTagsChange(d Data)

func ContentUnitUpdate

func ContentUnitUpdate(d Data)

func FileInsert

func FileInsert(d Data)

func FilePublished

func FilePublished(d Data)

func FileReplace

func FileReplace(d Data)

func FileUpdate

func FileUpdate(d Data)

func PersonCreate

func PersonCreate(d Data)

func PersonDelete

func PersonDelete(d Data)

func PersonUpdate

func PersonUpdate(d Data)

func PublisherCreate

func PublisherCreate(d Data)

func PublisherUpdate

func PublisherUpdate(d Data)

func RemoveFile added in v0.7.0

func RemoveFile(uid string)

RemoveFile to send post req to file-api and remove file from search?

func RunListener

func RunListener()

func SourceCreate

func SourceCreate(d Data)

func SourceUpdate

func SourceUpdate(d Data)

func TagCreate

func TagCreate(d Data)

func TagUpdate

func TagUpdate(d Data)

func TweetCreate added in v1.1.8

func TweetCreate(d Data)

func TweetDelete added in v1.1.8

func TweetDelete(d Data)

func TweetUpdate added in v1.1.8

func TweetUpdate(d Data)

func WaitTimeout added in v0.7.0

func WaitTimeout(wg *sync.WaitGroup, timeout time.Duration) bool

WaitTimeout does a Wait on a sync.WaitGroup object but with a specified timeout. Returns true if the wait completed without timing out, false otherwise.

Types

type Data

type Data struct {
	ID                  string                 `json:"id"`
	Type                string                 `json:"type"`
	ReplicationLocation string                 `json:"rloc"`
	Payload             map[string]interface{} `json:"payload"`
}

Data struct for unmarshaling data from nats

type FileBackendRequest added in v0.7.0

type FileBackendRequest struct {
	SHA1 string `json:"sha1"`
	Name string `json:"name"`
}

type IndexerQueue added in v0.7.0

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

func (*IndexerQueue) Close added in v0.7.0

func (q *IndexerQueue) Close()

func (*IndexerQueue) Enqueue added in v0.7.0

func (q *IndexerQueue) Enqueue(task WorkTask)

func (*IndexerQueue) Init added in v0.7.0

func (q *IndexerQueue) Init()

type IndexerTask added in v0.7.0

type IndexerTask struct {
	F func(s string) error
	S string
}

func (IndexerTask) Do added in v0.7.0

func (t IndexerTask) Do()

type MessageHandler

type MessageHandler func(d Data)

type WorkQueue added in v0.7.0

type WorkQueue interface {
	Init()
	Close()
	Enqueue(WorkTask)
}

type WorkTask added in v0.7.0

type WorkTask interface {
	Do()
}

Jump to

Keyboard shortcuts

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