Documentation
¶
Index ¶
- Constants
- func ParseProfileURL(value string) (urlValue *url.URL, userID primitive.ObjectID, objectType string, ...)
- func ParseProfileURL_AsFollowing(value string) (primitive.ObjectID, primitive.ObjectID, error)
- func ParseProfileURL_UserID(value string) (primitive.ObjectID, error)
- func WatchStreams(collection *mongo.Collection, result chan<- model.Stream)
- type ActivityStream
- func (service *ActivityStream) Close()
- func (service *ActivityStream) Delete(activityStream *model.ActivityStream, note string) error
- func (service *ActivityStream) List(criteria exp.Expression, options ...option.Option) (data.Iterator, error)
- func (service *ActivityStream) ListByContainer(userID primitive.ObjectID, container model.ActivityStreamContainer, ...) (data.Iterator, error)
- func (service *ActivityStream) ListInbox(userID primitive.ObjectID, criteria exp.Expression, options ...option.Option) (data.Iterator, error)
- func (service *ActivityStream) ListOutbox(userID primitive.ObjectID, criteria exp.Expression, options ...option.Option) (data.Iterator, error)
- func (service *ActivityStream) Load(criteria exp.Expression, result *model.ActivityStream) error
- func (service *ActivityStream) LoadFromContainer(userID primitive.ObjectID, container model.ActivityStreamContainer, ...) error
- func (service *ActivityStream) LoadFromInbox(activityStreamID primitive.ObjectID, userID primitive.ObjectID, ...) error
- func (service *ActivityStream) LoadFromOutbox(activityStreamID primitive.ObjectID, userID primitive.ObjectID, ...) error
- func (service *ActivityStream) New() model.ActivityStream
- func (service *ActivityStream) ObjectDelete(object data.Object, comment string) error
- func (service *ActivityStream) ObjectID(object data.Object) primitive.ObjectID
- func (service *ActivityStream) ObjectList(criteria exp.Expression, options ...option.Option) (data.Iterator, error)
- func (service *ActivityStream) ObjectLoad(criteria exp.Expression) (data.Object, error)
- func (service *ActivityStream) ObjectNew() data.Object
- func (service *ActivityStream) ObjectQuery(result any, criteria exp.Expression, options ...option.Option) error
- func (service *ActivityStream) ObjectSave(object data.Object, comment string) error
- func (service *ActivityStream) ObjectType() string
- func (service *ActivityStream) ObjectUserCan(object data.Object, authorization model.Authorization, action string) error
- func (service *ActivityStream) Query(criteria exp.Expression, options ...option.Option) ([]model.ActivityStream, error)
- func (service *ActivityStream) Refresh(collection data.Collection)
- func (service *ActivityStream) Save(activityStream *model.ActivityStream, note string) error
- func (service *ActivityStream) Schema() schema.Schema
- type Attachment
- func (service *Attachment) Close()
- func (service *Attachment) Delete(attachment *model.Attachment, note string) error
- func (service *Attachment) DeleteAll(objectType string, objectID primitive.ObjectID, note string) error
- func (service *Attachment) DeleteByID(objectType string, objectID primitive.ObjectID, ...) error
- func (service *Attachment) List(criteria exp.Expression, options ...option.Option) (data.Iterator, error)
- func (service *Attachment) Load(criteria exp.Expression, result *model.Attachment) error
- func (service *Attachment) LoadByID(objectType string, objectID primitive.ObjectID, ...) (model.Attachment, error)
- func (service *Attachment) LoadFirstByObjectID(objectType string, objectID primitive.ObjectID) (model.Attachment, error)
- func (service *Attachment) New() model.Attachment
- func (service *Attachment) Query(criteria exp.Expression, options ...option.Option) ([]model.Attachment, error)
- func (service *Attachment) QueryByObjectID(objectType string, objectID primitive.ObjectID) ([]model.Attachment, error)
- func (service *Attachment) Refresh(collection data.Collection)
- func (service *Attachment) Save(attachment *model.Attachment, note string) error
- func (service *Attachment) Schema() schema.Schema
- type Block
- func (service *Block) AllowDocument(userID primitive.ObjectID, document *model.DocumentLink) (bool, error)
- func (service *Block) AllowSender(userID primitive.ObjectID, person *model.PersonLink) (bool, error)
- func (service *Block) Close()
- func (service *Block) Delete(block *model.Block, note string) error
- func (service *Block) List(criteria exp.Expression, options ...option.Option) (data.Iterator, error)
- func (service *Block) Load(criteria exp.Expression, block *model.Block) error
- func (service *Block) LoadByToken(userID primitive.ObjectID, token string, block *model.Block) error
- func (service *Block) ObjectDelete(object data.Object, comment string) error
- func (service *Block) ObjectID(object data.Object) primitive.ObjectID
- func (service *Block) ObjectList(criteria exp.Expression, options ...option.Option) (data.Iterator, error)
- func (service *Block) ObjectLoad(criteria exp.Expression) (data.Object, error)
- func (service *Block) ObjectNew() data.Object
- func (service *Block) ObjectQuery(result any, criteria exp.Expression, options ...option.Option) error
- func (service *Block) ObjectSave(object data.Object, comment string) error
- func (service *Block) ObjectType() string
- func (service *Block) ObjectUserCan(object data.Object, authorization model.Authorization, action string) error
- func (service *Block) Refresh(collection data.Collection)
- func (service *Block) Save(block *model.Block, note string) error
- func (service *Block) Schema() schema.Schema
- type Config
- type Content
- type Domain
- func (service *Domain) ActiveClients() []model.Client
- func (service *Domain) Client(providerID string) model.Client
- func (service *Domain) Close()
- func (service *Domain) Get() model.Domain
- func (service *Domain) GetOAuthToken(providerID string) (model.Client, *oauth2.Token, error)
- func (service *Domain) LoadOrCreateDomain() error
- func (service *Domain) ManualProvider(providerID string) (providers.ManualProvider, bool)
- func (service *Domain) NewOAuthClient(providerID string) (model.Client, error)
- func (service *Domain) OAuthCallbackURL(providerID string) string
- func (service *Domain) OAuthCodeURL(providerID string) (string, error)
- func (service *Domain) OAuthExchange(providerID string, state string, code string) error
- func (service *Domain) OAuthProvider(providerID string) (providers.OAuthProvider, bool)
- func (service *Domain) ObjectDelete(object data.Object, note string) error
- func (service *Domain) ObjectID(object data.Object) primitive.ObjectID
- func (service *Domain) ObjectList(criteria exp.Expression, options ...option.Option) (data.Iterator, error)
- func (service *Domain) ObjectLoad(_ exp.Expression) (data.Object, error)
- func (service *Domain) ObjectNew() data.Object
- func (service *Domain) ObjectQuery(result any, criteria exp.Expression, options ...option.Option) error
- func (service *Domain) ObjectSave(object data.Object, note string) error
- func (service *Domain) ObjectType() string
- func (service *Domain) ObjectUserCan(object data.Object, authorization model.Authorization, action string) error
- func (service *Domain) Provider(providerID string) (providers.Provider, bool)
- func (service *Domain) ReadOAuthClient(providerID string) (model.Client, bool)
- func (service *Domain) Ready() bool
- func (service *Domain) Refresh(collection data.Collection, configuration config.Domain)
- func (service *Domain) Save(domain *model.Domain, note string) error
- func (service *Domain) Schema() schema.Schema
- func (service *Domain) Theme() model.Theme
- type DomainEmail
- type EncryptionKey
- func (service *EncryptionKey) Close()
- func (service *EncryptionKey) Create(userID primitive.ObjectID) (model.EncryptionKey, error)
- func (service *EncryptionKey) Delete(encryptionKey *model.EncryptionKey, note string) error
- func (service *EncryptionKey) GetPrivateKey(encryptionKey *model.EncryptionKey) (*rsa.PrivateKey, error)
- func (service *EncryptionKey) GetPublicKey(encryptionKey *model.EncryptionKey) (*rsa.PublicKey, error)
- func (service *EncryptionKey) KeyID(encryptionKey *model.EncryptionKey) string
- func (service *EncryptionKey) List(criteria exp.Expression, options ...option.Option) (data.Iterator, error)
- func (service *EncryptionKey) Load(criteria exp.Expression, encryptionKey *model.EncryptionKey) error
- func (service *EncryptionKey) LoadByID(userID primitive.ObjectID, encryptionKey *model.EncryptionKey) error
- func (service *EncryptionKey) OwnerID(encryptionKey *model.EncryptionKey) string
- func (service *EncryptionKey) Refresh(collection data.Collection)
- func (service *EncryptionKey) Save(encryptionKey *model.EncryptionKey, note string) error
- func (service *EncryptionKey) Sign(message []byte, encryptionKey *model.EncryptionKey) ([]byte, error)
- func (service *EncryptionKey) Verify(message []byte, signature []byte, encryptionKey *model.EncryptionKey) error
- type Filesystem
- func (filesystem *Filesystem) GetAfero(folder config.Folder) (afero.Fs, error)
- func (filesystem *Filesystem) GetAferos(folders ...config.Folder) []afero.Fs
- func (filesystem *Filesystem) GetFS(folder config.Folder) (fs.FS, error)
- func (filesystem *Filesystem) GetFSs(folders ...config.Folder) []fs.FS
- func (filesystem *Filesystem) Watch(folder config.Folder, changed chan<- bool, closed <-chan bool) error
- type Folder
- func (service *Folder) Close()
- func (service *Folder) CreateDefaultFolders(userID primitive.ObjectID) error
- func (service *Folder) Delete(folder *model.Folder, note string) error
- func (service *Folder) List(criteria exp.Expression, options ...option.Option) (data.Iterator, error)
- func (service *Folder) ListByUserID(userID primitive.ObjectID) (data.Iterator, error)
- func (service *Folder) Load(criteria exp.Expression, result *model.Folder) error
- func (service *Folder) LoadByID(userID primitive.ObjectID, folderID primitive.ObjectID, result *model.Folder) error
- func (service *Folder) LoadByLabel(userID primitive.ObjectID, label string, result *model.Folder) error
- func (service *Folder) LoadByOriginURL(userID primitive.ObjectID, originURL string, result *model.Folder) error
- func (service *Folder) LoadByToken(userID primitive.ObjectID, token string, result *model.Folder) error
- func (service *Folder) New() model.Folder
- func (service *Folder) ObjectDelete(object data.Object, comment string) error
- func (service *Folder) ObjectID(object data.Object) primitive.ObjectID
- func (service *Folder) ObjectList(criteria exp.Expression, options ...option.Option) (data.Iterator, error)
- func (service *Folder) ObjectLoad(criteria exp.Expression) (data.Object, error)
- func (service *Folder) ObjectNew() data.Object
- func (service *Folder) ObjectQuery(result any, criteria exp.Expression, options ...option.Option) error
- func (service *Folder) ObjectSave(object data.Object, comment string) error
- func (service *Folder) ObjectType() string
- func (service *Folder) ObjectUserCan(object data.Object, authorization model.Authorization, action string) error
- func (service *Folder) Query(criteria exp.Expression, options ...option.Option) ([]model.Folder, error)
- func (service *Folder) QueryByUserID(userID primitive.ObjectID) ([]model.Folder, error)
- func (service *Folder) Refresh(collection data.Collection)
- func (service *Folder) Save(folder *model.Folder, note string) error
- func (service *Folder) Schema() schema.Schema
- type FolderLookupProvider
- type Follower
- func (service *Follower) ActivityPubID(follower *model.Follower) string
- func (service *Follower) ActivityPubObjectID(follower *model.Follower) string
- func (service *Follower) AsJSONLD(follower *model.Follower) mapof.Any
- func (service *Follower) Close()
- func (service *Follower) Delete(follower *model.Follower, note string) error
- func (service *Follower) List(criteria exp.Expression, options ...option.Option) (data.Iterator, error)
- func (service *Follower) ListActivityPub(parentID primitive.ObjectID, options ...option.Option) (data.Iterator, error)
- func (service *Follower) ListWebSub(parentID primitive.ObjectID, options ...option.Option) (data.Iterator, error)
- func (service *Follower) Load(criteria exp.Expression, follower *model.Follower) error
- func (service *Follower) LoadByActivityPubFollower(parentID primitive.ObjectID, followerURL string, follower *model.Follower) error
- func (service *Follower) LoadByActor(parentID primitive.ObjectID, actorID string, follower *model.Follower) error
- func (service *Follower) LoadByToken(parentID primitive.ObjectID, token string, follower *model.Follower) error
- func (service *Follower) LoadByWebSub(objectType string, parentID primitive.ObjectID, callback string, ...) error
- func (service *Follower) LoadByWebSubUnique(objectType string, parentID primitive.ObjectID, callback string) (model.Follower, error)
- func (service *Follower) LoadOrCreate(parentID primitive.ObjectID, actorID string) (model.Follower, error)
- func (service *Follower) NewActivityPubFollower(user *model.User, actor streams.Document) error
- func (service *Follower) ObjectDelete(object data.Object, comment string) error
- func (service *Follower) ObjectID(object data.Object) primitive.ObjectID
- func (service *Follower) ObjectList(criteria exp.Expression, options ...option.Option) (data.Iterator, error)
- func (service *Follower) ObjectLoad(criteria exp.Expression) (data.Object, error)
- func (service *Follower) ObjectNew() data.Object
- func (service *Follower) ObjectQuery(result any, criteria exp.Expression, options ...option.Option) error
- func (service *Follower) ObjectSave(object data.Object, comment string) error
- func (service *Follower) ObjectType() string
- func (service *Follower) ObjectUserCan(object data.Object, authorization model.Authorization, action string) error
- func (service *Follower) Query(criteria exp.Expression, options ...option.Option) ([]model.Follower, error)
- func (service *Follower) QueryAllURLs(criteria exp.Expression) ([]string, error)
- func (service *Follower) Refresh(collection data.Collection)
- func (service *Follower) Save(follower *model.Follower, note string) error
- func (service *Follower) Schema() schema.Schema
- type Following
- func (service *Following) ActivityPubActorID(following *model.Following) string
- func (service *Following) ActivityPubID(following *model.Following) string
- func (service *Following) AsJSONLD(following *model.Following) mapof.Any
- func (service *Following) CallbackURL() string
- func (service *Following) Close()
- func (service *Following) Connect(following model.Following) error
- func (service *Following) Delete(following *model.Following, note string) error
- func (service *Following) Disconnect(following *model.Following)
- func (service *Following) List(criteria exp.Expression, options ...option.Option) (data.Iterator, error)
- func (service *Following) ListActivityPub(userID primitive.ObjectID, options ...option.Option) (data.Iterator, error)
- func (service *Following) ListByUserID(userID primitive.ObjectID) (data.Iterator, error)
- func (service *Following) ListPollable() (data.Iterator, error)
- func (service *Following) Load(criteria exp.Expression, result *model.Following) error
- func (service *Following) LoadByID(userID primitive.ObjectID, followingID primitive.ObjectID, ...) error
- func (service *Following) LoadByToken(userID primitive.ObjectID, token string, result *model.Following) error
- func (service *Following) LoadByURL(parentID primitive.ObjectID, profileUrl string, result *model.Following) error
- func (service *Following) New() model.Following
- func (service *Following) ObjectDelete(object data.Object, note string) error
- func (service *Following) ObjectID(object data.Object) primitive.ObjectID
- func (service *Following) ObjectList(criteria exp.Expression, options ...option.Option) (data.Iterator, error)
- func (service *Following) ObjectLoad(criteria exp.Expression) (data.Object, error)
- func (service *Following) ObjectNew() data.Object
- func (service *Following) ObjectQuery(result any, criteria exp.Expression, options ...option.Option) error
- func (service *Following) ObjectSave(object data.Object, note string) error
- func (service *Following) ObjectType() string
- func (service *Following) ObjectUserCan(object data.Object, authorization model.Authorization, action string) error
- func (service *Following) PurgeInbox(following model.Following) error
- func (service *Following) Query(criteria exp.Expression, options ...option.Option) ([]model.Following, error)
- func (service *Following) QueryByFolder(userID primitive.ObjectID, folderID primitive.ObjectID) ([]model.FollowingSummary, error)
- func (service *Following) QueryByUser(userID primitive.ObjectID) ([]model.FollowingSummary, error)
- func (service *Following) Refresh(collection data.Collection)
- func (service *Following) Save(following *model.Following, note string) error
- func (service *Following) Schema() schema.Schema
- func (service *Following) SetStatus(following *model.Following, status string, statusMessage string) error
- func (service *Following) Start()
- type Group
- func (service *Group) Close()
- func (service *Group) Count(ctx context.Context, criteria exp.Expression) (int, error)
- func (service *Group) Delete(group *model.Group, note string) error
- func (service *Group) List(criteria exp.Expression, options ...option.Option) (data.Iterator, error)
- func (service *Group) ListAsOptions() []form.LookupCode
- func (service *Group) ListByGroup(group string) (data.Iterator, error)
- func (service *Group) ListByIDs(groupIDs ...primitive.ObjectID) ([]model.Group, error)
- func (service *Group) Load(criteria exp.Expression, result *model.Group) error
- func (service *Group) LoadByID(groupID primitive.ObjectID, result *model.Group) error
- func (service *Group) LoadByToken(token string, result *model.Group) error
- func (service *Group) ObjectDelete(object data.Object, comment string) error
- func (service *Group) ObjectID(object data.Object) primitive.ObjectID
- func (service *Group) ObjectList(criteria exp.Expression, options ...option.Option) (data.Iterator, error)
- func (service *Group) ObjectLoad(criteria exp.Expression) (data.Object, error)
- func (service *Group) ObjectNew() data.Object
- func (service *Group) ObjectQuery(result any, criteria exp.Expression, options ...option.Option) error
- func (service *Group) ObjectSave(object data.Object, comment string) error
- func (service *Group) ObjectType() string
- func (service *Group) ObjectUserCan(object data.Object, authorization model.Authorization, action string) error
- func (service *Group) Query(criteria exp.Expression, options ...option.Option) ([]model.Group, error)
- func (service *Group) Refresh(collection data.Collection)
- func (service *Group) Save(group *model.Group, note string) error
- func (service *Group) Schema() schema.Schema
- type GroupLookupProvider
- type Icons
- type Inbox
- func (service *Inbox) CalculateRank(message *model.Message) error
- func (service *Inbox) Close()
- func (service *Inbox) Delete(message *model.Message, note string) error
- func (service *Inbox) DeleteByFolder(userID primitive.ObjectID, folderID primitive.ObjectID) error
- func (service *Inbox) DeleteByOrigin(internalID primitive.ObjectID, note string) error
- func (service *Inbox) DeleteMany(criteria exp.Expression, note string) error
- func (service *Inbox) List(criteria exp.Expression, options ...option.Option) (data.Iterator, error)
- func (service *Inbox) ListByFolder(userID primitive.ObjectID, folderID primitive.ObjectID) (data.Iterator, error)
- func (service *Inbox) ListByFollowingID(userID primitive.ObjectID, followingID primitive.ObjectID) (data.Iterator, error)
- func (service *Inbox) Load(criteria exp.Expression, result *model.Message) error
- func (service *Inbox) LoadByID(userID primitive.ObjectID, messageID primitive.ObjectID, result *model.Message) error
- func (service *Inbox) LoadByRank(userID primitive.ObjectID, folderID primitive.ObjectID, ...) error
- func (service *Inbox) LoadByURL(userID primitive.ObjectID, url string, result *model.Message) error
- func (service *Inbox) LoadOrCreate(userID primitive.ObjectID, url string, result *model.Message) error
- func (service *Inbox) New() model.Message
- func (service *Inbox) ObjectDelete(object data.Object, note string) error
- func (service *Inbox) ObjectID(object data.Object) primitive.ObjectID
- func (service *Inbox) ObjectList(criteria exp.Expression, options ...option.Option) (data.Iterator, error)
- func (service *Inbox) ObjectLoad(criteria exp.Expression) (data.Object, error)
- func (service *Inbox) ObjectNew() data.Object
- func (service *Inbox) ObjectQuery(result any, criteria exp.Expression, options ...option.Option) error
- func (service *Inbox) ObjectSave(object data.Object, note string) error
- func (service *Inbox) ObjectType() string
- func (service *Inbox) ObjectUserCan(object data.Object, authorization model.Authorization, action string) error
- func (service *Inbox) Query(criteria exp.Expression, options ...option.Option) ([]model.Message, error)
- func (service *Inbox) QueryByUserID(userID primitive.ObjectID, criteria exp.Expression, options ...option.Option) ([]model.Message, error)
- func (service *Inbox) QueryPurgeable(following *model.Following) ([]model.Message, error)
- func (service *Inbox) Refresh(collection data.Collection)
- func (service *Inbox) Save(message *model.Message, note string) error
- func (service *Inbox) Schema() schema.Schema
- func (service *Inbox) SetReadDate(userID primitive.ObjectID, token string, readDate int64) error
- func (service *Inbox) UpdateInboxFolders(userID primitive.ObjectID, followingID primitive.ObjectID, ...)
- type JWT
- type Locator
- type LookupProvider
- type Mention
- func (service *Mention) Close()
- func (service *Mention) Delete(mention *model.Mention, note string) error
- func (service *Mention) DiscoverEndpoint(url string) (string, error)
- func (service *Mention) FindLinks(body string) []string
- func (service *Mention) List(criteria exp.Expression, options ...option.Option) (data.Iterator, error)
- func (service *Mention) Load(criteria exp.Expression, mention *model.Mention) error
- func (service *Mention) ObjectDelete(object data.Object, comment string) error
- func (service *Mention) ObjectID(object data.Object) primitive.ObjectID
- func (service *Mention) ObjectList(criteria exp.Expression, options ...option.Option) (data.Iterator, error)
- func (service *Mention) ObjectLoad(criteria exp.Expression) (data.Object, error)
- func (service *Mention) ObjectNew() data.Object
- func (service *Mention) ObjectQuery(result any, criteria exp.Expression, options ...option.Option) error
- func (service *Mention) ObjectSave(object data.Object, comment string) error
- func (service *Mention) ObjectType() string
- func (service *Mention) ObjectUserCan(object data.Object, authorization model.Authorization, action string) error
- func (service *Mention) ParseMicroformats(source io.Reader, originURL string) model.Mention
- func (service *Mention) Query(criteria exp.Expression, options ...option.Option) ([]model.Mention, error)
- func (service *Mention) QueryByObjectID(objectID primitive.ObjectID, options ...option.Option) ([]model.Mention, error)
- func (service *Mention) Refresh(collection data.Collection)
- func (service *Mention) Save(mention *model.Mention, note string) error
- func (service *Mention) Schema() schema.Schema
- func (service *Mention) Send(source string, target string) error
- func (service *Mention) Verify(source string, target string, buffer io.Writer) error
- type ModelService
- type Origin
- func (service *Origin) Close()
- func (service *Origin) Poll(providerID string) <-chan model.Stream
- func (service *Origin) PollAll() <-chan model.Stream
- func (service *Origin) Refresh(domainService *Domain, streamService *Stream, providerService *Provider)
- func (service *Origin) Save(streams <-chan model.Stream) error
- type Provider
- type Publisher
- type RSS
- type Scheduler
- type ServerEmail
- type SterankoUserService
- func (service SterankoUserService) Close()
- func (service SterankoUserService) Delete(user steranko.User, comment string) error
- func (service SterankoUserService) Load(username string, result steranko.User) error
- func (service SterankoUserService) New() steranko.User
- func (service SterankoUserService) NewClaims() jwt.Claims
- func (service SterankoUserService) RequestPasswordReset(user steranko.User) error
- func (service SterankoUserService) Save(user steranko.User, comment string) error
- type Stream
- func (service *Stream) Close()
- func (service *Stream) Count(ctx context.Context, criteria exp.Expression) (int, error)
- func (service *Stream) Delete(stream *model.Stream, note string) error
- func (service *Stream) DeleteByParent(parentID primitive.ObjectID, note string) error
- func (service *Stream) DeleteMany(criteria exp.Expression, note string) error
- func (service *Stream) DeleteRelatedDuplicate(parentID primitive.ObjectID, originalStreamID primitive.ObjectID) error
- func (service *Stream) List(criteria exp.Expression, options ...option.Option) (data.Iterator, error)
- func (service *Stream) ListByParent(parentID primitive.ObjectID) (data.Iterator, error)
- func (service *Stream) ListByTemplate(template string) (data.Iterator, error)
- func (service *Stream) ListNavigation() (data.Iterator, error)
- func (service *Stream) Load(criteria exp.Expression, stream *model.Stream) error
- func (service *Stream) LoadByID(streamID primitive.ObjectID, result *model.Stream) error
- func (service *Stream) LoadByOriginID(originID primitive.ObjectID, result *model.Stream) error
- func (service *Stream) LoadByProductID(productID string, result *model.Stream) error
- func (service *Stream) LoadByToken(token string, result *model.Stream) error
- func (service *Stream) LoadByURL(targetURL string, result *model.Stream) error
- func (service *Stream) LoadFirstAttachment(streamID primitive.ObjectID) (model.Attachment, error)
- func (service *Stream) LoadFirstSibling(parentID primitive.ObjectID, result *model.Stream) error
- func (service *Stream) LoadLastSibling(parentID primitive.ObjectID, result *model.Stream) error
- func (service *Stream) LoadNavigationByID(streamID primitive.ObjectID, result *model.Stream) error
- func (service *Stream) LoadNextSibling(parentID primitive.ObjectID, rank int, result *model.Stream) error
- func (service *Stream) LoadParent(stream *model.Stream, parent *model.Stream) error
- func (service *Stream) LoadPrevSibling(parentID primitive.ObjectID, rank int, result *model.Stream) error
- func (service *Stream) LoadWebFinger(token string) (digit.Resource, error)
- func (service *Stream) LoadWithOptions(criteria exp.Expression, options option.Option, result *model.Stream) error
- func (service *Stream) MaxRank(ctx context.Context, parentID primitive.ObjectID) (int, error)
- func (service *Stream) New(navigationID string, parentID primitive.ObjectID, templateID string) (model.Stream, model.Template, error)
- func (service *Stream) ObjectDelete(object data.Object, note string) error
- func (service *Stream) ObjectID(object data.Object) primitive.ObjectID
- func (service *Stream) ObjectList(criteria exp.Expression, options ...option.Option) (data.Iterator, error)
- func (service *Stream) ObjectLoad(criteria exp.Expression) (data.Object, error)
- func (service *Stream) ObjectNew() data.Object
- func (service *Stream) ObjectQuery(result any, criteria exp.Expression, options ...option.Option) error
- func (service *Stream) ObjectSave(object data.Object, note string) error
- func (service *Stream) ObjectType() string
- func (service *Stream) ObjectUserCan(object data.Object, authorization model.Authorization, action string) error
- func (service *Stream) Outbox(ownerID primitive.ObjectID, criteria exp.Expression, options ...option.Option) ([]model.StreamSummary, error)
- func (service *Stream) PurgeDeleted(ancestorID primitive.ObjectID) error
- func (service *Stream) Query(criteria exp.Expression, options ...option.Option) ([]model.Stream, error)
- func (service *Stream) QuerySummary(criteria exp.Expression, options ...option.Option) ([]model.StreamSummary, error)
- func (service *Stream) Refresh(hostName string, collection data.Collection, draftService *StreamDraft)
- func (service *Stream) RestoreDeleted(ancestorID primitive.ObjectID) error
- func (service *Stream) Save(stream *model.Stream, note string) error
- func (service *Stream) Schema() schema.Schema
- type StreamDraft
- func (service *StreamDraft) Close()
- func (service *StreamDraft) Delete(draft *model.Stream, _note string) error
- func (service *StreamDraft) Load(criteria exp.Expression, result *model.Stream) error
- func (service *StreamDraft) LoadByID(streamID primitive.ObjectID, result *model.Stream) error
- func (service *StreamDraft) LoadByToken(token string, result *model.Stream) error
- func (service *StreamDraft) New() model.Stream
- func (service *StreamDraft) ObjectDelete(object data.Object, comment string) error
- func (service *StreamDraft) ObjectID(object data.Object) primitive.ObjectID
- func (service *StreamDraft) ObjectList(criteria exp.Expression, options ...option.Option) (data.Iterator, error)
- func (service *StreamDraft) ObjectLoad(criteria exp.Expression) (data.Object, error)
- func (service *StreamDraft) ObjectNew() data.Object
- func (service *StreamDraft) ObjectQuery(result any, criteria exp.Expression, options ...option.Option) error
- func (service *StreamDraft) ObjectSave(object data.Object, comment string) error
- func (service *StreamDraft) ObjectType() string
- func (service *StreamDraft) ObjectUserCan(object data.Object, authorization model.Authorization, action string) error
- func (service *StreamDraft) Promote(streamID primitive.ObjectID, stateID string) (model.Stream, error)
- func (service *StreamDraft) Refresh(collection data.Collection)
- func (service *StreamDraft) Save(draft *model.Stream, note string) error
- func (service *StreamDraft) Schema() schema.Schema
- type Template
- func (service *Template) Add(templateID string, filesystem fs.FS, definition []byte) error
- func (service *Template) List(filter func(*model.Template) bool) []form.LookupCode
- func (service *Template) ListByContainer(containedByRole string) []form.LookupCode
- func (service *Template) ListByContainerLimited(containedByRole string, limits sliceof.String) []form.LookupCode
- func (service *Template) Load(templateID string) (model.Template, error)
- func (service *Template) LoadAdmin(templateID string) (model.Template, error)
- func (service *Template) Refresh(locations []config.Folder)
- func (service *Template) Schema(templateID string) (schema.Schema, error)
- func (service *Template) State(templateID string, stateID string) (model.State, error)
- type Theme
- type ThemeLookupProvider
- type User
- func (service *User) ActivityPubActor(userID primitive.ObjectID) (pub.Actor, error)
- func (service *User) ActivityPubPublicKeyURL(userID primitive.ObjectID) string
- func (service *User) ActivityPubURL(userID primitive.ObjectID) string
- func (service *User) CalcBlockCount(userID primitive.ObjectID) error
- func (service *User) CalcFollowerCount(userID primitive.ObjectID) error
- func (service *User) CalcFollowingCount(userID primitive.ObjectID) error
- func (service *User) Close()
- func (service *User) Count(ctx context.Context, criteria exp.Expression) (int, error)
- func (service *User) Delete(user *model.User, note string) error
- func (service *User) List(criteria exp.Expression, options ...option.Option) (data.Iterator, error)
- func (service *User) ListByGroup(group string) (data.Iterator, error)
- func (service *User) ListByIdentities(identities []string) (data.Iterator, error)
- func (service *User) ListOwners() (data.Iterator, error)
- func (service *User) ListOwnersAsSlice() []model.UserSummary
- func (service *User) Load(criteria exp.Expression, result *model.User) error
- func (service *User) LoadByID(userID primitive.ObjectID, result *model.User) error
- func (service *User) LoadByResetCode(userID string, code string, user *model.User) error
- func (service *User) LoadByToken(token string, result *model.User) error
- func (service *User) LoadByUsername(username string, result *model.User) error
- func (service *User) LoadByUsernameOrEmail(usernameOrEmail string, result *model.User) error
- func (service *User) LoadWebFinger(username string) (digit.Resource, error)
- func (service *User) MakeNewPasswordResetCode(user *model.User) error
- func (service *User) ObjectDelete(object data.Object, note string) error
- func (service *User) ObjectID(object data.Object) primitive.ObjectID
- func (service *User) ObjectList(criteria exp.Expression, options ...option.Option) (data.Iterator, error)
- func (service *User) ObjectLoad(criteria exp.Expression) (data.Object, error)
- func (service *User) ObjectNew() data.Object
- func (service *User) ObjectQuery(result any, criteria exp.Expression, options ...option.Option) error
- func (service *User) ObjectSave(object data.Object, note string) error
- func (service *User) ObjectType() string
- func (service *User) ObjectUserCan(object data.Object, authorization model.Authorization, action string) error
- func (service *User) ParseProfileURL(value string) (primitive.ObjectID, error)
- func (service *User) Refresh(userCollection data.Collection, followerCollection data.Collection, ...)
- func (service *User) RemoteFollowURL() string
- func (service *User) ResetPassword(user *model.User, resetCode string, newPassword string) error
- func (service *User) Save(user *model.User, note string) error
- func (service *User) Schema() schema.Schema
- func (service *User) SendPasswordResetEmail(user *model.User)
- func (service *User) SendWelcomeEmail(user *model.User)
- func (service *User) SetOwner(owner config.Owner) error
- type UserStream
- func (service *UserStream) Delete(stream *model.UserStream, note string) error
- func (service *UserStream) List(criteria exp.Expression, options ...option.Option) (data.Iterator, error)
- func (service *UserStream) Load(criteria exp.Expression, stream *model.UserStream) error
- func (service UserStream) LoadByUserAndStream(userID primitive.ObjectID, streamID primitive.ObjectID) (model.UserStream, error)
- func (service *UserStream) Save(stream *model.UserStream, note string) error
- func (service UserStream) VoteCount(streamID primitive.ObjectID) ([]queries.VoteCountResult, error)
- func (service UserStream) VoteDetail(streamID primitive.ObjectID) ([]queries.VoteDetailResult, error)
- func (service UserStream) VoteRunes() []string
- type Widget
Constants ¶
const DefinitionEmail = "EMAIL"
DefinitionEmail marks a filesystem that contains an Email definition.
const DefinitionTemplate = "TEMPLATE"
DefinitionEmail marks a filesystem that contains a stream Template definition.
const DefinitionTheme = "THEME"
DefinitionEmail marks a filesystem that contains a domain Theme definition.
const DefinitionWidget = "WIDGET"
DefinitionWidget marks a filesystem that contains a Widget definition.
Variables ¶
This section is empty.
Functions ¶
func ParseProfileURL ¶
func WatchStreams ¶
func WatchStreams(collection *mongo.Collection, result chan<- model.Stream)
WatchStreams initiates a mongodb change stream to on every updates to Stream data objects
Types ¶
type ActivityStream ¶
type ActivityStream struct {
// contains filtered or unexported fields
}
ActivityStream manages all interactions with a user's ActivityStream
func NewActivityStream ¶
func NewActivityStream(collection data.Collection) ActivityStream
NewActivityStream returns a fully populated ActivityStream service
func (*ActivityStream) Close ¶
func (service *ActivityStream) Close()
Close stops any background processes controlled by this service
func (*ActivityStream) Delete ¶
func (service *ActivityStream) Delete(activityStream *model.ActivityStream, note string) error
Delete removes an ActivityStream from the database (virtual delete)
func (*ActivityStream) List ¶
func (service *ActivityStream) List(criteria exp.Expression, options ...option.Option) (data.Iterator, error)
List returns an iterator containing all of the ActivityStreams that match the provided criteria
func (*ActivityStream) ListByContainer ¶
func (service *ActivityStream) ListByContainer(userID primitive.ObjectID, container model.ActivityStreamContainer, criteria exp.Expression, options ...option.Option) (data.Iterator, error)
func (*ActivityStream) ListInbox ¶
func (service *ActivityStream) ListInbox(userID primitive.ObjectID, criteria exp.Expression, options ...option.Option) (data.Iterator, error)
func (*ActivityStream) ListOutbox ¶
func (service *ActivityStream) ListOutbox(userID primitive.ObjectID, criteria exp.Expression, options ...option.Option) (data.Iterator, error)
func (*ActivityStream) Load ¶
func (service *ActivityStream) Load(criteria exp.Expression, result *model.ActivityStream) error
Load retrieves an ActivityStream from the database
func (*ActivityStream) LoadFromContainer ¶
func (service *ActivityStream) LoadFromContainer(userID primitive.ObjectID, container model.ActivityStreamContainer, activityStreamID primitive.ObjectID, activityStream *model.ActivityStream) error
func (*ActivityStream) LoadFromInbox ¶
func (service *ActivityStream) LoadFromInbox(activityStreamID primitive.ObjectID, userID primitive.ObjectID, activityStream *model.ActivityStream) error
func (*ActivityStream) LoadFromOutbox ¶
func (service *ActivityStream) LoadFromOutbox(activityStreamID primitive.ObjectID, userID primitive.ObjectID, activityStream *model.ActivityStream) error
func (*ActivityStream) New ¶
func (service *ActivityStream) New() model.ActivityStream
New creates a newly initialized ActivityStream that is ready to use
func (*ActivityStream) ObjectDelete ¶
func (service *ActivityStream) ObjectDelete(object data.Object, comment string) error
func (*ActivityStream) ObjectID ¶
func (service *ActivityStream) ObjectID(object data.Object) primitive.ObjectID
func (*ActivityStream) ObjectList ¶
func (service *ActivityStream) ObjectList(criteria exp.Expression, options ...option.Option) (data.Iterator, error)
func (*ActivityStream) ObjectLoad ¶
func (service *ActivityStream) ObjectLoad(criteria exp.Expression) (data.Object, error)
func (*ActivityStream) ObjectNew ¶
func (service *ActivityStream) ObjectNew() data.Object
New returns a fully initialized model.Group as a data.Object.
func (*ActivityStream) ObjectQuery ¶
func (service *ActivityStream) ObjectQuery(result any, criteria exp.Expression, options ...option.Option) error
func (*ActivityStream) ObjectSave ¶
func (service *ActivityStream) ObjectSave(object data.Object, comment string) error
func (*ActivityStream) ObjectType ¶
func (service *ActivityStream) ObjectType() string
ObjectType returns the type of object that this service manages
func (*ActivityStream) ObjectUserCan ¶
func (service *ActivityStream) ObjectUserCan(object data.Object, authorization model.Authorization, action string) error
func (*ActivityStream) Query ¶
func (service *ActivityStream) Query(criteria exp.Expression, options ...option.Option) ([]model.ActivityStream, error)
Query returns a slice of ActivityStreams that math the provided criteria
func (*ActivityStream) Refresh ¶
func (service *ActivityStream) Refresh(collection data.Collection)
Refresh updates any stateful data that is cached inside this service.
func (*ActivityStream) Save ¶
func (service *ActivityStream) Save(activityStream *model.ActivityStream, note string) error
Save adds/updates an ActivityStream in the database
func (*ActivityStream) Schema ¶
func (service *ActivityStream) Schema() schema.Schema
type Attachment ¶
type Attachment struct {
// contains filtered or unexported fields
}
Attachment manages all interactions with the Attachment collection
func NewAttachment ¶
func NewAttachment(collection data.Collection, mediaServer mediaserver.MediaServer) Attachment
NewAttachment returns a fully populated Attachment service
func (*Attachment) Close ¶
func (service *Attachment) Close()
Close stops any background processes controlled by this service
func (*Attachment) Delete ¶
func (service *Attachment) Delete(attachment *model.Attachment, note string) error
Delete removes an Attachment from the database (virtual delete)
func (*Attachment) DeleteAll ¶
func (service *Attachment) DeleteAll(objectType string, objectID primitive.ObjectID, note string) error
DeleteByStream removes all attachments from the provided stream (virtual delete)
func (*Attachment) DeleteByID ¶
func (*Attachment) List ¶
func (service *Attachment) List(criteria exp.Expression, options ...option.Option) (data.Iterator, error)
List returns an iterator containing all of the Attachments who match the provided criteria
func (*Attachment) Load ¶
func (service *Attachment) Load(criteria exp.Expression, result *model.Attachment) error
Load retrieves an Attachment from the database
func (*Attachment) LoadByID ¶
func (service *Attachment) LoadByID(objectType string, objectID primitive.ObjectID, attachmentID primitive.ObjectID) (model.Attachment, error)
func (*Attachment) LoadFirstByObjectID ¶
func (service *Attachment) LoadFirstByObjectID(objectType string, objectID primitive.ObjectID) (model.Attachment, error)
func (*Attachment) New ¶
func (service *Attachment) New() model.Attachment
New creates a newly initialized Attachment that is ready to use
func (*Attachment) Query ¶
func (service *Attachment) Query(criteria exp.Expression, options ...option.Option) ([]model.Attachment, error)
func (*Attachment) QueryByObjectID ¶
func (service *Attachment) QueryByObjectID(objectType string, objectID primitive.ObjectID) ([]model.Attachment, error)
func (*Attachment) Refresh ¶
func (service *Attachment) Refresh(collection data.Collection)
Refresh updates any stateful data that is cached inside this service.
func (*Attachment) Save ¶
func (service *Attachment) Save(attachment *model.Attachment, note string) error
Save adds/updates an Attachment in the database
func (*Attachment) Schema ¶
func (service *Attachment) Schema() schema.Schema
type Block ¶
type Block struct {
// contains filtered or unexported fields
}
Block defines a service that manages all content blocks created and imported by Users.
func NewBlock ¶
func NewBlock(collection data.Collection, userService *User) Block
NewBlock returns a fully initialized Block service
func (*Block) AllowDocument ¶
func (service *Block) AllowDocument(userID primitive.ObjectID, document *model.DocumentLink) (bool, error)
AllowSender returns TRUE if the designated User accepts the Document (based on their blocklist settings)
func (*Block) AllowSender ¶
func (service *Block) AllowSender(userID primitive.ObjectID, person *model.PersonLink) (bool, error)
AllowSender returns TRUE if the designated User accepts documents from this sender (based on their blocklist settings)
func (*Block) Close ¶
func (service *Block) Close()
Close stops any background processes controlled by this service
func (*Block) List ¶
func (service *Block) List(criteria exp.Expression, options ...option.Option) (data.Iterator, error)
List returns an iterator containing all of the Blocks who match the provided criteria
func (*Block) LoadByToken ¶
func (*Block) ObjectDelete ¶
func (*Block) ObjectList ¶
func (*Block) ObjectLoad ¶
func (*Block) ObjectQuery ¶
func (*Block) ObjectSave ¶
func (*Block) ObjectType ¶
ObjectType returns the type of object that this service manages
func (*Block) ObjectUserCan ¶
func (*Block) Refresh ¶
func (service *Block) Refresh(collection data.Collection)
Refresh updates any stateful data that is cached inside this service.
type Content ¶
type Content struct {
// contains filtered or unexported fields
}
func NewContent ¶
func NewContent(editorJS *goeditorjs.HTMLEngine) Content
type Domain ¶
type Domain struct {
// contains filtered or unexported fields
}
Domain service manages all access to the singleton model.Domain in the database
func NewDomain ¶
func NewDomain(collection data.Collection, configuration config.Domain, themeService *Theme, userService *User, providerService *Provider, funcMap template.FuncMap) Domain
NewDomain returns a fully initialized Domain service
func (*Domain) ActiveClients ¶
ActiveClients returns all active Clients for this domain
func (*Domain) GetOAuthToken ¶
GetAuthToken retrieves the OAuth token for the specified provider. If the token has expired then it is refreshed (and saved) automatically before returning.
func (*Domain) LoadOrCreateDomain ¶
func (*Domain) ManualProvider ¶
func (service *Domain) ManualProvider(providerID string) (providers.ManualProvider, bool)
ManualProvider returns the external.ManualProvider that matches the given providerID
func (*Domain) NewOAuthClient ¶
NewOAuthState generates and returns a new OAuth state for the specified provider
func (*Domain) OAuthCallbackURL ¶
OAuthCallbackURL returns the specific callback URL to use for this host and provider.
func (*Domain) OAuthCodeURL ¶
OAuthCodeURL generates a new (unique) OAuth state and AuthCodeURL for the specified provider
func (*Domain) OAuthExchange ¶
OAuthExchange trades a temporary OAuth code for a valid OAuth token
func (*Domain) OAuthProvider ¶
func (service *Domain) OAuthProvider(providerID string) (providers.OAuthProvider, bool)
OAuthProvider returns the external.OAuthProvider that matches the given providerID
func (*Domain) ObjectDelete ¶
func (*Domain) ObjectList ¶
func (*Domain) ObjectLoad ¶
func (*Domain) ObjectQuery ¶
func (*Domain) ObjectSave ¶
func (*Domain) ObjectType ¶
ObjectType returns the type of object that this service manages
func (*Domain) ObjectUserCan ¶
func (*Domain) ReadOAuthClient ¶
ReadOAuthState returns the OAuth state for the specified provider WITHOUT changing the current value. THIS SHOULD NOT BE USED TO ACCESS OAUTH TOKENS because they may be expired. Use GetOAuthToken for that.
func (*Domain) Refresh ¶
func (service *Domain) Refresh(collection data.Collection, configuration config.Domain)
Refresh updates any stateful data that is cached inside this service.
type DomainEmail ¶
type DomainEmail struct {
// contains filtered or unexported fields
}
func NewDomainEmail ¶
func NewDomainEmail(serverEmail *ServerEmail, configuration config.Domain) DomainEmail
func (*DomainEmail) Refresh ¶
func (service *DomainEmail) Refresh(configuration config.Domain)
func (*DomainEmail) SendPasswordReset ¶
func (service *DomainEmail) SendPasswordReset(user *model.User) error
SendPasswordReset sends a passowrd reset email to the user. This method swallows errors so that it can be run asynchronously.
func (*DomainEmail) SendWelcome ¶
func (service *DomainEmail) SendWelcome(user *model.User) error
SendWelcome sends a welcome email to the user. This method returns an error so that it CAN NOT be run asynchronously.
type EncryptionKey ¶
type EncryptionKey struct {
// contains filtered or unexported fields
}
EncryptionKey defines a service that tracks the (possibly external) accounts an internal User is encryptionKey.
func NewEncryptionKey ¶
func NewEncryptionKey(collection data.Collection, host string) EncryptionKey
NewEncryptionKey returns a fully initialized EncryptionKey service
func (*EncryptionKey) Close ¶
func (service *EncryptionKey) Close()
Close stops any background processes controlled by this service
func (*EncryptionKey) Create ¶
func (service *EncryptionKey) Create(userID primitive.ObjectID) (model.EncryptionKey, error)
func (*EncryptionKey) Delete ¶
func (service *EncryptionKey) Delete(encryptionKey *model.EncryptionKey, note string) error
Delete removes an EncryptionKey from the database (virtual delete)
func (*EncryptionKey) GetPrivateKey ¶
func (service *EncryptionKey) GetPrivateKey(encryptionKey *model.EncryptionKey) (*rsa.PrivateKey, error)
func (*EncryptionKey) GetPublicKey ¶
func (service *EncryptionKey) GetPublicKey(encryptionKey *model.EncryptionKey) (*rsa.PublicKey, error)
func (*EncryptionKey) KeyID ¶
func (service *EncryptionKey) KeyID(encryptionKey *model.EncryptionKey) string
KeyID returns the publicly accessible URL of this EncryptionKey
func (*EncryptionKey) List ¶
func (service *EncryptionKey) List(criteria exp.Expression, options ...option.Option) (data.Iterator, error)
List returns an iterator containing all of the EncryptionKeys who match the provided criteria
func (*EncryptionKey) Load ¶
func (service *EncryptionKey) Load(criteria exp.Expression, encryptionKey *model.EncryptionKey) error
Load retrieves an EncryptionKey from the database
func (*EncryptionKey) LoadByID ¶
func (service *EncryptionKey) LoadByID(userID primitive.ObjectID, encryptionKey *model.EncryptionKey) error
func (*EncryptionKey) OwnerID ¶
func (service *EncryptionKey) OwnerID(encryptionKey *model.EncryptionKey) string
OwnerID returns the publicly accessible URL of the Actor who owns this EncryptionKey
func (*EncryptionKey) Refresh ¶
func (service *EncryptionKey) Refresh(collection data.Collection)
Refresh updates any stateful data that is cached inside this service.
func (*EncryptionKey) Save ¶
func (service *EncryptionKey) Save(encryptionKey *model.EncryptionKey, note string) error
Save adds/updates an EncryptionKey in the database
func (*EncryptionKey) Sign ¶
func (service *EncryptionKey) Sign(message []byte, encryptionKey *model.EncryptionKey) ([]byte, error)
func (*EncryptionKey) Verify ¶
func (service *EncryptionKey) Verify(message []byte, signature []byte, encryptionKey *model.EncryptionKey) error
type Filesystem ¶
type Filesystem struct {
// contains filtered or unexported fields
}
Filesystem is a service that multiplexes between different filesystems. Currently works with embedded filesystems and file:// URIs
func NewFilesystem ¶
func NewFilesystem(embedded fs.FS) Filesystem
NewFilesytem returns a fully initialized Filesystem service
func (*Filesystem) GetAferos ¶
func (filesystem *Filesystem) GetAferos(folders ...config.Folder) []afero.Fs
GetAferos returns multiple afero filesystems
func (*Filesystem) GetFS ¶
GetFS returns a READONLY Filesystem. It works with embed:// and file:// URIs
type Folder ¶
type Folder struct {
// contains filtered or unexported fields
}
Folder manages all interactions with a user's Folder
func NewFolder ¶
func NewFolder(collection data.Collection, inboxService *Inbox) Folder
NewFolder returns a fully populated Folder service
func (*Folder) Close ¶
func (service *Folder) Close()
Close stops any background processes controlled by this service
func (*Folder) CreateDefaultFolders ¶
func (*Folder) List ¶
func (service *Folder) List(criteria exp.Expression, options ...option.Option) (data.Iterator, error)
List returns an iterator containing all of the Folders that match the provided criteria
func (*Folder) ListByUserID ¶
ListByUserID returns an iterator containing all of the Folders for a given user
func (*Folder) LoadByID ¶
func (service *Folder) LoadByID(userID primitive.ObjectID, folderID primitive.ObjectID, result *model.Folder) error
LoadByID loads a single stream that matches the provided ID
func (*Folder) LoadByLabel ¶
func (service *Folder) LoadByLabel(userID primitive.ObjectID, label string, result *model.Folder) error
LoadByLabel loads a single stream that matches the provided label
func (*Folder) LoadByOriginURL ¶
func (service *Folder) LoadByOriginURL(userID primitive.ObjectID, originURL string, result *model.Folder) error
LoadBySource locates a single stream that matches the provided OriginURL
func (*Folder) LoadByToken ¶
func (service *Folder) LoadByToken(userID primitive.ObjectID, token string, result *model.Folder) error
LoadByToken loads a single stream that matches the provided token
func (*Folder) ObjectDelete ¶
func (*Folder) ObjectList ¶
func (*Folder) ObjectLoad ¶
func (*Folder) ObjectQuery ¶
func (*Folder) ObjectSave ¶
func (*Folder) ObjectType ¶
ObjectType returns the type of object that this service manages
func (*Folder) ObjectUserCan ¶
func (*Folder) Query ¶
func (service *Folder) Query(criteria exp.Expression, options ...option.Option) ([]model.Folder, error)
Query returns a slice of Folders that math the provided criteria
func (*Folder) QueryByUserID ¶
QueryByUserID returns all folders for a given user
func (*Folder) Refresh ¶
func (service *Folder) Refresh(collection data.Collection)
Refresh updates any stateful data that is cached inside this service.
type FolderLookupProvider ¶
type FolderLookupProvider struct {
// contains filtered or unexported fields
}
func NewFolderLookupProvider ¶
func NewFolderLookupProvider(folderService *Folder, userID primitive.ObjectID) FolderLookupProvider
func (FolderLookupProvider) Add ¶
func (service FolderLookupProvider) Add(name string) (string, error)
func (FolderLookupProvider) Get ¶
func (service FolderLookupProvider) Get() []form.LookupCode
func (FolderLookupProvider) Group ¶
func (service FolderLookupProvider) Group(name string) form.LookupGroup
type Follower ¶
type Follower struct {
// contains filtered or unexported fields
}
func NewFollower ¶
func NewFollower(collection data.Collection, userService *User, host string) Follower
NewFollower returns a fully initialized Follower service
func (*Follower) ActivityPubID ¶
func (*Follower) ActivityPubObjectID ¶
func (*Follower) Close ¶
func (service *Follower) Close()
Close stops any background processes controlled by this service
func (*Follower) List ¶
func (service *Follower) List(criteria exp.Expression, options ...option.Option) (data.Iterator, error)
List returns an iterator containing all of the Followers who match the provided criteria
func (*Follower) ListActivityPub ¶
func (service *Follower) ListActivityPub(parentID primitive.ObjectID, options ...option.Option) (data.Iterator, error)
ListActivityPub returns an iterator containing all of the Followers of specific parentID
func (*Follower) ListWebSub ¶
func (service *Follower) ListWebSub(parentID primitive.ObjectID, options ...option.Option) (data.Iterator, error)
ListWebSub returns an iterator containing all of the Followers of specific parentID
func (*Follower) LoadByActivityPubFollower ¶
func (*Follower) LoadByActor ¶
func (*Follower) LoadByToken ¶
func (*Follower) LoadByWebSub ¶
func (service *Follower) LoadByWebSub(objectType string, parentID primitive.ObjectID, callback string, result *model.Follower) error
LoadByWebSub retrieves a follower based on the parentID and callback
func (*Follower) LoadByWebSubUnique ¶
func (service *Follower) LoadByWebSubUnique(objectType string, parentID primitive.ObjectID, callback string) (model.Follower, error)
LoadByWebSubUnique finds a follower based on the parentID and callback. If no follower is found, a new record is created.
func (*Follower) LoadOrCreate ¶
func (*Follower) NewActivityPubFollower ¶
func (*Follower) ObjectDelete ¶
func (*Follower) ObjectList ¶
func (*Follower) ObjectLoad ¶
func (*Follower) ObjectQuery ¶
func (*Follower) ObjectSave ¶
func (*Follower) ObjectType ¶
ObjectType returns the type of object that this service manages
func (*Follower) ObjectUserCan ¶
func (*Follower) QueryAllURLs ¶
func (service *Follower) QueryAllURLs(criteria exp.Expression) ([]string, error)
func (*Follower) Refresh ¶
func (service *Follower) Refresh(collection data.Collection)
Refresh updates any stateful data that is cached inside this service.
type Following ¶
type Following struct {
// contains filtered or unexported fields
}
Following manages all interactions with the Following collection
func NewFollowing ¶
func NewFollowing(collection data.Collection, streamService *Stream, userService *User, inboxService *Inbox, keyService *EncryptionKey, host string) Following
NewFollowing returns a fully populated Following service.
func (*Following) ActivityPubActorID ¶
func (*Following) ActivityPubID ¶
func (*Following) CallbackURL ¶
func (*Following) Close ¶
func (service *Following) Close()
Close stops the following service watcher
func (*Following) Connect ¶
Connect attempts to connect to a new URL and determines how to follow it.
func (*Following) Disconnect ¶
func (*Following) List ¶
func (service *Following) List(criteria exp.Expression, options ...option.Option) (data.Iterator, error)
List returns an iterator containing all of the Following who match the provided criteria
func (*Following) ListActivityPub ¶
func (*Following) ListByUserID ¶
ListByUserID returns an iterator of all following for a given userID
func (*Following) ListPollable ¶
ListPollable returns an iterator of all following that are ready to be polled
func (*Following) LoadByID ¶
func (service *Following) LoadByID(userID primitive.ObjectID, followingID primitive.ObjectID, result *model.Following) error
LoadByID retrieves an Following from the database. UserID is required to prevent people from snooping on other's following.
func (*Following) LoadByToken ¶
func (service *Following) LoadByToken(userID primitive.ObjectID, token string, result *model.Following) error
LoadByToken loads an individual following using a string version of the following ID
func (*Following) LoadByURL ¶
func (service *Following) LoadByURL(parentID primitive.ObjectID, profileUrl string, result *model.Following) error
LoadByURL loads an infividual following using the target URL that is being followed
func (*Following) ObjectDelete ¶
func (*Following) ObjectList ¶
func (*Following) ObjectLoad ¶
func (*Following) ObjectQuery ¶
func (*Following) ObjectSave ¶
func (*Following) ObjectType ¶
ObjectType returns the type of object that this service manages
func (*Following) ObjectUserCan ¶
func (*Following) PurgeInbox ¶
PurgeInbox removes all inbox items that are past their expiration date. TODO: LOW: Should this be in the Inbox service?
func (*Following) Query ¶
func (service *Following) Query(criteria exp.Expression, options ...option.Option) ([]model.Following, error)
Query returns an iterator containing all of the Following who match the provided criteria
func (*Following) QueryByFolder ¶
func (service *Following) QueryByFolder(userID primitive.ObjectID, folderID primitive.ObjectID) ([]model.FollowingSummary, error)
QueryByFolder returns a slice of all following for a given user
func (*Following) QueryByUser ¶
QueryByUser returns a slice of all following for a given user
func (*Following) Refresh ¶
func (service *Following) Refresh(collection data.Collection)
Refresh updates any stateful data that is cached inside this service.
func (*Following) SetStatus ¶
func (service *Following) SetStatus(following *model.Following, status string, statusMessage string) error
SetStatus updates the status (and statusMessage) of a Following record.
func (*Following) Start ¶
func (service *Following) Start()
Start begins the background scheduler that checks each following according to its own polling frequency TODO: HIGH: Need to make this configurable on a per-physical-server basis so that clusters can work together without hammering the Following collection.
type Group ¶
type Group struct {
// contains filtered or unexported fields
}
Group manages all interactions with the Group collection
func NewGroup ¶
func NewGroup(collection data.Collection) Group
NewGroup returns a fully populated Group service
func (*Group) Close ¶
func (service *Group) Close()
Close stops any background processes controlled by this service
func (*Group) List ¶
func (service *Group) List(criteria exp.Expression, options ...option.Option) (data.Iterator, error)
List returns an iterator containing all of the Groups who match the provided criteria
func (*Group) ListAsOptions ¶
func (service *Group) ListAsOptions() []form.LookupCode
func (*Group) ListByGroup ¶
ListByGroup returns all groups that match a provided group name
func (*Group) LoadByID ¶
LoadByID loads a single model.Group object that matches the provided groupID
func (*Group) LoadByToken ¶
LoadByGroupname loads a single Group object that matches the provided token
func (*Group) ObjectDelete ¶
func (*Group) ObjectList ¶
func (*Group) ObjectLoad ¶
func (*Group) ObjectQuery ¶
func (*Group) ObjectSave ¶
func (*Group) ObjectType ¶
ObjectType returns the type of object that this service manages
func (*Group) ObjectUserCan ¶
func (*Group) Refresh ¶
func (service *Group) Refresh(collection data.Collection)
Refresh updates any stateful data that is cached inside this service.
type GroupLookupProvider ¶
type GroupLookupProvider struct {
// contains filtered or unexported fields
}
func NewGroupLookupProvider ¶
func NewGroupLookupProvider(groupService *Group) GroupLookupProvider
func (GroupLookupProvider) Add ¶
func (service GroupLookupProvider) Add(name string) (string, error)
func (GroupLookupProvider) Get ¶
func (service GroupLookupProvider) Get() []form.LookupCode
type Inbox ¶
type Inbox struct {
// contains filtered or unexported fields
}
Inbox manages all Inbox records for a User. This includes Inbox and Outbox
func NewInbox ¶
func NewInbox(collection data.Collection) Inbox
NewInbox returns a fully populated Inbox service
func (*Inbox) Close ¶
func (service *Inbox) Close()
Close stops any background processes controlled by this service
func (*Inbox) DeleteByFolder ¶
func (*Inbox) DeleteByOrigin ¶
func (*Inbox) DeleteMany ¶
func (service *Inbox) DeleteMany(criteria exp.Expression, note string) error
DeleteMany removes all child streams from the provided stream (virtual delete)
func (*Inbox) List ¶
func (service *Inbox) List(criteria exp.Expression, options ...option.Option) (data.Iterator, error)
List returns an iterator containing all of the Activities that match the provided criteria
func (*Inbox) ListByFolder ¶
func (*Inbox) ListByFollowingID ¶
func (*Inbox) LoadByRank ¶
func (*Inbox) LoadOrCreate ¶
func (*Inbox) ObjectDelete ¶
func (*Inbox) ObjectList ¶
func (*Inbox) ObjectLoad ¶
func (*Inbox) ObjectQuery ¶
func (*Inbox) ObjectType ¶
ObjectType returns the type of object that this service manages
func (*Inbox) ObjectUserCan ¶
func (*Inbox) Query ¶
func (service *Inbox) Query(criteria exp.Expression, options ...option.Option) ([]model.Message, error)
Query returns a slice containing all of the Activities that match the provided criteria
func (*Inbox) QueryByUserID ¶
func (*Inbox) QueryPurgeable ¶
QueryPurgeable returns a list of Inboxs that are older than the purge date for this following
func (*Inbox) Refresh ¶
func (service *Inbox) Refresh(collection data.Collection)
Refresh updates any stateful data that is cached inside this service.
func (*Inbox) SetReadDate ¶
SetReadDate updates the readDate for a single Inbox IF it is not already read
type JWT ¶
type JWT struct { }
JWT is a service that generates and validates JWT keys.
func (JWT) FindJWTKey ¶
type LookupProvider ¶
type LookupProvider struct {
// contains filtered or unexported fields
}
func NewLookupProvider ¶
func (LookupProvider) Group ¶
func (service LookupProvider) Group(path string) form.LookupGroup
type Mention ¶
type Mention struct {
// contains filtered or unexported fields
}
Mention defines a service that can send and receive mention data
func NewMention ¶
func NewMention(collection data.Collection) Mention
NewMention returns a fully initialized Mention service
func (*Mention) Close ¶
func (service *Mention) Close()
Close stops any background processes controlled by this service
func (*Mention) DiscoverEndpoint ¶
DiscoverEndpoint tries to find the Mention endpoint for the provided URL
func (*Mention) List ¶
func (service *Mention) List(criteria exp.Expression, options ...option.Option) (data.Iterator, error)
List returns an iterator containing all of the Mentions that match the provided criteria
func (*Mention) ObjectDelete ¶
func (*Mention) ObjectList ¶
func (*Mention) ObjectLoad ¶
func (*Mention) ObjectQuery ¶
func (*Mention) ObjectSave ¶
func (*Mention) ObjectType ¶
ObjectType returns the type of object that this service manages
func (*Mention) ObjectUserCan ¶
func (*Mention) ParseMicroformats ¶
func (*Mention) Query ¶
func (service *Mention) Query(criteria exp.Expression, options ...option.Option) ([]model.Mention, error)
Query returns a slice containing all of the Mentions that match the provided criteria
func (*Mention) QueryByObjectID ¶
func (*Mention) Refresh ¶
func (service *Mention) Refresh(collection data.Collection)
Refresh updates any stateful data that is cached inside this service.
type ModelService ¶
type ModelService interface { ObjectType() string ObjectID(data.Object) primitive.ObjectID ObjectNew() data.Object ObjectQuery(any, exp.Expression, ...option.Option) error ObjectList(exp.Expression, ...option.Option) (data.Iterator, error) ObjectLoad(exp.Expression) (data.Object, error) ObjectSave(data.Object, string) error ObjectDelete(data.Object, string) error ObjectUserCan(data.Object, model.Authorization, string) error Schema() schema.Schema }
ModelService interface wraps the generic Object-* functions that standard services provide
type Origin ¶
type Origin struct {
// contains filtered or unexported fields
}
Origin service polls external Stream origins for new external Streams.
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider service manages all access to external services
func NewProvider ¶
NewProvider returns a fully initialized Provider service
func (*Provider) GetGiphyProvider ¶
func (*Provider) GetProvider ¶
GetProvider returns a populated adapter for the given provider
func (*Provider) GetStripeProvider ¶
GetStripeProvider returns a populated Stripe adapter
type Publisher ¶
type Publisher struct {
// contains filtered or unexported fields
}
func NewPublisher ¶
type RSS ¶
type RSS struct {
// contains filtered or unexported fields
}
RSS service generates RSS feeds of the available streams in the database
type ServerEmail ¶
type ServerEmail struct {
// contains filtered or unexported fields
}
func NewServerEmail ¶
func NewServerEmail(filesystemService Filesystem, funcMap template.FuncMap, locations []config.Folder) ServerEmail
func (*ServerEmail) Refresh ¶
func (service *ServerEmail) Refresh(locations []config.Folder)
type SterankoUserService ¶
type SterankoUserService struct {
// contains filtered or unexported fields
}
SterankoUserService is a wrapper/adapter that makes the User service compatable with Steranko.
func NewSterankoUserService ¶
func NewSterankoUserService(userService *User, domainEmail *DomainEmail) SterankoUserService
NewSterankoUserService returns a fully populated SterankoUserService.
func (SterankoUserService) Close ¶
func (service SterankoUserService) Close()
Close is required to implement the steranko.UserService interface
func (SterankoUserService) Delete ¶
func (service SterankoUserService) Delete(user steranko.User, comment string) error
Delete removes a single User from the database
func (SterankoUserService) Load ¶
func (service SterankoUserService) Load(username string, result steranko.User) error
Load retrieves a single User from the database
func (SterankoUserService) New ¶
func (service SterankoUserService) New() steranko.User
New creates a newly initialized User that is ready to use
func (SterankoUserService) NewClaims ¶
func (service SterankoUserService) NewClaims() jwt.Claims
NewClaims creates a new JWT claim object
func (SterankoUserService) RequestPasswordReset ¶
func (service SterankoUserService) RequestPasswordReset(user steranko.User) error
RequestPasswordReset is not currently implemented in this service. (TODO)
type Stream ¶
type Stream struct {
// contains filtered or unexported fields
}
Stream manages all interactions with the Stream collection
func NewStream ¶
func NewStream(collection data.Collection, templateService *Template, attachmentService *Attachment, hostName string, streamUpdateChannel chan model.Stream) Stream
NewStream returns a fully populated Stream service.
func (*Stream) Close ¶
func (service *Stream) Close()
Close stops any background processes controlled by this service
func (*Stream) DeleteByParent ¶
func (*Stream) DeleteMany ¶
func (service *Stream) DeleteMany(criteria exp.Expression, note string) error
DeleteMany removes all child streams from the provided stream (virtual delete)
func (*Stream) DeleteRelatedDuplicate ¶
func (service *Stream) DeleteRelatedDuplicate(parentID primitive.ObjectID, originalStreamID primitive.ObjectID) error
Delete RelatedDuplicate hard deletes any inbox/outbox streams that point to the same original.
func (*Stream) List ¶
func (service *Stream) List(criteria exp.Expression, options ...option.Option) (data.Iterator, error)
List returns an iterator containing all of the Streams that match the provided criteria
func (*Stream) ListByParent ¶
ListByParent returns all Streams that match a particular parentID
func (*Stream) ListByTemplate ¶
ListByTemplate returns all `Streams` that use a particular `Template`
func (*Stream) ListNavigation ¶
ListNavigation returns all Streams of type FOLDER at the top of the hierarchy
func (*Stream) LoadByOriginID ¶
LoadByOriginID returns a single `Stream` that matches the provided `Origin.InternalID`
func (*Stream) LoadByProductID ¶
LoadByProductID returns a single `Stream` with custom data matching the provided `Data.productId`
func (*Stream) LoadByToken ¶
LoadByToken returns a single `Stream` that matches a particular `Token`
func (*Stream) LoadByURL ¶
LoadByURL returns a single stream that matches the domain and path of the provided URL
func (*Stream) LoadFirstAttachment ¶
func (*Stream) LoadFirstSibling ¶
func (*Stream) LoadLastSibling ¶
func (*Stream) LoadNavigationByID ¶
LoadNavigationByID locates a single stream in the top level of the site hierarchy
func (*Stream) LoadNextSibling ¶
func (*Stream) LoadParent ¶
LoadParent returns the Stream that is the parent of the provided Stream
func (*Stream) LoadPrevSibling ¶
func (*Stream) LoadWebFinger ¶
func (*Stream) LoadWithOptions ¶
func (*Stream) New ¶
func (service *Stream) New(navigationID string, parentID primitive.ObjectID, templateID string) (model.Stream, model.Template, error)
New returns a new stream that uses the named template.
func (*Stream) ObjectDelete ¶
func (*Stream) ObjectList ¶
func (*Stream) ObjectLoad ¶
func (*Stream) ObjectQuery ¶
func (*Stream) ObjectSave ¶
func (*Stream) ObjectType ¶
ObjectType returns the type of object that this service manages
func (*Stream) ObjectUserCan ¶
func (*Stream) Outbox ¶
func (service *Stream) Outbox(ownerID primitive.ObjectID, criteria exp.Expression, options ...option.Option) ([]model.StreamSummary, error)
func (*Stream) PurgeDeleted ¶
PurgeDeleted hard deletes all items with the given ancestor that have already been soft-deleted
func (*Stream) Query ¶
func (service *Stream) Query(criteria exp.Expression, options ...option.Option) ([]model.Stream, error)
Query returns an slice containing all of the Streams that match the provided criteria
func (*Stream) QuerySummary ¶
func (service *Stream) QuerySummary(criteria exp.Expression, options ...option.Option) ([]model.StreamSummary, error)
QuerySummary returns an slice containing StreamSummaries for all of the Streams that match the provided criteria
func (*Stream) Refresh ¶
func (service *Stream) Refresh(hostName string, collection data.Collection, draftService *StreamDraft)
Refresh updates any stateful data that is cached inside this service.
func (*Stream) RestoreDeleted ¶
RestoreDeleted un-deletes all soft-deleted records underneath a common ancestor.
type StreamDraft ¶
type StreamDraft struct {
// contains filtered or unexported fields
}
StreamDraft manages all interactions with the StreamDraft collection
func NewStreamDraft ¶
func NewStreamDraft(collection data.Collection, streamService *Stream) StreamDraft
NewStreamDraft returns a fully populated StreamDraft service.
func (*StreamDraft) Close ¶
func (service *StreamDraft) Close()
Close stops any background processes controlled by this service
func (*StreamDraft) Delete ¶
func (service *StreamDraft) Delete(draft *model.Stream, _note string) error
Delete removes an StreamDraft from the database (hard delete)
func (*StreamDraft) Load ¶
func (service *StreamDraft) Load(criteria exp.Expression, result *model.Stream) error
Load either: 1) loads a valid draft from the database, or 2) creates a new draft and returns it instead
func (*StreamDraft) LoadByToken ¶
func (service *StreamDraft) LoadByToken(token string, result *model.Stream) error
LoadByToken returns a single Stream that matches a particular Token
func (*StreamDraft) New ¶
func (service *StreamDraft) New() model.Stream
New creates a newly initialized StreamDraft that is ready to use
func (*StreamDraft) ObjectDelete ¶
func (service *StreamDraft) ObjectDelete(object data.Object, comment string) error
func (*StreamDraft) ObjectID ¶
func (service *StreamDraft) ObjectID(object data.Object) primitive.ObjectID
func (*StreamDraft) ObjectList ¶
func (service *StreamDraft) ObjectList(criteria exp.Expression, options ...option.Option) (data.Iterator, error)
func (*StreamDraft) ObjectLoad ¶
func (service *StreamDraft) ObjectLoad(criteria exp.Expression) (data.Object, error)
func (*StreamDraft) ObjectNew ¶
func (service *StreamDraft) ObjectNew() data.Object
New returns a fully initialized model.Stream as a data.Object.
func (*StreamDraft) ObjectQuery ¶
func (service *StreamDraft) ObjectQuery(result any, criteria exp.Expression, options ...option.Option) error
func (*StreamDraft) ObjectSave ¶
func (service *StreamDraft) ObjectSave(object data.Object, comment string) error
func (*StreamDraft) ObjectType ¶
func (service *StreamDraft) ObjectType() string
ObjectType returns the type of object that this service manages
func (*StreamDraft) ObjectUserCan ¶
func (service *StreamDraft) ObjectUserCan(object data.Object, authorization model.Authorization, action string) error
func (*StreamDraft) Refresh ¶
func (service *StreamDraft) Refresh(collection data.Collection)
Refresh updates any stateful data that is cached inside this service.
func (*StreamDraft) Save ¶
func (service *StreamDraft) Save(draft *model.Stream, note string) error
save adds/updates an StreamDraft in the database
func (*StreamDraft) Schema ¶
func (service *StreamDraft) Schema() schema.Schema
type Template ¶
type Template struct {
// contains filtered or unexported fields
}
Template service manages all of the templates in the system, and merges them with data to form fully populated HTML pages.
func NewTemplate ¶
func NewTemplate(filesystemService Filesystem, themeService *Theme, widgetService *Widget, funcMap template.FuncMap, locations []config.Folder) *Template
NewTemplate returns a fully initialized Template service.
func (*Template) ListByContainer ¶
func (service *Template) ListByContainer(containedByRole string) []form.LookupCode
ListByContainer returns all model.Templates that match the provided "containedByRole" value
func (*Template) ListByContainerLimited ¶
func (service *Template) ListByContainerLimited(containedByRole string, limits sliceof.String) []form.LookupCode
ListByContainerLimited returns all model.Templates that match the provided "containedByRole" value AND are present in the "limited" list. If the "limited" list is empty, then all otherwise-valid templates are returned.
type Theme ¶
type Theme struct {
// contains filtered or unexported fields
}
Theme service manages the global site theme that is stored in a particular path of the filesystem.
type ThemeLookupProvider ¶
type ThemeLookupProvider struct {
// contains filtered or unexported fields
}
func NewThemeLookupProvider ¶
func NewThemeLookupProvider(themeService *Theme) ThemeLookupProvider
func (ThemeLookupProvider) Get ¶
func (service ThemeLookupProvider) Get() []form.LookupCode
type User ¶
type User struct {
// contains filtered or unexported fields
}
User manages all interactions with the User collection
func NewUser ¶
func NewUser(userCollection data.Collection, followerCollection data.Collection, followingCollection data.Collection, blockCollection data.Collection, streamService *Stream, keyService *EncryptionKey, emailService *DomainEmail, folderService *Folder, host string) User
NewUser returns a fully populated User service
func (*User) ActivityPubActor ¶
ActivityPubActor returns an ActivityPub Actor object ** WHICH INCLUDES ENCRYPTION KEYS ** for the provided user.
func (*User) ActivityPubPublicKeyURL ¶
func (*User) CalcFollowerCount ¶
func (*User) CalcFollowingCount ¶
func (*User) Close ¶
func (service *User) Close()
Close stops any background processes controlled by this service
func (*User) List ¶
List returns an iterator containing all of the Users who match the provided criteria
func (*User) ListByGroup ¶
ListByGroup returns all users that match a provided group name
func (*User) ListByIdentities ¶
ListByIdentities returns all users that appear in the list of identities
func (*User) ListOwnersAsSlice ¶
func (service *User) ListOwnersAsSlice() []model.UserSummary
func (*User) LoadByResetCode ¶
func (*User) LoadByToken ¶
LoadByUsername loads a single model.User object that matches the provided token
func (*User) LoadByUsername ¶
LoadByUsername loads a single model.User object that matches the provided username
func (*User) LoadByUsernameOrEmail ¶
LoadByUsernameOrEmail loads a single model.User object that matches the provided username
func (*User) LoadWebFinger ¶
func (*User) MakeNewPasswordResetCode ¶
MakeNewPasswordResetCode generates a new password reset code for the provided user.
func (*User) ObjectDelete ¶
func (*User) ObjectList ¶
func (*User) ObjectLoad ¶
func (*User) ObjectQuery ¶
func (*User) ObjectType ¶
ObjectType returns the type of object that this service manages
func (*User) ObjectUserCan ¶
func (*User) ParseProfileURL ¶
ParseProfileURL parses (or looks up) the correct UserID from a given URL. Unlike the package-level ParseProfileURL, this method can resolve usernames into objectIDs because it has access to the database server.
func (*User) Refresh ¶
func (service *User) Refresh(userCollection data.Collection, followerCollection data.Collection, followingCollection data.Collection, blockCollection data.Collection)
Refresh updates any stateful data that is cached inside this service.
func (*User) RemoteFollowURL ¶
func (*User) ResetPassword ¶
ResetPassword resets the password for the provided user
func (*User) SendPasswordResetEmail ¶
SendPasswordResetEmail generates a new password reset code and sends a welcome email to a new user. If there is a problem sending the email, then the new code is not saved.
func (*User) SendWelcomeEmail ¶
SendWelcomeEmail generates a new password reset code and sends a welcome email to a new user. If there is a problem sending the email, then the new code is not saved.
type UserStream ¶
type UserStream struct {
// contains filtered or unexported fields
}
UserStream manages all interactions with UserStream data.
func NewUserStream ¶
func NewUserStream(collection data.Collection, ctx context.Context) UserStream
NewUserStream returns a fully initialized UserStream service
func (*UserStream) Delete ¶
func (service *UserStream) Delete(stream *model.UserStream, note string) error
Delete removes an UserStream from the database (virtual delete)
func (*UserStream) List ¶
func (service *UserStream) List(criteria exp.Expression, options ...option.Option) (data.Iterator, error)
List returns an iterator containing all of the UserStreams who match the provided criteria
func (*UserStream) Load ¶
func (service *UserStream) Load(criteria exp.Expression, stream *model.UserStream) error
Load retrieves an UserStream from the database
func (UserStream) LoadByUserAndStream ¶
func (service UserStream) LoadByUserAndStream(userID primitive.ObjectID, streamID primitive.ObjectID) (model.UserStream, error)
func (*UserStream) Save ¶
func (service *UserStream) Save(stream *model.UserStream, note string) error
Save adds/updates an UserStream in the database
func (UserStream) VoteCount ¶
func (service UserStream) VoteCount(streamID primitive.ObjectID) ([]queries.VoteCountResult, error)
VoteCount returns the totals for all votes for the designated stream
func (UserStream) VoteDetail ¶
func (service UserStream) VoteDetail(streamID primitive.ObjectID) ([]queries.VoteDetailResult, error)
VoteDetails returns a list of users and their vote for the designated stream
func (UserStream) VoteRunes ¶
func (service UserStream) VoteRunes() []string
VoteRunes returns the default runes to be used for "votes"
type Widget ¶
type Widget struct {
// contains filtered or unexported fields
}
Widget service manages the global, in-memory library of widget templates that can be applied to any Stream
func (*Widget) Add ¶
Add loads a widget definition from a filesystem, and adds it to the in-memory library.
func (*Widget) IsValidWidgetType ¶
func (*Widget) List ¶
func (service *Widget) List() []form.LookupCode
Source Files
¶
- activityStream.go
- attachment.go
- block.go
- bundle.go
- config.go
- content.go
- domain.go
- domainEmail.go
- encryptionKey.go
- filesystem.go
- folder.go
- folder_lookupProvider.go
- follower.go
- following.go
- following_activityPub.go
- following_connect.go
- following_discovery.go
- following_helpers.go
- following_html.go
- following_interfaces.go
- following_jsonFeed.go
- following_rss.go
- following_webSub.go
- group.go
- group_lookupProvider.go
- icons.go
- inbox.go
- jwt.go
- locator.go
- lookupProvider.go
- mention.go
- modelService.go
- origin.go
- provider.go
- publisher.go
- rss.go
- scheduler.go
- serverEmail.go
- steranko.go
- stream.go
- streamDraft.go
- streamWatcher.go
- template.go
- theme.go
- theme_lookupProvider.go
- user.go
- userStream.go
- utilities.go
- widget.go