content

package
v0.0.0-...-b84af7b Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset

type Asset struct {
	Id       bson.ObjectId `bson:"_id,omitempty" json:"id,omitempty"`
	Original string        `bson:"original" json:"original"`
	Hosted   string        `bson:"hosted" json:"hosted"`
	MD5      string        `bson:"hash" json:"hash"`
	Status   string        `bson:"status" json:"status"`
	Created  time.Time     `bson:"created_at" json:"created_at"`
	Updated  time.Time     `bson:"updated_at" json:"updated_at"`
}

type Mention

type Mention struct {
	UserId   bson.ObjectId
	Username string
	Comment  string
	Original string
}

type Module

type Module struct {
	Errors        *exceptions.ExceptionsModule       `inject:""`
	S3            *s3.Bucket                         `inject:""`
	Config        *config.Config                     `inject:""`
	Notifications *notifications.NotificationsModule `inject:""`
	Redis         *goredis.Redis                     `inject:""`
}

func (Module) AsyncAssetDownload

func (self Module) AsyncAssetDownload(o Parseable) bool

func (Module) FetchAssetsHelper

func (self Module) FetchAssetsHelper(ls []string) map[string]string

func (Module) FetchUsersHelper

func (self Module) FetchUsersHelper(ls []string) map[string]string

func (Module) NotifyMentionsAsync

func (self Module) NotifyMentionsAsync(o Parseable, ls []Mention)

func (Module) Parse

func (self Module) Parse(o Parseable) error

func (Module) ParseAssetTags

func (self Module) ParseAssetTags(o Parseable, tags []Tag) bool

func (Module) ParseContentMentions

func (self Module) ParseContentMentions(o Parseable) bool

func (Module) ParseMentionTags

func (self Module) ParseMentionTags(o Parseable, tags []Tag) bool

func (Module) ParseTags

func (self Module) ParseTags(o Parseable) error

func (Module) RegisterOwnAsset

func (self Module) RegisterOwnAsset(remoteUrl string, o Parseable) *Asset

type Parseable

type Parseable interface {
	GetContent() string
	UpdateContent(string) bool
	OnParseFilterFinished(string) bool
	OnParseFinished() bool
	GetParseableMeta() map[string]interface{}
}

type Tag

type Tag struct {
	Original string
	Name     string
	Params   []string
}

Jump to

Keyboard shortcuts

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