Documentation
¶
Overview ¶
Package build contains build objects, which are passed to HTML templates to generate HTML pages. Render objects wrap a specific model object, providing some safety against direct access to protected data. Render objects also include additional methods to query related records in the database. For example, the "Stream" builder has queries for `Ancestors`, `Parent`, `Siblings`, and `Children` streams.
This package also contains implementations for all the action steps available to template designers.
Index ¶
- func AsHTML(factory Factory, ctx echo.Context, b Builder, actionMethod ActionMethod) error
- func CloseModal(ctx echo.Context)
- func FuncMap(icons icon.Provider) template.FuncMap
- func RefreshPage(ctx echo.Context)
- func TriggerEvent(ctx echo.Context, event string)
- func WrapForm(endpoint string, content string, encoding string, options ...string) string
- func WrapInlineError(response http.ResponseWriter, err error) error
- func WrapInlineSuccess(response http.ResponseWriter, message any) error
- func WrapModal(response http.ResponseWriter, content string, options ...string) string
- func WrapModalForm(response http.ResponseWriter, endpoint string, content string, encoding string, ...) string
- func WrapModalWithCloseButton(response http.ResponseWriter, content string, options ...string) string
- func WrapTooltip(response http.ResponseWriter, content string) string
- type ActionMethod
- type Attachment
- func (w Attachment) AmFollowing(url string) model.Following
- func (w Attachment) AttachmentID() string
- func (w Attachment) BasePath() string
- func (w Attachment) Category() string
- func (w Attachment) CreateDate() int64
- func (w Attachment) Description() string
- func (w Attachment) Duration() int
- func (w Attachment) Height() int
- func (w Attachment) Label() string
- func (w Attachment) ObjectID() string
- func (w Attachment) ObjectType() string
- func (w Attachment) Original() string
- func (w Attachment) PageTitle() string
- func (w Attachment) Permalink() string
- func (w Attachment) Rank() int
- func (w Attachment) Render() (template.HTML, error)
- func (w Attachment) Rules() model.AttachmentRules
- func (w Attachment) Status() string
- func (w Attachment) Token() string
- func (w Attachment) URL() string
- func (w Attachment) UpdateDate() int64
- func (w Attachment) UserCan(string) bool
- func (w Attachment) View(actionID string) (template.HTML, error)
- func (w Attachment) Width() int
- type Builder
- type Common
- func (w Common) ActivityStream(url string) streams.Document
- func (w Common) ActivityStreamActor(url string) streams.Document
- func (w Common) ActivityStreamActors(search string) ([]model.ActorSummary, error)
- func (w Common) AdminSections() []form.LookupCode
- func (w Common) AllowedSearchTags() *QueryBuilder[model.SearchTag]
- func (w Common) AuthenticatedID() primitive.ObjectID
- func (w Common) Dataset(name string) form.LookupGroup
- func (w Common) DatasetValue(name string, value string) form.LookupCode
- func (w Common) DomainHasRegistrationForm() (bool, error)
- func (w Common) DomainLabel() (string, error)
- func (w Common) FeaturedSearchTags() *QueryBuilder[model.SearchTag]
- func (w Common) GetBool(name string) bool
- func (w Common) GetContent() template.HTML
- func (w Common) GetFloat(name string) float64
- func (w Common) GetFollowingID(url string) string
- func (w Common) GetHTML(name string) template.HTML
- func (w Common) GetInt(name string) int
- func (w Common) GetInt64(name string) int64
- func (w Common) GetResponseID(responseType string, url string) string
- func (w Common) GetResponseSummary(url string) model.UserResponseSummary
- func (w Common) GetString(name string) string
- func (w Common) Host() string
- func (w Common) Hostname() string
- func (w Common) IsAuthenticated() bool
- func (w Common) IsMe(url string) bool
- func (w Common) IsOwner() bool
- func (w Common) IsPartialRequest() bool
- func (w Common) Method() string
- func (w Common) Navigation() (sliceof.Object[model.StreamSummary], error)
- func (w Common) NavigationID() string
- func (w Common) NotMe(url string) bool
- func (w Common) Now() int64
- func (w Common) PageTitle() string
- func (w Common) Path() string
- func (w Common) PathList() list.List
- func (w Common) Protocol() string
- func (w Common) QueryParam(param string) string
- func (w Common) QueryString() template.URL
- func (w Common) Search() SearchBuilder
- func (w Common) SearchTag(tagName string) model.SearchTag
- func (w Common) SetContent(value string)
- func (w Common) SetQueryParam(name string, value string)
- func (w Common) Summary() string
- func (w Common) URL() string
- func (w Common) UserCan(_ string) bool
- func (w Common) UserImage() (string, error)
- func (w Common) UserName() (string, error)
- type CommonWithTemplate
- type DocumentLinker
- type Domain
- func (w Domain) AllConnections() mapof.Object[model.Connection]
- func (w Domain) BasePath() string
- func (w Domain) NavigationID() string
- func (w Domain) PageTitle() string
- func (w Domain) Permalink() string
- func (w Domain) PropertyForm() form.Element
- func (w Domain) Provider(providerID string) providers.Provider
- func (w Domain) Providers() []form.LookupCode
- func (w Domain) RegistrationTemplate() model.Registration
- func (w Domain) RegistrationTemplates() []form.LookupCode
- func (w Domain) Render() (template.HTML, error)
- func (w Domain) Theme(themeID string) model.Theme
- func (w Domain) ThemeID() string
- func (w Domain) Themes() []model.Theme
- func (w Domain) Token() string
- func (w Domain) View(actionID string) (template.HTML, error)
- type Factory
- type Follower
- func (w Follower) Actor() model.PersonLink
- func (w Follower) AmFollowing(url string) model.Following
- func (w Follower) BasePath() string
- func (w Follower) CreateDate() int64
- func (w Follower) Data(value string) any
- func (w Follower) ExpireDate() int64
- func (w Follower) FollowerID() primitive.ObjectID
- func (w Follower) Format() string
- func (w Follower) Label() string
- func (w Follower) Method() string
- func (w Follower) PageTitle() string
- func (w Follower) ParentID() primitive.ObjectID
- func (w Follower) ParentType() string
- func (w Follower) Permalink() string
- func (w Follower) Render() (template.HTML, error)
- func (w Follower) StateID() string
- func (w Follower) Token() string
- func (w Follower) UpdateDate() int64
- func (w Follower) UserCan(string) bool
- func (w Follower) View(actionID string) (template.HTML, error)
- type Group
- func (w Group) BasePath() string
- func (w Group) GroupID() string
- func (w Group) Groups() *QueryBuilder[model.Group]
- func (w Group) Label() string
- func (w Group) NavigationID() string
- func (w Group) PageTitle() string
- func (w Group) Permalink() string
- func (w Group) Render() (template.HTML, error)
- func (w Group) Token() string
- func (w Group) View(actionID string) (template.HTML, error)
- type Inbox
- func (w Inbox) AmFollowing(url string) model.Following
- func (w Inbox) AnnouncesBefore(url string, dateString string, maxRows int) sliceof.Object[streams.Document]
- func (w Inbox) BasePath() string
- func (w Inbox) DisplayName() string
- func (w Inbox) FilteredByFollowing() model.Following
- func (w Inbox) Folders() (model.FolderList, error)
- func (w Inbox) FoldersWithSelection() (model.FolderList, error)
- func (w Inbox) FollowerCount() int
- func (w Inbox) Followers() QueryBuilder[model.FollowerSummary]
- func (w Inbox) Following() QueryBuilder[model.FollowingSummary]
- func (w Inbox) FollowingByFolder(token string) ([]model.FollowingSummary, error)
- func (w Inbox) FollowingByToken(followingToken string) (model.Following, error)
- func (w Inbox) FollowingCount() int
- func (w Inbox) HasRule(ruleType string, trigger string) model.Rule
- func (w Inbox) IconURL() string
- func (w Inbox) Inbox() (QueryBuilder[model.Message], error)
- func (w Inbox) IsInboxEmpty(inbox []model.Message) bool
- func (w Inbox) LikesBefore(url string, dateString string, maxRows int) sliceof.Object[streams.Document]
- func (w Inbox) Message() model.Message
- func (w Inbox) Myself() bool
- func (w Inbox) NavigationID() string
- func (w Inbox) PageTitle() string
- func (w Inbox) Permalink() string
- func (w Inbox) ProfileURL() string
- func (w Inbox) Render() (template.HTML, error)
- func (w Inbox) RepliesAfter(url string, dateString string, maxRows int) sliceof.Object[streams.Document]
- func (w Inbox) RepliesBefore(url string, dateString string, maxRows int) sliceof.Object[streams.Document]
- func (w Inbox) RuleByToken(token string) model.Rule
- func (w Inbox) RuleCount() int
- func (w Inbox) Rules() QueryBuilder[model.Rule]
- func (w Inbox) SubBuilder(object any) (Builder, error)
- func (w Inbox) Token() string
- func (w Inbox) UserCan(actionID string) bool
- func (w Inbox) UserID() string
- func (w Inbox) Username() string
- func (w Inbox) View(actionID string) (template.HTML, error)
- type Model
- func (w Model) BasePath() string
- func (w Model) Label() string
- func (w Model) Object() any
- func (w Model) PageTitle() string
- func (w Model) Permalink() string
- func (w Model) Render() (template.HTML, error)
- func (w Model) Token() string
- func (w Model) UserCan(string) bool
- func (w Model) View(actionID string) (template.HTML, error)
- type Navigation
- func (w Navigation) BasePath() string
- func (w Navigation) NavigationID() string
- func (w Navigation) PageTitle() string
- func (w Navigation) Permalink() string
- func (w Navigation) Render() (template.HTML, error)
- func (w Navigation) Token() string
- func (w Navigation) View(actionID string) (template.HTML, error)
- type OAuthAuthorization
- func (r OAuthAuthorization) ClientID() string
- func (r OAuthAuthorization) Name() string
- func (r OAuthAuthorization) RedirectURI() string
- func (r OAuthAuthorization) ResponseType() string
- func (r OAuthAuthorization) Scope() string
- func (r OAuthAuthorization) Scopes() []string
- func (r OAuthAuthorization) Website() string
- type Outbox
- func (w Outbox) ActivityPubFollowersURL() string
- func (w Outbox) ActivityPubFollowingURL() string
- func (w Outbox) ActivityPubIconURL() string
- func (w Outbox) ActivityPubInboxURL() string
- func (w Outbox) ActivityPubLikedURL() string
- func (w Outbox) ActivityPubOutboxURL() string
- func (w Outbox) ActivityPubPublicKeyURL() string
- func (w Outbox) ActivityPubURL() string
- func (w Outbox) BasePath() string
- func (w Outbox) Data(path string) any
- func (w Outbox) DisplayName() string
- func (w Outbox) FollowerCount() int
- func (w Outbox) FollowingCount() int
- func (w Outbox) IconURL() string
- func (w Outbox) ImageURL() string
- func (w Outbox) IsIndexable() bool
- func (w Outbox) IsMyself() bool
- func (w Outbox) IsPublic() bool
- func (w Outbox) Links() sliceof.Object[model.PersonLink]
- func (w Outbox) Location() string
- func (w Outbox) Myself() bool
- func (w Outbox) NavigationID() string
- func (w Outbox) OEmbedJSON() string
- func (w Outbox) OEmbedXML() string
- func (w Outbox) Outbox() QueryBuilder[model.StreamSummary]
- func (w Outbox) PageTitle() string
- func (w Outbox) Permalink() string
- func (w Outbox) ProfileURL() string
- func (w Outbox) Render() (template.HTML, error)
- func (w Outbox) Replies() QueryBuilder[model.StreamSummary]
- func (w Outbox) Responses() QueryBuilder[model.Response]
- func (w Outbox) RuleCount() int
- func (w Outbox) StateID() string
- func (w Outbox) StatusMessage() string
- func (w Outbox) Tags() sliceof.Object[mapof.String]
- func (w Outbox) Token() string
- func (w Outbox) UserCan(actionID string) bool
- func (w Outbox) UserID() string
- func (w Outbox) Username() string
- func (w Outbox) View(actionID string) (template.HTML, error)
- type Pipeline
- func (pipeline Pipeline) Execute(factory Factory, builder Builder, buffer io.Writer, actionMethod ActionMethod) PipelineResult
- func (pipeline Pipeline) Get(factory Factory, builder Builder, buffer io.Writer) PipelineResult
- func (pipeline Pipeline) IsEmpty() bool
- func (pipeline Pipeline) Post(factory Factory, builder Builder, buffer io.Writer) PipelineResult
- type PipelineBehavior
- func (exit PipelineBehavior) AsFullPage() PipelineBehavior
- func (exit PipelineBehavior) RemoveEvent(name string) PipelineBehavior
- func (exit PipelineBehavior) WithContentType(contentType string) PipelineBehavior
- func (exit PipelineBehavior) WithError(err error) PipelineBehavior
- func (exit PipelineBehavior) WithEvent(name string, value string) PipelineBehavior
- func (exit PipelineBehavior) WithHeader(name string, value string) PipelineBehavior
- func (exit PipelineBehavior) WithStatusCode(statusCode int) PipelineBehavior
- type PipelineHalter
- type PipelineResult
- type PropertyFormGetter
- type QueryBuilder
- func (builder QueryBuilder[T]) All() QueryBuilder[T]
- func (builder QueryBuilder[T]) By(sortField string) QueryBuilder[T]
- func (builder QueryBuilder[T]) ByCreateDate() QueryBuilder[T]
- func (builder QueryBuilder[T]) ByDisplayName() QueryBuilder[T]
- func (builder QueryBuilder[T]) ByExpirationDate() QueryBuilder[T]
- func (builder QueryBuilder[T]) ByLabel() QueryBuilder[T]
- func (builder QueryBuilder[T]) ByName() QueryBuilder[T]
- func (builder QueryBuilder[T]) ByPublishDate() QueryBuilder[T]
- func (builder QueryBuilder[T]) ByRank() QueryBuilder[T]
- func (builder QueryBuilder[T]) ByRankAlt() QueryBuilder[T]
- func (builder QueryBuilder[T]) ByReadDate() QueryBuilder[T]
- func (builder QueryBuilder[T]) ByUpdateDate() QueryBuilder[T]
- func (builder QueryBuilder[T]) CaseInsensitive() QueryBuilder[T]
- func (builder QueryBuilder[T]) CaseSensitive() QueryBuilder[T]
- func (builder QueryBuilder[T]) Count() (int64, error)
- func (builder QueryBuilder[T]) Featured() QueryBuilder[T]
- func (builder QueryBuilder[T]) Indexable() QueryBuilder[T]
- func (builder QueryBuilder[T]) Reverse() QueryBuilder[T]
- func (builder QueryBuilder[T]) Slice() (sliceof.Object[T], error)
- func (builder QueryBuilder[T]) Tags(tags ...string) QueryBuilder[T]
- func (builder QueryBuilder[T]) Top1() QueryBuilder[T]
- func (builder QueryBuilder[T]) Top12() QueryBuilder[T]
- func (builder QueryBuilder[T]) Top120() QueryBuilder[T]
- func (builder QueryBuilder[T]) Top150() QueryBuilder[T]
- func (builder QueryBuilder[T]) Top200() QueryBuilder[T]
- func (builder QueryBuilder[T]) Top30() QueryBuilder[T]
- func (builder QueryBuilder[T]) Top300() QueryBuilder[T]
- func (builder QueryBuilder[T]) Top400() QueryBuilder[T]
- func (builder QueryBuilder[T]) Top500() QueryBuilder[T]
- func (builder QueryBuilder[T]) Top6() QueryBuilder[T]
- func (builder QueryBuilder[T]) Top60() QueryBuilder[T]
- func (builder QueryBuilder[T]) Top600() QueryBuilder[T]
- func (builder QueryBuilder[T]) Where(field string, value any) QueryBuilder[T]
- func (builder QueryBuilder[T]) WhereBeginsWith(field string, value string) QueryBuilder[T]
- func (builder QueryBuilder[T]) WhereContains(field string, value string) QueryBuilder[T]
- func (builder QueryBuilder[T]) WhereGT(field string, value any) QueryBuilder[T]
- func (builder QueryBuilder[T]) WhereIN(field string, value any) QueryBuilder[T]
- func (builder QueryBuilder[T]) WhereLT(field string, value any) QueryBuilder[T]
- type Registration
- func (w Registration) AllConnections() mapof.Object[model.Connection]
- func (w Registration) BasePath() string
- func (w Registration) Data(key string) string
- func (w Registration) DomainData() mapof.String
- func (w Registration) IconURL() string
- func (w Registration) Label() string
- func (w Registration) NavigationID() string
- func (w Registration) PageTitle() string
- func (w Registration) Permalink() string
- func (w Registration) Provider(providerID string) providers.Provider
- func (w Registration) Providers() []form.LookupCode
- func (w Registration) RegistrationData(key string) string
- func (w Registration) Render() (template.HTML, error)
- func (w Registration) Template() model.Registration
- func (w Registration) ThemeData(key string) string
- func (w Registration) Token() string
- func (w Registration) View(actionID string) (template.HTML, error)
- type Rule
- func (w Rule) BasePath() string
- func (w Rule) Label() string
- func (w Rule) NavigationID() string
- func (w Rule) PageTitle() string
- func (w Rule) Permalink() string
- func (w Rule) Render() (template.HTML, error)
- func (w Rule) RuleID() string
- func (w Rule) Rules() *QueryBuilder[model.Rule]
- func (w Rule) ServerWideRules() *QueryBuilder[model.Rule]
- func (w Rule) Token() string
- func (w Rule) View(actionID string) (template.HTML, error)
- type SearchBuilder
- func (builder SearchBuilder) AfterRank(rank int64) SearchBuilder
- func (builder SearchBuilder) AfterShuffle(shuffle int64) SearchBuilder
- func (builder SearchBuilder) All() SearchBuilder
- func (builder SearchBuilder) By(sortField string) SearchBuilder
- func (builder SearchBuilder) ByCreateDate() SearchBuilder
- func (builder SearchBuilder) ByName() SearchBuilder
- func (builder SearchBuilder) ByRank() SearchBuilder
- func (builder SearchBuilder) ByShuffle() SearchBuilder
- func (builder SearchBuilder) Count() (int64, error)
- func (builder SearchBuilder) Range() (iter.Seq[model.SearchResult], error)
- func (builder SearchBuilder) Reverse() SearchBuilder
- func (builder SearchBuilder) Slice() (sliceof.Object[model.SearchResult], error)
- func (builder SearchBuilder) Top1() SearchBuilder
- func (builder SearchBuilder) Top12() SearchBuilder
- func (builder SearchBuilder) Top120() SearchBuilder
- func (builder SearchBuilder) Top150() SearchBuilder
- func (builder SearchBuilder) Top200() SearchBuilder
- func (builder SearchBuilder) Top30() SearchBuilder
- func (builder SearchBuilder) Top300() SearchBuilder
- func (builder SearchBuilder) Top400() SearchBuilder
- func (builder SearchBuilder) Top500() SearchBuilder
- func (builder SearchBuilder) Top6() SearchBuilder
- func (builder SearchBuilder) Top60() SearchBuilder
- func (builder SearchBuilder) Top600() SearchBuilder
- func (builder SearchBuilder) Where(field string, value any) SearchBuilder
- func (builder SearchBuilder) WhereTags(tags ...string) SearchBuilder
- func (builder SearchBuilder) WhereType(typeNames ...string) SearchBuilder
- type SearchTag
- func (w SearchTag) BasePath() string
- func (w SearchTag) Groups() []form.LookupCode
- func (w SearchTag) Name() string
- func (w SearchTag) NavigationID() string
- func (w SearchTag) PageTitle() string
- func (w SearchTag) Permalink() string
- func (w SearchTag) Render() (template.HTML, error)
- func (w SearchTag) SearchTagID() string
- func (w SearchTag) SearchTags() *QueryBuilder[model.SearchTag]
- func (w SearchTag) States() []form.LookupCode
- func (w SearchTag) Token() string
- func (w SearchTag) View(actionID string) (template.HTML, error)
- type ServerFactory
- type StateSetter
- type Step
- type StepAddModelObject
- type StepAddStream
- type StepAsConfirmation
- type StepAsModal
- type StepAsTooltip
- type StepCacheURL
- type StepDelete
- type StepDeleteArchive
- type StepDeleteAttachments
- type StepDo
- type StepDump
- type StepEditConnection
- type StepEditContent
- type StepEditModelObject
- type StepEditRegistration
- type StepEditTemplate
- type StepEditWidget
- type StepError
- type StepForwardTo
- type StepGetArchive
- type StepHalt
- type StepIfCondition
- type StepInlineError
- type StepInlineSaveButton
- type StepInlineSuccess
- type StepMakeArchive
- type StepProcessContent
- type StepProcessTags
- type StepRedirectTo
- type StepRefreshPage
- type StepReloadPage
- type StepRemoveEvent
- type StepSave
- type StepSaveAndPublish
- type StepSearchIndex
- type StepSendEmail
- type StepSetData
- type StepSetHeader
- type StepSetPassword
- type StepSetQueryParam
- type StepSetRenderData
- type StepSetResponse
- type StepSetSimpleSharing
- type StepSetState
- type StepSetThumbnail
- type StepSleep
- type StepSort
- type StepSortAttachments
- type StepSortWidgets
- type StepStreamPromoteDraft
- type StepTableEditor
- type StepTriggerEvent
- type StepUnPublish
- type StepUploadAttachments
- type StepViewCSS
- type StepViewFeed
- type StepViewHTML
- type StepViewJSONLD
- type StepWebSub
- type StepWithAttachment
- type StepWithChildren
- type StepWithDraft
- type StepWithFolder
- type StepWithFollower
- type StepWithFollowing
- type StepWithMessage
- type StepWithNextSibling
- type StepWithParent
- type StepWithPrevSibling
- type StepWithResponse
- type StepWithRule
- type Stream
- func NewStream(factory Factory, request *http.Request, response http.ResponseWriter, ...) (Stream, error)
- func NewStreamFromURI(serverFactory ServerFactory, request *http.Request, ...) (Stream, error)
- func NewStreamWithoutTemplate(factory Factory, request *http.Request, response http.ResponseWriter, ...) (Stream, error)
- func (w Stream) Ancestors() QueryBuilder[model.StreamSummary]
- func (w Stream) AnnouncesBefore(dateString string, maxRows int) sliceof.Object[streams.Document]
- func (w Stream) Attachment() (model.Attachment, error)
- func (w Stream) Attachments() (sliceof.Object[model.Attachment], error)
- func (w Stream) AttachmentsByCategory(category string) (sliceof.Object[model.Attachment], error)
- func (w Stream) AttributedTo() model.PersonLink
- func (w Stream) Author() model.PersonLink
- func (w Stream) BasePath() string
- func (w Stream) Breadcrumbs() ([]model.StreamSummary, error)
- func (w Stream) CanCreate() []form.LookupCode
- func (w Stream) Children() QueryBuilder[model.StreamSummary]
- func (w Stream) ContentHTML() template.HTML
- func (w Stream) ContentRaw() string
- func (w Stream) CreateDate() int64
- func (w Stream) Data(value string) any
- func (w Stream) DataBool(value string) bool
- func (w Stream) DataInt(value string) int
- func (w Stream) DataString(value string) string
- func (w Stream) Document() model.DocumentLink
- func (w Stream) ETag() string
- func (w Stream) FirstChild(sort string, action string) (Stream, error)
- func (w Stream) Followers() ([]model.Follower, error)
- func (w Stream) Grandparent(actionID string) (Stream, error)
- func (w Stream) HasGrandparent() bool
- func (w Stream) HasParent() bool
- func (w Stream) IconURL() string
- func (w Stream) InReplyTo() streams.Document
- func (w Stream) IsCurrentStream() bool
- func (w Stream) IsEmpty() bool
- func (w Stream) IsNew() bool
- func (w Stream) IsPublished() bool
- func (w Stream) IsReply() bool
- func (w Stream) Label() string
- func (w Stream) LastChild(sort string, action string) (Stream, error)
- func (w Stream) LikesBefore(dateString string, maxRows int) sliceof.Object[streams.Document]
- func (w Stream) ListAllWidgets() []form.LookupCode
- func (w Stream) ListWidgetsByLocation(location string) []model.StreamWidget
- func (w Stream) Mentions() ([]model.Mention, error)
- func (w Stream) NavigationID() string
- func (w Stream) NextSibling(sortField string, action string) (Stream, error)
- func (w Stream) OEmbedJSON() string
- func (w Stream) OEmbedXML() string
- func (w Stream) Outbox() (QueryBuilder[model.OutboxMessage], error)
- func (w Stream) PageTitle() string
- func (w Stream) Parent(actionID string) (Stream, error)
- func (w Stream) ParentID() string
- func (w Stream) ParentOutbox(actionID string) (Outbox, error)
- func (w Stream) Permalink() string
- func (w Stream) PrevSibling(sortField string, action string) (Stream, error)
- func (w Stream) PublishDate() int64
- func (w Stream) Rank() int
- func (w Stream) Render() (template.HTML, error)
- func (w Stream) RepliesAfter(dateString string, maxRows int) sliceof.Object[streams.Document]
- func (w Stream) RepliesBefore(dateString string, maxRows int) sliceof.Object[streams.Document]
- func (w Stream) Roles() []string
- func (w Stream) ShortSummary() string
- func (w Stream) Siblings() QueryBuilder[model.StreamSummary]
- func (w Stream) StateID() string
- func (w Stream) StreamID() string
- func (w Stream) Streams() QueryBuilder[model.StreamSummary]
- func (w Stream) Summary() string
- func (w Stream) SummaryHTML() template.HTML
- func (w Stream) Tags() []mapof.String
- func (w Stream) TemplateID() string
- func (w Stream) Token() string
- func (w Stream) UpdateDate() int64
- func (w Stream) UserCan(actionID string) bool
- func (w Stream) Users() QueryBuilder[model.UserSummary]
- func (w Stream) View(actionID string) (template.HTML, error)
- func (w Stream) Widgets(location string) (template.HTML, error)
- type Syndication
- func (w Syndication) BasePath() string
- func (w Syndication) NavigationID() string
- func (w Syndication) PageTitle() string
- func (w Syndication) Permalink() string
- func (w Syndication) Render() (template.HTML, error)
- func (w Syndication) Token() string
- func (w Syndication) View(actionID string) (template.HTML, error)
- type TemplateLike
- type User
- func (w User) AssignedGroups() ([]model.Group, error)
- func (w User) BasePath() string
- func (w User) CountIndexableUsers() (int64, error)
- func (w User) CountPublicUsers() (int64, error)
- func (w User) CountUsers() (int64, error)
- func (w User) DisplayName() string
- func (w User) Groups() ([]form.LookupCode, error)
- func (w User) IconURL() string
- func (w User) Label() string
- func (w User) MapIDs() map[string]string
- func (w User) NavigationID() string
- func (w User) PageTitle() string
- func (w User) Permalink() string
- func (w User) ProfileURL() string
- func (w User) Registration() model.Registration
- func (w User) Render() (template.HTML, error)
- func (w User) Token() string
- func (w User) UserID() string
- func (w User) Users() *QueryBuilder[model.UserSummary]
- func (w User) View(actionID string) (template.HTML, error)
- type Webhook
- func (w Webhook) BasePath() string
- func (w Webhook) Events() []string
- func (w Webhook) Label() string
- func (w Webhook) NavigationID() string
- func (w Webhook) PageTitle() string
- func (w Webhook) Permalink() string
- func (w Webhook) Render() (template.HTML, error)
- func (w Webhook) TargetURL() string
- func (w Webhook) Token() string
- func (w Webhook) View(actionID string) (template.HTML, error)
- func (w Webhook) WebhookID() string
- func (w Webhook) Webhooks() *QueryBuilder[model.Webhook]
- type Widget
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsHTML ¶
func AsHTML(factory Factory, ctx echo.Context, b Builder, actionMethod ActionMethod) error
AsHTML collects the logic to build complete vs. partial HTML pages.
func CloseModal ¶
func CloseModal(ctx echo.Context)
CloseModal sets Response header to close a modal on the client and optionally forward to a new location.
func RefreshPage ¶
func RefreshPage(ctx echo.Context)
func TriggerEvent ¶
func TriggerEvent(ctx echo.Context, event string)
func WrapInlineError ¶
func WrapInlineError(response http.ResponseWriter, err error) error
WrapInlineError sends an error message to the #htmx-response-message element
func WrapInlineSuccess ¶
func WrapInlineSuccess(response http.ResponseWriter, message any) error
WrapInlineSuccess sends a confirmation message to the #htmx-response-message element
func WrapModal ¶
func WrapModal(response http.ResponseWriter, content string, options ...string) string
func WrapModalForm ¶
func WrapModalWithCloseButton ¶
func WrapModalWithCloseButton(response http.ResponseWriter, content string, options ...string) string
func WrapTooltip ¶
func WrapTooltip(response http.ResponseWriter, content string) string
Types ¶
type ActionMethod ¶
type ActionMethod uint8
ActionMethod enumerates the HTTP methods that can be performed on Actions
const ActionMethodGet ActionMethod = 0
ActionMethodGet signifies a GET operation on an action
const ActionMethodPost ActionMethod = 1
ActionMethodPost signifies a POST operation on an action
type Attachment ¶
type Attachment struct { CommonWithTemplate // contains filtered or unexported fields }
Attachment builds objects from any model service that implements the ModelService interface
func NewAttachment ¶
func NewAttachment(factory Factory, request *http.Request, response http.ResponseWriter, template model.Template, attachment *model.Attachment, actionID string) (Attachment, error)
NewAttachment returns a fully initialized `Attachment` builder.
func (Attachment) AmFollowing ¶
func (w Attachment) AmFollowing(url string) model.Following
AmFollowing returns a Following record for the current user and the given URL If the user is not authenticated, or the URL is not valid, then an empty Following record is returned. The UX uses this to label "mutual" follows
func (Attachment) AttachmentID ¶
func (w Attachment) AttachmentID() string
AttachmentID returns the AttachmentID property of this Follow
func (Attachment) BasePath ¶
func (w Attachment) BasePath() string
func (Attachment) Category ¶
func (w Attachment) Category() string
func (Attachment) CreateDate ¶
func (w Attachment) CreateDate() int64
CreateDate returns the CreateDate property of this Follow
func (Attachment) Description ¶
func (w Attachment) Description() string
func (Attachment) Duration ¶
func (w Attachment) Duration() int
func (Attachment) Height ¶
func (w Attachment) Height() int
func (Attachment) Label ¶
func (w Attachment) Label() string
func (Attachment) ObjectID ¶
func (w Attachment) ObjectID() string
ObjectID returns the ObjectID property of this Follow
func (Attachment) ObjectType ¶
func (w Attachment) ObjectType() string
ObjectType returns the ObjectType property of this Follow
func (Attachment) Original ¶
func (w Attachment) Original() string
func (Attachment) PageTitle ¶
func (w Attachment) PageTitle() string
func (Attachment) Permalink ¶
func (w Attachment) Permalink() string
func (Attachment) Rank ¶
func (w Attachment) Rank() int
func (Attachment) Rules ¶
func (w Attachment) Rules() model.AttachmentRules
func (Attachment) Status ¶
func (w Attachment) Status() string
func (Attachment) Token ¶
func (w Attachment) Token() string
func (Attachment) URL ¶
func (w Attachment) URL() string
func (Attachment) UpdateDate ¶
func (w Attachment) UpdateDate() int64
UpdateDate returns the UpdateDate property of this Follow
func (Attachment) UserCan ¶
func (w Attachment) UserCan(string) bool
func (Attachment) View ¶
func (w Attachment) View(actionID string) (template.HTML, error)
View executes a separate view for this Stream
func (Attachment) Width ¶
func (w Attachment) Width() int
type Builder ¶
type Builder interface { // Render is the main entry-point for templates to use a Builder Render() (template.HTML, error) // Render function outputs an HTML template View(string) (template.HTML, error) // Render function outputs an HTML template // COMMON API METHODS Host() string // String representation of the protocol + hostname Protocol() string // String representation of the HTTP protocol to use when addressing this record (http:// or https://) Hostname() string // Hostname for this server Token() string // URL Token of the record being built PageTitle() string // Human-friendly title to put at the top of the page. Summary() string // Human-friendly summary to put at the top of the page (maybe) Permalink() string // Permanent link to the record being built BasePath() string // URL Path of the root of this object, without any additional actions. URL() string // Complete URL of the requested page QueryParam(string) string // Query parameter of the requested page SetQueryParam(string, string) // Sets a queryString parameter IsAuthenticated() bool // Returns TRUE if the user is signed in IsPartialRequest() bool // Returns TRUE if this is an HTMX request for a page fragment UserCan(string) bool // Returns TRUE if the signed-in user has access to the named action AuthenticatedID() primitive.ObjectID // Returns the ID of the signed-in user (or zero if not signed in) GetBool(name string) bool GetFloat(name string) float64 GetHTML(name string) template.HTML GetInt(name string) int GetInt64(name string) int64 GetString(name string) string GetContent() template.HTML SetContent(string) // contains filtered or unexported methods }
Builder safely wraps model objects for consumption by an html Template
type Common ¶
type Common struct {
// contains filtered or unexported fields
}
Common provides common building functions that are needed by ALL builders
func (Common) ActivityStream ¶
ActivityStream returns an ActivityStream document for the provided URL. The returned document uses Emissary's custom ActivityStream service, which uses document values and rules from the server's shared cache.
func (Common) ActivityStreamActor ¶
ActivityStreamActor returns an ActivityStream actor document for the provided URL. The returned document uses Emissary's custom ActivityStream service, which uses document values and rules from the server's shared cache.
func (Common) ActivityStreamActors ¶
func (w Common) ActivityStreamActors(search string) ([]model.ActorSummary, error)
func (Common) AdminSections ¶
func (w Common) AdminSections() []form.LookupCode
AdminSections returns labels and values for all hard-coded sections of the administrator area.
func (Common) AllowedSearchTags ¶
func (w Common) AllowedSearchTags() *QueryBuilder[model.SearchTag]
AllowedSearchTags returns a query builder for all SearchTags that are marked "Allowed" by the domain admin.
func (Common) AuthenticatedID ¶
AuthenticatedID returns the unique ID of the currently logged in user (may be nil).
func (Common) Dataset ¶
func (w Common) Dataset(name string) form.LookupGroup
Dataset returns a single form.LookupGroup from the LookupProvider
func (Common) DatasetValue ¶
func (w Common) DatasetValue(name string, value string) form.LookupCode
DatasetValue returns a single form.LookupCode from the LookupProvider
func (Common) DomainHasRegistrationForm ¶
func (Common) DomainLabel ¶
func (Common) FeaturedSearchTags ¶
func (w Common) FeaturedSearchTags() *QueryBuilder[model.SearchTag]
func (Common) GetContent ¶
func (Common) GetFollowingID ¶
IsFollowing returns TRUE if the curren user is following the document at a specific URI (or the actor who created the document)
func (Common) GetResponseSummary ¶
func (w Common) GetResponseSummary(url string) model.UserResponseSummary
func (Common) IsAuthenticated ¶
IsAuthenticated returns TRUE if the user is signed in
func (Common) IsPartialRequest ¶
IsPartialRequest returns TRUE if this is a partial page request from htmx.
func (Common) Navigation ¶
Navigation returns an array of Streams that have a Zero ParentID
func (Common) NavigationID ¶
NavigationID returns the the identifier of the top-most stream in the navigation. The "common" builder just returns a default value that other builders should override.
func (Common) NotMe ¶
NotMe returns TRUE if the provided URI is NOT the ProfileURL of the current user
func (Common) QueryParam ¶
Returns the designated request parameter. If there are multiple values for the parameter, then only the first value is returned.
func (Common) QueryString ¶
QueryString returns the raw query string (encoded as a template.URL) to be re-embedded in a template link.
func (Common) Search ¶
func (w Common) Search() SearchBuilder
func (Common) SetContent ¶
func (Common) SetQueryParam ¶
SetQueryParam updates the HTTP request, setting a new value for an individual query parameter.
func (Common) UserCan ¶
UserCan returns TRUE if the current user has the specified permission. Default implementation returns FALSE for all requests.
type CommonWithTemplate ¶
type CommonWithTemplate struct { Common // contains filtered or unexported fields }
func NewCommonWithTemplate ¶
func NewCommonWithTemplate(factory Factory, request *http.Request, response http.ResponseWriter, template model.Template, actionID string) (CommonWithTemplate, error)
type DocumentLinker ¶
type DocumentLinker interface {
DocumentLink() model.DocumentLink
}
type Domain ¶
type Domain struct { CommonWithTemplate // contains filtered or unexported fields }
Domain is the builder for the admin/domain page It can only be accessed by a Domain Owner
func NewDomain ¶
func NewDomain(factory Factory, request *http.Request, response http.ResponseWriter, template model.Template, actionID string) (Domain, error)
NewDomain returns a fully initialized `Domain` builder.
func (Domain) AllConnections ¶
func (w Domain) AllConnections() mapof.Object[model.Connection]
Connection loads an external service connection from the database
func (Domain) NavigationID ¶
func (Domain) PropertyForm ¶
PropertyForm returns the custom property form for this Domain, defined by the Theme that it uses.
func (Domain) Providers ¶
func (w Domain) Providers() []form.LookupCode
Providers lists all available external services that can be connected to this domain
func (Domain) RegistrationTemplate ¶
func (w Domain) RegistrationTemplate() model.Registration
RegistrationTemplate returns the signup template selected for this domain
func (Domain) RegistrationTemplates ¶
func (w Domain) RegistrationTemplates() []form.LookupCode
RegistrationTemplates returns all available signup templates
type Factory ¶
type Factory interface { // Model Services Model(string) (service.ModelService, error) ActivityStream() *service.ActivityStream Attachment() *service.Attachment Connection() *service.Connection Folder() *service.Folder Following() *service.Following Follower() *service.Follower Group() *service.Group Inbox() *service.Inbox Mention() *service.Mention Outbox() *service.Outbox Provider() *service.Provider Registration() *service.Registration Response() *service.Response Rule() *service.Rule Search() *service.Search SearchTag() *service.SearchTag Stream() *service.Stream StreamArchive() *service.StreamArchive StreamDraft() *service.StreamDraft Template() *service.Template Theme() *service.Theme User() *service.User Webhook() *service.Webhook Widget() *service.Widget // Other data services Config() config.Domain Content() *service.Content Domain() *service.Domain Email() *service.DomainEmail Host() string Hostname() string HTTPCache() *httpcache.HTTPCache Icons() icon.Provider MediaServer() mediaserver.MediaServer ModelService(data.Object) service.ModelService Locator() service.Locator LookupProvider(primitive.ObjectID) form.LookupProvider OAuthClient() *service.OAuthClient OAuthUserToken() *service.OAuthUserToken Providers() set.Slice[config.Provider] Queue() *queue.Queue Steranko() *steranko.Steranko StreamUpdateChannel() chan primitive.ObjectID }
Factory is used to locate all necessary services
type Follower ¶
type Follower struct { CommonWithTemplate // contains filtered or unexported fields }
Follower builds objects from any model service that implements the ModelService interface
func NewFollower ¶
func NewFollower(factory Factory, request *http.Request, response http.ResponseWriter, template model.Template, follower *model.Follower, actionID string) (Follower, error)
NewFollower returns a fully initialized `Follower` builder.
func (Follower) Actor ¶
func (w Follower) Actor() model.PersonLink
ActorID returns the ActorID property of this Follow
func (Follower) AmFollowing ¶
AmFollowing returns a Following record for the current user and the given URL If the user is not authenticated, or the URL is not valid, then an empty Following record is returned. The UX uses this to label "mutual" follows
func (Follower) CreateDate ¶
CreateDate returns the CreateDate property of this Follow
func (Follower) ExpireDate ¶
ExpireDate returns the ExpireDate property of this Follow
func (Follower) FollowerID ¶
FollowerID returns the FollowerID property of this Follow
func (Follower) ParentType ¶
ParentType returns the ParentType property of this Follow
func (Follower) UpdateDate ¶
UpdateDate returns the UpdateDate property of this Follow
type Group ¶
type Group struct { CommonWithTemplate // contains filtered or unexported fields }
Group is a builder for the admin/groups page It can only be accessed by a Domain Owner
func NewGroup ¶
func NewGroup(factory Factory, request *http.Request, response http.ResponseWriter, template model.Template, group *model.Group, actionID string) (Group, error)
NewGroup returns a fully initialized `Group` builder.
func (Group) NavigationID ¶
type Inbox ¶
type Inbox struct { CommonWithTemplate // contains filtered or unexported fields }
Inbox is a builder for the @user/inbox page
func NewInbox ¶
func NewInbox(factory Factory, request *http.Request, response http.ResponseWriter, user *model.User, actionID string) (Inbox, error)
NewInbox returns a fully initialized `Inbox` builder
func (Inbox) AnnouncesBefore ¶
func (Inbox) DisplayName ¶
func (Inbox) FilteredByFollowing ¶
FIlteredByFollowing returns the Following record that is being used to filter the Inbox
func (Inbox) Folders ¶
func (w Inbox) Folders() (model.FolderList, error)
Folders returns a slice of all folders owned by the current User
func (Inbox) FoldersWithSelection ¶
func (w Inbox) FoldersWithSelection() (model.FolderList, error)
func (Inbox) FollowerCount ¶
func (Inbox) Followers ¶
func (w Inbox) Followers() QueryBuilder[model.FollowerSummary]
func (Inbox) Following ¶
func (w Inbox) Following() QueryBuilder[model.FollowingSummary]
func (Inbox) FollowingByFolder ¶
func (w Inbox) FollowingByFolder(token string) ([]model.FollowingSummary, error)
func (Inbox) FollowingByToken ¶
func (Inbox) FollowingCount ¶
func (Inbox) HasRule ¶
HasRule returns a rule that matches the current user, rule type, and trigger. If no rule is found, then an empty rule is returned.
func (Inbox) Inbox ¶
func (w Inbox) Inbox() (QueryBuilder[model.Message], error)
Inbox returns a QueryBuilder for current User's inbox
func (Inbox) IsInboxEmpty ¶
IsInboxEmpty returns TRUE if the inbox has no results and there are no filters applied This corresponds to there being NOTHING in the inbox, instead of just being filtered out.
func (Inbox) LikesBefore ¶
func (Inbox) Message ¶
Message uses the queryString ?messageId= parameter to load a Message from the database If the messageId parameter does not exist, is malformed, or if the message does not exist, then a new, empty Message is returned. In addition, if there is a "sibling" URL parameter (either "next" or "prev") then the next/previous message is loaded instead.
func (Inbox) NavigationID ¶
NavigationID returns the ID to use for highlighing navigation menus
func (Inbox) ProfileURL ¶
func (Inbox) RepliesAfter ¶
func (Inbox) RepliesBefore ¶
func (Inbox) SubBuilder ¶
SubBuilder creates a new builder for a child object. This function works with Rule, Folder, Follower, Following, and Stream objects. It will return an error if the object is not one of those types.
type Model ¶
type Model struct { CommonWithTemplate // contains filtered or unexported fields }
Model builds objects from any model service that implements the ModelService interface
type Navigation ¶
type Navigation struct { // contains filtered or unexported fields }
Navigation is a builder for the admin/navigation page It can only be accessed by a Domain Owner
func NewNavigation ¶
func NewNavigation(factory Factory, request *http.Request, response http.ResponseWriter, template model.Template, stream *model.Stream, actionID string) (Navigation, error)
NewNavigation returns a fully initialized `Navigation` builder.
func (Navigation) BasePath ¶
func (w Navigation) BasePath() string
func (Navigation) NavigationID ¶
func (w Navigation) NavigationID() string
func (Navigation) PageTitle ¶
func (w Navigation) PageTitle() string
func (Navigation) Permalink ¶
func (w Navigation) Permalink() string
func (Navigation) Render ¶
func (w Navigation) Render() (template.HTML, error)
Render generates the string value for this Stream
func (Navigation) Token ¶
func (w Navigation) Token() string
type OAuthAuthorization ¶
type OAuthAuthorization struct {
// contains filtered or unexported fields
}
OAuthAuthorization is a lightweight builder that displays UI pages for an OAuth Application.
func NewOAuthAuthorization ¶
func NewOAuthAuthorization(factory Factory, request model.OAuthAuthorizationRequest) (OAuthAuthorization, error)
NewOAuthAuthorization returns a fully initialized/loaded `OAuthAuthorization` builder
func (OAuthAuthorization) ClientID ¶
func (r OAuthAuthorization) ClientID() string
func (OAuthAuthorization) Name ¶
func (r OAuthAuthorization) Name() string
func (OAuthAuthorization) RedirectURI ¶
func (r OAuthAuthorization) RedirectURI() string
func (OAuthAuthorization) ResponseType ¶
func (r OAuthAuthorization) ResponseType() string
func (OAuthAuthorization) Scope ¶
func (r OAuthAuthorization) Scope() string
func (OAuthAuthorization) Scopes ¶
func (r OAuthAuthorization) Scopes() []string
func (OAuthAuthorization) Website ¶
func (r OAuthAuthorization) Website() string
type Outbox ¶
type Outbox struct { CommonWithTemplate // contains filtered or unexported fields }
Outbox builds individual messages from a User's Outbox.
func NewOutbox ¶
func NewOutbox(factory Factory, request *http.Request, response http.ResponseWriter, user *model.User, actionID string) (Outbox, error)
NewOutbox returns a fully initialized `Outbox` builder.
func (Outbox) ActivityPubFollowersURL ¶
func (Outbox) ActivityPubFollowingURL ¶
func (Outbox) ActivityPubIconURL ¶
func (Outbox) ActivityPubInboxURL ¶
func (Outbox) ActivityPubLikedURL ¶
func (Outbox) ActivityPubOutboxURL ¶
func (Outbox) ActivityPubPublicKeyURL ¶
func (Outbox) ActivityPubURL ¶
func (Outbox) DisplayName ¶
func (Outbox) FollowerCount ¶
func (Outbox) FollowingCount ¶
func (Outbox) IsIndexable ¶
IsIndexable returns TRUE if the stream is indexable by search engines
func (Outbox) IsMyself ¶
IsMyself returns TRUE if the outbox record is owned by the currently signed-in user
func (Outbox) NavigationID ¶
NavigationID returns the ID to use for highlighing navigation menus
func (Outbox) OEmbedJSON ¶
OEmbedJSON returns the URL for the oEmbed JSON endpoint for this stream
func (Outbox) Outbox ¶
func (w Outbox) Outbox() QueryBuilder[model.StreamSummary]
func (Outbox) ProfileURL ¶
func (Outbox) Replies ¶
func (w Outbox) Replies() QueryBuilder[model.StreamSummary]
func (Outbox) StatusMessage ¶
type Pipeline ¶
func (Pipeline) Execute ¶
func (pipeline Pipeline) Execute(factory Factory, builder Builder, buffer io.Writer, actionMethod ActionMethod) PipelineResult
Execute switches between GET and POST methods for this pipeline, based on the provided ActionMethod
type PipelineBehavior ¶
type PipelineBehavior func(*PipelineResult)
func Continue ¶
func Continue() PipelineBehavior
Continue is a NOOP that does not change the PipelineResult object
func UseResult ¶
func UseResult(newStatus PipelineResult) PipelineBehavior
UseResult takes a new PipelineResult object, and merges it into the existing PipelineResult object.
func (PipelineBehavior) AsFullPage ¶
func (exit PipelineBehavior) AsFullPage() PipelineBehavior
AsFullPage sets the FullPage flag on the PipelineResult object, which tells the builder to NOT include the header/footer from the site theme.
func (PipelineBehavior) RemoveEvent ¶
func (exit PipelineBehavior) RemoveEvent(name string) PipelineBehavior
RemoveEvent removes an HX-Trigger event to the PipelineResult object
func (PipelineBehavior) WithContentType ¶
func (exit PipelineBehavior) WithContentType(contentType string) PipelineBehavior
func (PipelineBehavior) WithError ¶
func (exit PipelineBehavior) WithError(err error) PipelineBehavior
WithError sets the Error value on the PipelineResult object
func (PipelineBehavior) WithEvent ¶
func (exit PipelineBehavior) WithEvent(name string, value string) PipelineBehavior
WithEvent adds an HX-Trigger event to the PipelineResult object
func (PipelineBehavior) WithHeader ¶
func (exit PipelineBehavior) WithHeader(name string, value string) PipelineBehavior
WithHeader adds an HX-Trigger event to the PipelineResult object
func (PipelineBehavior) WithStatusCode ¶
func (exit PipelineBehavior) WithStatusCode(statusCode int) PipelineBehavior
type PipelineHalter ¶
type PipelineResult ¶
type PipelineResult struct { StatusCode int // HTTP Status Code to be returned ContentType string // If present, then this option sets the content-type header Headers mapof.String // Map of header values to be applied to the response Events mapof.String // Map of events to trigger on the client (via HX-Trigger) FullPage bool // If true, then this result represents the entire page of content, and should not be wrapped in the global template Halt bool // If true, then this pipeline should halt execution Error error // If present, then there was an error building this page }
func NewPipelineResult ¶
func NewPipelineResult() PipelineResult
func (PipelineResult) Apply ¶
func (result PipelineResult) Apply(response http.ResponseWriter)
func (PipelineResult) GetContentType ¶
func (result PipelineResult) GetContentType() string
func (PipelineResult) GetStatusCode ¶
func (result PipelineResult) GetStatusCode() int
func (*PipelineResult) Merge ¶
func (result *PipelineResult) Merge(newStatus PipelineResult)
Merge combines two PipelineResult objects into one.
type PropertyFormGetter ¶
type QueryBuilder ¶
type QueryBuilder[T model.FieldLister] struct { // contains filtered or unexported fields }
func NewQueryBuilder ¶
func NewQueryBuilder[T model.FieldLister](service service.ModelService, criteria exp.Expression) QueryBuilder[T]
func (QueryBuilder[T]) All ¶
func (builder QueryBuilder[T]) All() QueryBuilder[T]
func (QueryBuilder[T]) By ¶
func (builder QueryBuilder[T]) By(sortField string) QueryBuilder[T]
func (QueryBuilder[T]) ByCreateDate ¶
func (builder QueryBuilder[T]) ByCreateDate() QueryBuilder[T]
func (QueryBuilder[T]) ByDisplayName ¶
func (builder QueryBuilder[T]) ByDisplayName() QueryBuilder[T]
func (QueryBuilder[T]) ByExpirationDate ¶
func (builder QueryBuilder[T]) ByExpirationDate() QueryBuilder[T]
func (QueryBuilder[T]) ByLabel ¶
func (builder QueryBuilder[T]) ByLabel() QueryBuilder[T]
func (QueryBuilder[T]) ByName ¶
func (builder QueryBuilder[T]) ByName() QueryBuilder[T]
func (QueryBuilder[T]) ByPublishDate ¶
func (builder QueryBuilder[T]) ByPublishDate() QueryBuilder[T]
func (QueryBuilder[T]) ByRank ¶
func (builder QueryBuilder[T]) ByRank() QueryBuilder[T]
func (QueryBuilder[T]) ByRankAlt ¶
func (builder QueryBuilder[T]) ByRankAlt() QueryBuilder[T]
func (QueryBuilder[T]) ByReadDate ¶
func (builder QueryBuilder[T]) ByReadDate() QueryBuilder[T]
func (QueryBuilder[T]) ByUpdateDate ¶
func (builder QueryBuilder[T]) ByUpdateDate() QueryBuilder[T]
func (QueryBuilder[T]) CaseInsensitive ¶
func (builder QueryBuilder[T]) CaseInsensitive() QueryBuilder[T]
func (QueryBuilder[T]) CaseSensitive ¶
func (builder QueryBuilder[T]) CaseSensitive() QueryBuilder[T]
func (QueryBuilder[T]) Count ¶
func (builder QueryBuilder[T]) Count() (int64, error)
Count returns the number of records that match the query criteria
func (QueryBuilder[T]) Featured ¶
func (builder QueryBuilder[T]) Featured() QueryBuilder[T]
func (QueryBuilder[T]) Indexable ¶
func (builder QueryBuilder[T]) Indexable() QueryBuilder[T]
func (QueryBuilder[T]) Reverse ¶
func (builder QueryBuilder[T]) Reverse() QueryBuilder[T]
func (QueryBuilder[T]) Slice ¶
func (builder QueryBuilder[T]) Slice() (sliceof.Object[T], error)
Slice returns the results of the query as a slice of objects
func (QueryBuilder[T]) Tags ¶
func (builder QueryBuilder[T]) Tags(tags ...string) QueryBuilder[T]
func (QueryBuilder[T]) Top1 ¶
func (builder QueryBuilder[T]) Top1() QueryBuilder[T]
func (QueryBuilder[T]) Top12 ¶
func (builder QueryBuilder[T]) Top12() QueryBuilder[T]
func (QueryBuilder[T]) Top120 ¶
func (builder QueryBuilder[T]) Top120() QueryBuilder[T]
func (QueryBuilder[T]) Top150 ¶
func (builder QueryBuilder[T]) Top150() QueryBuilder[T]
func (QueryBuilder[T]) Top200 ¶
func (builder QueryBuilder[T]) Top200() QueryBuilder[T]
func (QueryBuilder[T]) Top30 ¶
func (builder QueryBuilder[T]) Top30() QueryBuilder[T]
func (QueryBuilder[T]) Top300 ¶
func (builder QueryBuilder[T]) Top300() QueryBuilder[T]
func (QueryBuilder[T]) Top400 ¶
func (builder QueryBuilder[T]) Top400() QueryBuilder[T]
func (QueryBuilder[T]) Top500 ¶
func (builder QueryBuilder[T]) Top500() QueryBuilder[T]
func (QueryBuilder[T]) Top6 ¶
func (builder QueryBuilder[T]) Top6() QueryBuilder[T]
func (QueryBuilder[T]) Top60 ¶
func (builder QueryBuilder[T]) Top60() QueryBuilder[T]
func (QueryBuilder[T]) Top600 ¶
func (builder QueryBuilder[T]) Top600() QueryBuilder[T]
func (QueryBuilder[T]) Where ¶
func (builder QueryBuilder[T]) Where(field string, value any) QueryBuilder[T]
func (QueryBuilder[T]) WhereBeginsWith ¶
func (builder QueryBuilder[T]) WhereBeginsWith(field string, value string) QueryBuilder[T]
func (QueryBuilder[T]) WhereContains ¶
func (builder QueryBuilder[T]) WhereContains(field string, value string) QueryBuilder[T]
func (QueryBuilder[T]) WhereGT ¶
func (builder QueryBuilder[T]) WhereGT(field string, value any) QueryBuilder[T]
func (QueryBuilder[T]) WhereIN ¶
func (builder QueryBuilder[T]) WhereIN(field string, value any) QueryBuilder[T]
func (QueryBuilder[T]) WhereLT ¶
func (builder QueryBuilder[T]) WhereLT(field string, value any) QueryBuilder[T]
type Registration ¶
type Registration struct { Common // contains filtered or unexported fields }
Registration is the builder for the admin/domain page It can only be accessed by a Registration Owner
func NewRegistration ¶
func NewRegistration(factory Factory, request *http.Request, response http.ResponseWriter, registration *model.Registration, actionID string) (Registration, error)
NewRegistration returns a fully initialized `Registration` builder.
func (Registration) AllConnections ¶
func (w Registration) AllConnections() mapof.Object[model.Connection]
Connection loads an external service connection from the database
func (Registration) BasePath ¶
func (w Registration) BasePath() string
func (Registration) Data ¶
func (w Registration) Data(key string) string
func (Registration) DomainData ¶
func (w Registration) DomainData() mapof.String
func (Registration) IconURL ¶
func (w Registration) IconURL() string
func (Registration) Label ¶
func (w Registration) Label() string
func (Registration) NavigationID ¶
func (w Registration) NavigationID() string
func (Registration) PageTitle ¶
func (w Registration) PageTitle() string
func (Registration) Permalink ¶
func (w Registration) Permalink() string
func (Registration) Providers ¶
func (w Registration) Providers() []form.LookupCode
Providers lists all available external services that can be connected to this domain
func (Registration) RegistrationData ¶
func (w Registration) RegistrationData(key string) string
func (Registration) Render ¶
func (w Registration) Render() (template.HTML, error)
Render generates the string value for this Stream
func (Registration) Template ¶
func (w Registration) Template() model.Registration
Template returns the registration template selected for this domain
func (Registration) ThemeData ¶
func (w Registration) ThemeData(key string) string
func (Registration) Token ¶
func (w Registration) Token() string
type Rule ¶
type Rule struct { CommonWithTemplate // contains filtered or unexported fields }
Rule is a builder for the admin/rules page It can only be accessed by a Domain Owner
func NewRule ¶
func NewRule(factory Factory, request *http.Request, response http.ResponseWriter, rule *model.Rule, template model.Template, actionID string) (Rule, error)
NewRule returns a fully initialized `Rule` builder.
func (Rule) NavigationID ¶
func (Rule) ServerWideRules ¶
func (w Rule) ServerWideRules() *QueryBuilder[model.Rule]
type SearchBuilder ¶
type SearchBuilder struct { Criteria exp.Expression SortField string SortDirection string MaxRows int64 // contains filtered or unexported fields }
func NewSearchBuilder ¶
func NewSearchBuilder(service *service.Search, criteria exp.Expression) SearchBuilder
func (SearchBuilder) AfterRank ¶
func (builder SearchBuilder) AfterRank(rank int64) SearchBuilder
func (SearchBuilder) AfterShuffle ¶
func (builder SearchBuilder) AfterShuffle(shuffle int64) SearchBuilder
func (SearchBuilder) All ¶
func (builder SearchBuilder) All() SearchBuilder
func (SearchBuilder) By ¶
func (builder SearchBuilder) By(sortField string) SearchBuilder
func (SearchBuilder) ByCreateDate ¶
func (builder SearchBuilder) ByCreateDate() SearchBuilder
func (SearchBuilder) ByName ¶
func (builder SearchBuilder) ByName() SearchBuilder
func (SearchBuilder) ByRank ¶
func (builder SearchBuilder) ByRank() SearchBuilder
func (SearchBuilder) ByShuffle ¶
func (builder SearchBuilder) ByShuffle() SearchBuilder
func (SearchBuilder) Count ¶
func (builder SearchBuilder) Count() (int64, error)
Count returns the number of records that match the query criteria
func (SearchBuilder) Range ¶
func (builder SearchBuilder) Range() (iter.Seq[model.SearchResult], error)
Range returns the results of the query as a Go 1.23 RangeFunc
func (SearchBuilder) Reverse ¶
func (builder SearchBuilder) Reverse() SearchBuilder
func (SearchBuilder) Slice ¶
func (builder SearchBuilder) Slice() (sliceof.Object[model.SearchResult], error)
Slice returns the results of the query as a slice of objects
func (SearchBuilder) Top1 ¶
func (builder SearchBuilder) Top1() SearchBuilder
func (SearchBuilder) Top12 ¶
func (builder SearchBuilder) Top12() SearchBuilder
func (SearchBuilder) Top120 ¶
func (builder SearchBuilder) Top120() SearchBuilder
func (SearchBuilder) Top150 ¶
func (builder SearchBuilder) Top150() SearchBuilder
func (SearchBuilder) Top200 ¶
func (builder SearchBuilder) Top200() SearchBuilder
func (SearchBuilder) Top30 ¶
func (builder SearchBuilder) Top30() SearchBuilder
func (SearchBuilder) Top300 ¶
func (builder SearchBuilder) Top300() SearchBuilder
func (SearchBuilder) Top400 ¶
func (builder SearchBuilder) Top400() SearchBuilder
func (SearchBuilder) Top500 ¶
func (builder SearchBuilder) Top500() SearchBuilder
func (SearchBuilder) Top6 ¶
func (builder SearchBuilder) Top6() SearchBuilder
func (SearchBuilder) Top60 ¶
func (builder SearchBuilder) Top60() SearchBuilder
func (SearchBuilder) Top600 ¶
func (builder SearchBuilder) Top600() SearchBuilder
func (SearchBuilder) Where ¶
func (builder SearchBuilder) Where(field string, value any) SearchBuilder
func (SearchBuilder) WhereTags ¶
func (builder SearchBuilder) WhereTags(tags ...string) SearchBuilder
func (SearchBuilder) WhereType ¶
func (builder SearchBuilder) WhereType(typeNames ...string) SearchBuilder
type SearchTag ¶
type SearchTag struct { CommonWithTemplate // contains filtered or unexported fields }
SearchTag is a builder for the admin/searchTags page It can only be accessed by a Domain Owner
func NewSearchTag ¶
func NewSearchTag(factory Factory, request *http.Request, response http.ResponseWriter, template model.Template, searchTag *model.SearchTag, actionID string) (SearchTag, error)
NewSearchTag returns a fully initialized `SearchTag` builder.
func (SearchTag) Groups ¶
func (w SearchTag) Groups() []form.LookupCode
func (SearchTag) NavigationID ¶
func (SearchTag) SearchTagID ¶
func (SearchTag) SearchTags ¶
func (w SearchTag) SearchTags() *QueryBuilder[model.SearchTag]
SearchTags returns a query builder for all SearchTags in the datatabase.
func (SearchTag) States ¶
func (w SearchTag) States() []form.LookupCode
type ServerFactory ¶
type StateSetter ¶
type StateSetter interface {
// contains filtered or unexported methods
}
type Step ¶
type Step interface { Get(Builder, io.Writer) PipelineBehavior Post(Builder, io.Writer) PipelineBehavior }
func ExecutableStep ¶
ExecutableStep uses an Step object to create a new action
type StepAddModelObject ¶
StepAddModelObject is an action that can add new model objects of any type
func (StepAddModelObject) Get ¶
func (step StepAddModelObject) Get(builder Builder, buffer io.Writer) PipelineBehavior
Get displays a modal form that lets users enter data for their new model object.
func (StepAddModelObject) Post ¶
func (step StepAddModelObject) Post(builder Builder, buffer io.Writer) PipelineBehavior
Post initializes a new model object, populates it with data from the form, then saves it to the database.
type StepAddStream ¶
type StepAddStream struct { Style string // Style of input widget to use. Options are: "chooser" and "inline". Defaults to "chooser". Title string // Title to use on the create modal. Defaults to "Add a Stream" Location string // Options are: "top", "child", "outbox". Defaults to "child". TemplateID string // ID of the template to use. If empty, then template roles are used. TemplateRoles []string // List of acceptable Template Roles that can be used to make a stream. If empty, then all template for this container are valid. WithData map[string]*template.Template // Map of values to preset in the new stream }
func (StepAddStream) Get ¶
func (step StepAddStream) Get(builder Builder, buffer io.Writer) PipelineBehavior
Get builds the HTML for this step - either a modal template selector, or the embedded edit form
func (StepAddStream) Post ¶
func (step StepAddStream) Post(builder Builder, buffer io.Writer) PipelineBehavior
type StepAsConfirmation ¶
StepAsConfirmation displays a confirmation dialog on GET, giving users an option to continue or not
func (StepAsConfirmation) Get ¶
func (step StepAsConfirmation) Get(builder Builder, buffer io.Writer) PipelineBehavior
Get displays a modal that asks users to continue or not.
func (StepAsConfirmation) Post ¶
func (step StepAsConfirmation) Post(builder Builder, _ io.Writer) PipelineBehavior
Post does nothing. (Other steps in the pipeline will make changes)
type StepAsModal ¶
StepAsModal is a Step that can update the data.DataMap custom data stored in a Stream
func (StepAsModal) Get ¶
func (step StepAsModal) Get(builder Builder, buffer io.Writer) PipelineBehavior
Get displays a form where users can update stream data
func (StepAsModal) Post ¶
func (step StepAsModal) Post(builder Builder, buffer io.Writer) PipelineBehavior
Post updates the stream with approved data from the request body.
type StepAsTooltip ¶
StepAsTooltip is a Step that can update the data.DataMap custom data stored in a Stream
func (StepAsTooltip) Get ¶
func (step StepAsTooltip) Get(builder Builder, buffer io.Writer) PipelineBehavior
Get displays a form where users can update stream data
func (StepAsTooltip) Post ¶
func (step StepAsTooltip) Post(builder Builder, buffer io.Writer) PipelineBehavior
Post updates the stream with approved data from the request body.
func (StepAsTooltip) UseGlobalWrapper ¶
func (step StepAsTooltip) UseGlobalWrapper() bool
type StepCacheURL ¶
type StepCacheURL struct {
CacheControl string
}
StepCacheURL is an action that can add new model objects of any type
func (StepCacheURL) Get ¶
func (step StepCacheURL) Get(builder Builder, buffer io.Writer) PipelineBehavior
Get displays a modal form that lets users enter data for their new model object.
func (StepCacheURL) Post ¶
func (step StepCacheURL) Post(builder Builder, buffer io.Writer) PipelineBehavior
Post initializes a new model object, populates it with data from the form, then saves it to the database.
type StepDelete ¶
type StepDelete struct { Title *template.Template Message *template.Template Submit string Method string }
StepDelete is a Step that can delete a Stream from the Domain
func (StepDelete) Get ¶
func (step StepDelete) Get(builder Builder, buffer io.Writer) PipelineBehavior
Get displays a customizable confirmation form for the delete
func (StepDelete) Post ¶
func (step StepDelete) Post(builder Builder, _ io.Writer) PipelineBehavior
Post removes the object from the database (likely using a soft-delete, though)
type StepDeleteArchive ¶
type StepDeleteArchive struct {
Token string
}
StepDeleteArchive is a Step that can delete a Stream from the Domain
func (StepDeleteArchive) Get ¶
func (step StepDeleteArchive) Get(builder Builder, buffer io.Writer) PipelineBehavior
Get displays a customizable confirmation form for the delete
func (StepDeleteArchive) Post ¶
func (step StepDeleteArchive) Post(builder Builder, _ io.Writer) PipelineBehavior
Post removes the object from the database (likely using a soft-delete, though)
type StepDeleteAttachments ¶
StepDeleteAttachments represents an action that can delete ine or more attachments. It can only be used on a StreamBuilder
func (StepDeleteAttachments) Get ¶
func (step StepDeleteAttachments) Get(builder Builder, _ io.Writer) PipelineBehavior
func (StepDeleteAttachments) Post ¶
func (step StepDeleteAttachments) Post(builder Builder, _ io.Writer) PipelineBehavior
type StepDo ¶
type StepDo struct {
Action string
}
StepDo is a Step that executes another action within this context.
type StepDump ¶
StepDump is a Step that can delete a Stream from the Domain
type StepEditConnection ¶
type StepEditConnection struct{}
func (StepEditConnection) Get ¶
func (step StepEditConnection) Get(builder Builder, buffer io.Writer) PipelineBehavior
func (StepEditConnection) Post ¶
func (step StepEditConnection) Post(builder Builder, _ io.Writer) PipelineBehavior
type StepEditContent ¶
StepEditContent is a Step that can edit/update Container in a streamDraft.
func (StepEditContent) Get ¶
func (step StepEditContent) Get(builder Builder, buffer io.Writer) PipelineBehavior
func (StepEditContent) Post ¶
func (step StepEditContent) Post(builder Builder, _ io.Writer) PipelineBehavior
type StepEditModelObject ¶
StepEditModelObject is an action that can add new sub-streams to the domain.
func (StepEditModelObject) Get ¶
func (step StepEditModelObject) Get(builder Builder, buffer io.Writer) PipelineBehavior
Get displays a modal form that lets users enter data for their new model object.
func (StepEditModelObject) Post ¶
func (step StepEditModelObject) Post(builder Builder, _ io.Writer) PipelineBehavior
Post initializes a new model object, populates it with data from the form, then saves it to the database.
type StepEditRegistration ¶
type StepEditRegistration struct{}
StepEditRegistration is a Step that can update the data.DataMap custom data stored in a Stream
func (StepEditRegistration) Get ¶
func (step StepEditRegistration) Get(builder Builder, buffer io.Writer) PipelineBehavior
func (StepEditRegistration) Post ¶
func (step StepEditRegistration) Post(builder Builder, _ io.Writer) PipelineBehavior
Post updates the stream with approved data from the request body.
type StepEditTemplate ¶
StepEditTemplate is a Step that lets users choose their profile template(s)
func (StepEditTemplate) Get ¶
func (step StepEditTemplate) Get(builder Builder, buffer io.Writer) PipelineBehavior
Get displays a form where users can select their profile template(s)
func (StepEditTemplate) Post ¶
func (step StepEditTemplate) Post(builder Builder, _ io.Writer) PipelineBehavior
Post updates a User's profile template(s)
type StepEditWidget ¶
type StepEditWidget struct{}
StepEditWidget is a Step that displays a form for editing Widgets.
func (StepEditWidget) Get ¶
func (step StepEditWidget) Get(builder Builder, buffer io.Writer) PipelineBehavior
func (StepEditWidget) Post ¶
func (step StepEditWidget) Post(builder Builder, _ io.Writer) PipelineBehavior
Post updates a Widget's configuration data.
type StepError ¶
type StepForwardTo ¶
StepForwardTo is a Step that sends an HTMX 'forward' to a new page.
func (StepForwardTo) Get ¶
func (step StepForwardTo) Get(builder Builder, buffer io.Writer) PipelineBehavior
func (StepForwardTo) Post ¶
func (step StepForwardTo) Post(builder Builder, _ io.Writer) PipelineBehavior
Post updates the stream with approved data from the request body.
type StepGetArchive ¶
type StepGetArchive struct { Token string Depth int JSON bool Attachments bool Metadata [][]map[string]any }
StepGetArchive is a Step that can delete a Stream from the Domain
func (StepGetArchive) FileNotReady ¶
func (step StepGetArchive) FileNotReady(builder Builder, writer io.Writer) PipelineBehavior
func (StepGetArchive) Get ¶
func (step StepGetArchive) Get(builder Builder, writer io.Writer) PipelineBehavior
Get displays a customizable confirmation form for the delete
func (StepGetArchive) Post ¶
func (step StepGetArchive) Post(builder Builder, _ io.Writer) PipelineBehavior
Post removes the object from the database (likely using a soft-delete, though)
type StepIfCondition ¶
StepIfCondition is a Step that can update the data.DataMap custom data stored in a Stream
func (StepIfCondition) Get ¶
func (step StepIfCondition) Get(builder Builder, buffer io.Writer) PipelineBehavior
Get displays a form where users can update stream data
func (StepIfCondition) Post ¶
func (step StepIfCondition) Post(builder Builder, buffer io.Writer) PipelineBehavior
Post updates the stream with approved data from the request body.
type StepInlineError ¶
StepInlineError is a Step that can build a Stream into HTML
func (StepInlineError) Get ¶
func (step StepInlineError) Get(builder Builder, buffer io.Writer) PipelineBehavior
Get builds the Stream HTML to the context
func (StepInlineError) Post ¶
func (step StepInlineError) Post(builder Builder, buffer io.Writer) PipelineBehavior
type StepInlineSaveButton ¶
StepInlineSaveButton is a Step that can build a Stream into HTML
func (StepInlineSaveButton) Get ¶
func (step StepInlineSaveButton) Get(builder Builder, buffer io.Writer) PipelineBehavior
Get builds the Stream HTML to the context
func (StepInlineSaveButton) Post ¶
func (step StepInlineSaveButton) Post(builder Builder, buffer io.Writer) PipelineBehavior
type StepInlineSuccess ¶
StepInlineSuccess is a Step that can build a Stream into HTML
func (StepInlineSuccess) Get ¶
func (step StepInlineSuccess) Get(builder Builder, buffer io.Writer) PipelineBehavior
Get builds the Stream HTML to the context
func (StepInlineSuccess) Post ¶
func (step StepInlineSuccess) Post(builder Builder, buffer io.Writer) PipelineBehavior
type StepMakeArchive ¶
type StepMakeArchive struct { Token string Depth int JSON bool Attachments bool Metadata [][]map[string]any }
StepMakeArchive is a Step that can delete a Stream from the Domain
func (StepMakeArchive) Get ¶
func (step StepMakeArchive) Get(builder Builder, buffer io.Writer) PipelineBehavior
Get displays a customizable confirmation form for the delete
func (StepMakeArchive) Post ¶
func (step StepMakeArchive) Post(builder Builder, _ io.Writer) PipelineBehavior
Post removes the object from the database (likely using a soft-delete, though)
type StepProcessContent ¶
StepProcessContent is an action step that adds tags to a stream, either by scanning the content, or by calculating template values
func (StepProcessContent) Get ¶
func (step StepProcessContent) Get(builder Builder, buffer io.Writer) PipelineBehavior
Get builds the HTML for this step - either a modal template selector, or the embedded edit form
func (StepProcessContent) Post ¶
func (step StepProcessContent) Post(builder Builder, buffer io.Writer) PipelineBehavior
type StepProcessTags ¶
type StepProcessTags struct {
Paths []string
}
StepProcessTags is an action step that adds tags to a stream, either by scanning the content, or by calculating template values
func (StepProcessTags) Get ¶
func (step StepProcessTags) Get(builder Builder, buffer io.Writer) PipelineBehavior
Get builds the HTML for this step - either a modal template selector, or the embedded edit form
func (StepProcessTags) Post ¶
func (step StepProcessTags) Post(builder Builder, buffer io.Writer) PipelineBehavior
type StepRedirectTo ¶
StepRedirectTo is a Step that sends an HTTP redirect to another page.
func (StepRedirectTo) Get ¶
func (step StepRedirectTo) Get(builder Builder, buffer io.Writer) PipelineBehavior
func (StepRedirectTo) Post ¶
func (step StepRedirectTo) Post(builder Builder, _ io.Writer) PipelineBehavior
Post updates the stream with approved data from the request body.
type StepRefreshPage ¶
type StepRefreshPage struct{}
StepRefreshPage is a Step that forwards the user to a new page.
func (StepRefreshPage) Get ¶
func (step StepRefreshPage) Get(builder Builder, _ io.Writer) PipelineBehavior
func (StepRefreshPage) Post ¶
func (step StepRefreshPage) Post(builder Builder, _ io.Writer) PipelineBehavior
Post updates the stream with approved data from the request body.
type StepReloadPage ¶
type StepReloadPage struct{}
StepReloadPage is a Step that forwards the user to a new page.
func (StepReloadPage) Get ¶
func (step StepReloadPage) Get(builder Builder, _ io.Writer) PipelineBehavior
func (StepReloadPage) Post ¶
func (step StepReloadPage) Post(builder Builder, _ io.Writer) PipelineBehavior
Post updates the stream with approved data from the request body.
type StepRemoveEvent ¶
type StepRemoveEvent struct {
Event string
}
StepRemoveEvent is a Step that forwards the user to a new page.
func (StepRemoveEvent) Get ¶
func (step StepRemoveEvent) Get(_ Builder, _ io.Writer) PipelineBehavior
func (StepRemoveEvent) Post ¶
func (step StepRemoveEvent) Post(_ Builder, _ io.Writer) PipelineBehavior
Post updates the stream with approved data from the request body.
type StepSaveAndPublish ¶
type StepSaveAndPublish struct {
Outbox bool
}
StepSaveAndPublish is a Step that can update a stream's PublishDate with the current time.
func (StepSaveAndPublish) Get ¶
func (step StepSaveAndPublish) Get(builder Builder, _ io.Writer) PipelineBehavior
func (StepSaveAndPublish) Post ¶
func (step StepSaveAndPublish) Post(builder Builder, _ io.Writer) PipelineBehavior
Post updates the stream with the current date as the "PublishDate"
type StepSearchIndex ¶
StepSearchIndex is a Step that can update a stream's PublishDate with the current time.
func (StepSearchIndex) Get ¶
func (step StepSearchIndex) Get(builder Builder, _ io.Writer) PipelineBehavior
func (StepSearchIndex) Post ¶
func (step StepSearchIndex) Post(builder Builder, _ io.Writer) PipelineBehavior
Post updates the stream with the current date as the "PublishDate"
type StepSendEmail ¶
type StepSendEmail struct {
Email string
}
StepSendEmail is a Step that can send a named email to a recipient
func (StepSendEmail) Get ¶
func (step StepSendEmail) Get(_ Builder, _ io.Writer) PipelineBehavior
func (StepSendEmail) Post ¶
func (step StepSendEmail) Post(builder Builder, _ io.Writer) PipelineBehavior
Post saves the object to the database
type StepSetData ¶
type StepSetData struct { FromURL []string // List of paths to pull from URL data FromForm []string // List of paths to pull from Form data Values map[string]*template.Template // values to set directly into the object Defaults mapof.Any // values to set into the object IFF they are currently empty. }
StepSetData is a Step that can update the custom data stored in a Stream
func (StepSetData) Get ¶
func (step StepSetData) Get(builder Builder, buffer io.Writer) PipelineBehavior
func (StepSetData) Post ¶
func (step StepSetData) Post(builder Builder, _ io.Writer) PipelineBehavior
Post updates the stream with approved data from the request body.
type StepSetHeader ¶
StepSetHeader is a Step that can update the custom data stored in a Stream
func (StepSetHeader) Get ¶
func (step StepSetHeader) Get(builder Builder, buffer io.Writer) PipelineBehavior
func (StepSetHeader) Post ¶
func (step StepSetHeader) Post(builder Builder, _ io.Writer) PipelineBehavior
Post updates the stream with approved data from the request body.
type StepSetPassword ¶
type StepSetPassword struct { }
StepSetPassword is a Step that can update a user's password
func (StepSetPassword) Get ¶
func (step StepSetPassword) Get(builder Builder, buffer io.Writer) PipelineBehavior
func (StepSetPassword) Post ¶
func (step StepSetPassword) Post(builder Builder, _ io.Writer) PipelineBehavior
Post updates the stream with approved data from the request body.
type StepSetQueryParam ¶
StepSetQueryParam is a Step that sets values to the request query string
func (StepSetQueryParam) Do ¶
func (step StepSetQueryParam) Do(builder Builder) PipelineBehavior
func (StepSetQueryParam) Get ¶
func (step StepSetQueryParam) Get(builder Builder, buffer io.Writer) PipelineBehavior
Get displays a form where users can update stream data
func (StepSetQueryParam) Post ¶
func (step StepSetQueryParam) Post(builder Builder, _ io.Writer) PipelineBehavior
Post updates the stream with approved data from the request body.
type StepSetRenderData ¶
StepSetRenderData is a Step that sets values to the request query string
func (StepSetRenderData) Do ¶
func (step StepSetRenderData) Do(builder Builder) PipelineBehavior
func (StepSetRenderData) Get ¶
func (step StepSetRenderData) Get(builder Builder, buffer io.Writer) PipelineBehavior
Get displays a form where users can update stream data
func (StepSetRenderData) Post ¶
func (step StepSetRenderData) Post(builder Builder, _ io.Writer) PipelineBehavior
Post updates the stream with approved data from the request body.
type StepSetResponse ¶
type StepSetResponse struct{}
func (StepSetResponse) Get ¶
func (step StepSetResponse) Get(builder Builder, buffer io.Writer) PipelineBehavior
func (StepSetResponse) Post ¶
func (step StepSetResponse) Post(builder Builder, _ io.Writer) PipelineBehavior
type StepSetSimpleSharing ¶
StepSetSimpleSharing represents an action that can edit a top-level folder in the Domain
func (StepSetSimpleSharing) Get ¶
func (step StepSetSimpleSharing) Get(builder Builder, buffer io.Writer) PipelineBehavior
func (StepSetSimpleSharing) Post ¶
func (step StepSetSimpleSharing) Post(builder Builder, _ io.Writer) PipelineBehavior
type StepSetState ¶
type StepSetState struct {
State string
}
StepSetState is a Step that can change a Stream's state
func (StepSetState) Get ¶
func (step StepSetState) Get(builder Builder, _ io.Writer) PipelineBehavior
func (StepSetState) Post ¶
func (step StepSetState) Post(builder Builder, _ io.Writer) PipelineBehavior
Post updates the stream with configured data, and moves the stream to a new state
type StepSetThumbnail ¶
type StepSetThumbnail struct {
Path string
}
StepSetThumbnail is a Step that can update the data.DataMap custom data stored in a Stream
func (StepSetThumbnail) Get ¶
func (step StepSetThumbnail) Get(builder Builder, _ io.Writer) PipelineBehavior
func (StepSetThumbnail) Post ¶
func (step StepSetThumbnail) Post(builder Builder, _ io.Writer) PipelineBehavior
Post updates the stream with approved data from the request body.
type StepSleep ¶
type StepSleep struct {
Duration int
}
StepSleep is a Step that sleeps for a determined period of time. It should really only be used for debugging.
type StepSortAttachments ¶
StepSortAttachments is a Step that can update multiple records at once
func (StepSortAttachments) Get ¶
func (step StepSortAttachments) Get(builder Builder, _ io.Writer) PipelineBehavior
func (StepSortAttachments) Post ¶
func (step StepSortAttachments) Post(builder Builder, _ io.Writer) PipelineBehavior
Post updates the stream with approved data from the request body.
type StepSortWidgets ¶
type StepSortWidgets struct{}
StepSortWidgets is a Step that can edit/update Container in a streamDraft.
func (StepSortWidgets) Get ¶
func (step StepSortWidgets) Get(builder Builder, buffer io.Writer) PipelineBehavior
func (StepSortWidgets) Post ¶
func (step StepSortWidgets) Post(builder Builder, _ io.Writer) PipelineBehavior
type StepStreamPromoteDraft ¶
type StepStreamPromoteDraft struct {
StateID string
}
StepStreamPromoteDraft is a Step that can copy the Container from a StreamDraft into its corresponding Stream
func (StepStreamPromoteDraft) Get ¶
func (step StepStreamPromoteDraft) Get(builder Builder, _ io.Writer) PipelineBehavior
func (StepStreamPromoteDraft) Post ¶
func (step StepStreamPromoteDraft) Post(builder Builder, _ io.Writer) PipelineBehavior
Post copies relevant information from the draft into the primary stream, then deletes the draft
type StepTableEditor ¶
func (StepTableEditor) Get ¶
func (step StepTableEditor) Get(builder Builder, buffer io.Writer) PipelineBehavior
func (StepTableEditor) Post ¶
func (step StepTableEditor) Post(builder Builder, _ io.Writer) PipelineBehavior
type StepTriggerEvent ¶
StepTriggerEvent is a Step that forwards the user to a new page.
func (StepTriggerEvent) Get ¶
func (step StepTriggerEvent) Get(builder Builder, _ io.Writer) PipelineBehavior
func (StepTriggerEvent) Post ¶
func (step StepTriggerEvent) Post(builder Builder, _ io.Writer) PipelineBehavior
Post updates the stream with approved data from the request body.
type StepUnPublish ¶
type StepUnPublish struct {
Outbox bool
}
StepUnPublish is a Step that can update a stream's PublishDate with the current time.
func (StepUnPublish) Get ¶
func (step StepUnPublish) Get(builder Builder, _ io.Writer) PipelineBehavior
func (StepUnPublish) Post ¶
func (step StepUnPublish) Post(builder Builder, _ io.Writer) PipelineBehavior
Post updates the stream with the current date as the "PublishDate"
type StepUploadAttachments ¶
type StepUploadAttachments struct { Action string // Action to perform when uploading the attachment ("append" or "replace") Fieldname string // Name of the form field that contains the file data (Default: "file") AttachmentPath string // Path name to store the AttachmentID DownloadPath string // Path name to store the download URL FilenamePath string // Path name to store the original filename AcceptType string // Mime Type(s) to accept (e.g. "image/*") Category string // Category to apply to the Attachment Maximum int // Maximum number of uploads to allow (Default: 1) JSONResult bool // If TRUE, return a JSON structure with result data. This forces Maximum=1 Label string // Value to set as the attachment.label LabelFieldname string // Form field that defines the attachment label Description string // Value to set as the attachment.description DescriptionFieldname string // Form field that defines the attachment description RuleHeight int // Fixed height for all downloads RuleWidth int // Fixed width for all downloads RuleTypes []string // Allowed extensions. The first value is used as the default. }
StepUploadAttachments represents an action that can upload attachments. It can only be used on a StreamBuilder
func (StepUploadAttachments) Get ¶
func (step StepUploadAttachments) Get(builder Builder, _ io.Writer) PipelineBehavior
func (StepUploadAttachments) Post ¶
func (step StepUploadAttachments) Post(builder Builder, buffer io.Writer) PipelineBehavior
type StepViewCSS ¶
type StepViewCSS struct {
File string
}
StepViewCSS is a Step that can build a Stream into HTML
func (StepViewCSS) Get ¶
func (step StepViewCSS) Get(builder Builder, buffer io.Writer) PipelineBehavior
Get builds the Stream HTML to the context
func (StepViewCSS) Post ¶
func (step StepViewCSS) Post(builder Builder, buffer io.Writer) PipelineBehavior
type StepViewFeed ¶
type StepViewFeed struct{}
StepViewFeed is a Step that can build a Stream into HTML
func (StepViewFeed) Get ¶
func (step StepViewFeed) Get(builder Builder, buffer io.Writer) PipelineBehavior
Get builds the Stream HTML to the context
func (StepViewFeed) Post ¶
func (step StepViewFeed) Post(builder Builder, _ io.Writer) PipelineBehavior
type StepViewHTML ¶
StepViewHTML is a Step that can build a Stream into HTML
func (StepViewHTML) Get ¶
func (step StepViewHTML) Get(builder Builder, buffer io.Writer) PipelineBehavior
Get builds the Stream HTML to the context
func (StepViewHTML) Post ¶
func (step StepViewHTML) Post(builder Builder, buffer io.Writer) PipelineBehavior
type StepViewJSONLD ¶
type StepViewJSONLD struct {
Method string
}
StepViewJSONLD is a Step that can build a Stream into HTML
func (StepViewJSONLD) Get ¶
func (step StepViewJSONLD) Get(builder Builder, buffer io.Writer) PipelineBehavior
Get builds the Stream HTML to the context
func (StepViewJSONLD) Post ¶
func (step StepViewJSONLD) Post(builder Builder, buffer io.Writer) PipelineBehavior
type StepWebSub ¶
type StepWebSub struct { }
StepWebSub is a Step that can build a Stream into HTML
func (StepWebSub) Get ¶
func (step StepWebSub) Get(builder Builder, buffer io.Writer) PipelineBehavior
Get is not required by WebSub. So let's redirect to the primary action.
func (StepWebSub) Post ¶
func (step StepWebSub) Post(builder Builder, _ io.Writer) PipelineBehavior
Post accepts a WebSub request, verifies it, and potentially creates a new Follower record.
type StepWithAttachment ¶
StepWithAttachment is a Step that can update the data.DataMap custom data stored in a Stream
func (StepWithAttachment) Get ¶
func (step StepWithAttachment) Get(builder Builder, buffer io.Writer) PipelineBehavior
func (StepWithAttachment) Post ¶
func (step StepWithAttachment) Post(builder Builder, buffer io.Writer) PipelineBehavior
Post updates the stream with approved data from the request body.
type StepWithChildren ¶
StepWithChildren is a Step that can update the data.DataMap custom data stored in a Stream
func (StepWithChildren) Get ¶
func (step StepWithChildren) Get(builder Builder, buffer io.Writer) PipelineBehavior
func (StepWithChildren) Post ¶
func (step StepWithChildren) Post(builder Builder, buffer io.Writer) PipelineBehavior
Post updates the stream with approved data from the request body.
type StepWithDraft ¶
StepWithDraft is a Step that can update the data.DataMap custom data stored in a Stream
func (StepWithDraft) Get ¶
func (step StepWithDraft) Get(builder Builder, buffer io.Writer) PipelineBehavior
Get displays a form where users can update stream data
func (StepWithDraft) Post ¶
func (step StepWithDraft) Post(builder Builder, buffer io.Writer) PipelineBehavior
Post updates the stream with approved data from the request body.
type StepWithFolder ¶
StepWithFolder is a Step that can update the data.DataMap custom data stored in a Stream
func (StepWithFolder) Get ¶
func (step StepWithFolder) Get(builder Builder, buffer io.Writer) PipelineBehavior
func (StepWithFolder) Post ¶
func (step StepWithFolder) Post(builder Builder, buffer io.Writer) PipelineBehavior
Post updates the stream with approved data from the request body.
type StepWithFollower ¶
StepWithFollower is a Step that can update the data.DataMap custom data stored in a Stream
func (StepWithFollower) Get ¶
func (step StepWithFollower) Get(builder Builder, buffer io.Writer) PipelineBehavior
func (StepWithFollower) Post ¶
func (step StepWithFollower) Post(builder Builder, buffer io.Writer) PipelineBehavior
Post updates the stream with approved data from the request body.
type StepWithFollowing ¶
StepWithFollowing is a Step that can update the data.DataMap custom data stored in a Stream
func (StepWithFollowing) Get ¶
func (step StepWithFollowing) Get(builder Builder, buffer io.Writer) PipelineBehavior
func (StepWithFollowing) Post ¶
func (step StepWithFollowing) Post(builder Builder, buffer io.Writer) PipelineBehavior
Post updates the stream with approved data from the request body.
type StepWithMessage ¶
StepWithMessage is a Step that executes a new pipeline on an Inbox Message, identified by the query parameter "messageId"
func (StepWithMessage) Get ¶
func (step StepWithMessage) Get(builder Builder, buffer io.Writer) PipelineBehavior
func (StepWithMessage) Post ¶
func (step StepWithMessage) Post(builder Builder, buffer io.Writer) PipelineBehavior
Post updates the message with data from the request body.
type StepWithNextSibling ¶
StepWithNextSibling is a Step that can update the data.DataMap custom data stored in a Stream
func (StepWithNextSibling) Get ¶
func (step StepWithNextSibling) Get(builder Builder, buffer io.Writer) PipelineBehavior
func (StepWithNextSibling) Post ¶
func (step StepWithNextSibling) Post(builder Builder, buffer io.Writer) PipelineBehavior
Post executes the subSteps on the parent Stream
type StepWithParent ¶
StepWithParent is a Step that can update the data.DataMap custom data stored in a Stream
func (StepWithParent) Get ¶
func (step StepWithParent) Get(builder Builder, buffer io.Writer) PipelineBehavior
func (StepWithParent) Post ¶
func (step StepWithParent) Post(builder Builder, buffer io.Writer) PipelineBehavior
Post executes the subSteps on the parent Stream
type StepWithPrevSibling ¶
StepWithPrevSibling is a Step that can update the data.DataMap custom data stored in a Stream
func (StepWithPrevSibling) Get ¶
func (step StepWithPrevSibling) Get(builder Builder, buffer io.Writer) PipelineBehavior
func (StepWithPrevSibling) Post ¶
func (step StepWithPrevSibling) Post(builder Builder, buffer io.Writer) PipelineBehavior
Post executes the subSteps on the parent Stream
type StepWithResponse ¶
StepWithResponse is a Step that can update the data.DataMap custom data stored in a Stream
func (StepWithResponse) Get ¶
func (step StepWithResponse) Get(builder Builder, buffer io.Writer) PipelineBehavior
func (StepWithResponse) Post ¶
func (step StepWithResponse) Post(builder Builder, buffer io.Writer) PipelineBehavior
Post updates the stream with approved data from the request body.
type StepWithRule ¶
StepWithRule is a Step that can update the data.DataMap custom data stored in a Stream
func (StepWithRule) Get ¶
func (step StepWithRule) Get(builder Builder, buffer io.Writer) PipelineBehavior
func (StepWithRule) Post ¶
func (step StepWithRule) Post(builder Builder, buffer io.Writer) PipelineBehavior
Post updates the stream with approved data from the request body.
type Stream ¶
type Stream struct { CommonWithTemplate // contains filtered or unexported fields }
Stream wraps a model.Stream object and provides functions that make it easy to build an HTML template with it.
func NewStream ¶
func NewStream(factory Factory, request *http.Request, response http.ResponseWriter, template model.Template, stream *model.Stream, actionID string) (Stream, error)
NewStream creates a new object that can generate HTML for a specific stream/view
func NewStreamFromURI ¶
func NewStreamFromURI(serverFactory ServerFactory, request *http.Request, response http.ResponseWriter, stream *model.Stream, actionID string) (Stream, error)
NewStreamFromURI creates a new Stream builder for the provided request context. IMPORTANT: The stream parameter is expected to be an empty stream in the caller's scope that will be populated by this function.
func NewStreamWithoutTemplate ¶
func NewStreamWithoutTemplate(factory Factory, request *http.Request, response http.ResponseWriter, stream *model.Stream, actionID string) (Stream, error)
NewStreamWithoutTemplate creates a new object that can generate HTML for a specific stream/view
func (Stream) Ancestors ¶
func (w Stream) Ancestors() QueryBuilder[model.StreamSummary]
Ancestors returns all Streams that have the same "parent" as the current Stream's parent
func (Stream) AnnouncesBefore ¶
func (Stream) Attachment ¶
func (w Stream) Attachment() (model.Attachment, error)
Reference to the first file attached to this stream
func (Stream) Attachments ¶
Attachments lists all attachments for this stream.
func (Stream) AttachmentsByCategory ¶
AttachmentByType lists all attachments for this stream.
func (Stream) AttributedTo ¶
func (w Stream) AttributedTo() model.PersonLink
AttributedTo returns ALL AttributedTo records for this stream
func (Stream) Author ¶
func (w Stream) Author() model.PersonLink
Author returns the "first" AttributedTo record for this stream
func (Stream) Breadcrumbs ¶
func (w Stream) Breadcrumbs() ([]model.StreamSummary, error)
func (Stream) CanCreate ¶
func (w Stream) CanCreate() []form.LookupCode
CanCreate returns all of the templates that can be created underneath the current stream.
func (Stream) Children ¶
func (w Stream) Children() QueryBuilder[model.StreamSummary]
Children returns all Streams with a "parent" is the current Stream
func (Stream) ContentHTML ¶
Returns the body content as an HTML template
func (Stream) ContentRaw ¶
func (Stream) CreateDate ¶
CreateDate returns the CreateDate of the stream being built
func (Stream) DataString ¶
DataString returns a custom data field converted to a string
func (Stream) Document ¶
func (w Stream) Document() model.DocumentLink
Document returns the DocumentLink record for this stream
func (Stream) FirstChild ¶
FirstChild returns the first child Stream underneath this one, based on the provided sort field
func (Stream) Grandparent ¶
Grandparent returns a Stream renderer containing the parent of the parent of the current stream
func (Stream) HasGrandparent ¶
HasGrandparent returns TRUE if the stream
func (Stream) InReplyTo ¶
InReplyTo returns an ActivityStream reference to the URL that this stream replies to
func (Stream) IsCurrentStream ¶
func (Stream) IsPublished ¶
IsPublished returns TRUE if the stream being built has been published
func (Stream) IsReply ¶
IsReply returns TRUE if this stream is marked as a reply to another stream or resource
func (Stream) LastChild ¶
FirstChild returns the first child Stream underneath this one, based on the provided sort field
func (Stream) LikesBefore ¶
func (Stream) ListAllWidgets ¶
func (w Stream) ListAllWidgets() []form.LookupCode
ListAllWidgets returns a list of all the widgets available on this server
func (Stream) ListWidgetsByLocation ¶
func (w Stream) ListWidgetsByLocation(location string) []model.StreamWidget
ListWidgetsByLocation returns a list of all the widgets in the specified location
func (Stream) NavigationID ¶
NavigationID returns the unique ID of the top-level stream in this stream's hierarchy
func (Stream) NextSibling ¶
NextSibling returns the sibling Stream that immediately follows this one, based on the provided sort field
func (Stream) OEmbedJSON ¶
OEmbedJSON returns the URL for the oEmbed JSON endpoint for this stream
func (Stream) Outbox ¶
func (w Stream) Outbox() (QueryBuilder[model.OutboxMessage], error)
Outbox returns a QueryBuilder for the current Stream's outbox
func (Stream) ParentOutbox ¶
ParentOutbox returns an Outbox builder containing the parent of the current stream
func (Stream) PrevSibling ¶
PrevSibling returns the sibling Stream that immediately preceeds this one, based on the provided sort field
func (Stream) PublishDate ¶
PublishDate returns the PublishDate of the stream being built
func (Stream) RepliesAfter ¶
func (Stream) RepliesBefore ¶
RepliesBefore returns a slice of all ActivityStreams before the specified date
func (Stream) ShortSummary ¶
SummarySummary returns a plaintext summary (<200 characters) of the stream's description
func (Stream) Siblings ¶
func (w Stream) Siblings() QueryBuilder[model.StreamSummary]
Siblings returns all Streams that have the same "parent" as the current Stream
func (Stream) Streams ¶
func (w Stream) Streams() QueryBuilder[model.StreamSummary]
func (Stream) SummaryHTML ¶
SummaryHTML returns the description of the stream being built
func (Stream) TemplateID ¶
TemplateID returns the name of the template being used
func (Stream) UpdateDate ¶
UpdateDate returns the UpdateDate of the stream being built
func (Stream) UserCan ¶
UserCan returns TRUE if this Request is authorized to access the requested view
func (Stream) Users ¶
func (w Stream) Users() QueryBuilder[model.UserSummary]
type Syndication ¶
type Syndication struct { CommonWithTemplate // contains filtered or unexported fields }
func NewSyndication ¶
func NewSyndication(factory Factory, request *http.Request, response http.ResponseWriter, template model.Template, actionID string) (Syndication, error)
NewSyndication returns a fully initialized `Syndication` builder.
func (Syndication) BasePath ¶
func (w Syndication) BasePath() string
func (Syndication) NavigationID ¶
func (w Syndication) NavigationID() string
func (Syndication) PageTitle ¶
func (w Syndication) PageTitle() string
func (Syndication) Permalink ¶
func (w Syndication) Permalink() string
func (Syndication) Render ¶
func (w Syndication) Render() (template.HTML, error)
Render generates the string value for this Stream
func (Syndication) Token ¶
func (w Syndication) Token() string
type TemplateLike ¶
type User ¶
type User struct { CommonWithTemplate // contains filtered or unexported fields }
User is a builder for the admin/users page It can only be accessed by a Domain Owner
func NewUser ¶
func NewUser(factory Factory, request *http.Request, response http.ResponseWriter, template model.Template, user *model.User, actionID string) (User, error)
NewUser returns a fully initialized `User` builder.
func (User) AssignedGroups ¶
AssignedGroups lists all groups to which the current user is assigned.
func (User) CountIndexableUsers ¶
CountIndexableUsers returns the total number of users marked "isIndexable"
func (User) CountPublicUsers ¶
CountPublicUsers returns the total number of users marked "isPublic"
func (User) CountUsers ¶
CountUsers returns the total number of users in the database
func (User) DisplayName ¶
func (User) Groups ¶
func (w User) Groups() ([]form.LookupCode, error)
Groups returns a slice of all Groups in the database
func (User) NavigationID ¶
func (User) ProfileURL ¶
func (User) Registration ¶
func (w User) Registration() model.Registration
Registration returns the signup template selected for this domain
func (User) Users ¶
func (w User) Users() *QueryBuilder[model.UserSummary]
type Webhook ¶
type Webhook struct { CommonWithTemplate // contains filtered or unexported fields }
Webhook is a builder for the admin/webhooks page It can only be accessed by a Domain Owner
func NewWebhook ¶
func NewWebhook(factory Factory, request *http.Request, response http.ResponseWriter, template model.Template, webhook *model.Webhook, actionID string) (Webhook, error)
NewWebhook returns a fully initialized `Webhook` builder.
func (Webhook) NavigationID ¶
type Widget ¶
type Widget struct { Widget model.StreamWidget *Stream }
Widget builder is created by the "with-widget" action, and can execute additional action steps on a widget that is embedded in a stream. To save the final result, you must call "save" on the stream itself, not within this widget.
Source Files
¶
- build.go
- builder_.go
- builder_admin_domain.go
- builder_admin_groups.go
- builder_admin_navigation.go
- builder_admin_rule.go
- builder_admin_syndication.go
- builder_admin_tags.go
- builder_admin_users.go
- builder_admin_webhooks.go
- builder_attachment.go
- builder_common.go
- builder_common_with_template.go
- builder_follower.go
- builder_inbox.go
- builder_model.go
- builder_oAuthAuthorization.go
- builder_outbox.go
- builder_registration.go
- builder_stream.go
- builder_widget.go
- constants.go
- factory.go
- functions.go
- interfaces.go
- pipeline.go
- pipeline_behavior.go
- pipeline_result.go
- queryBuilder.go
- searchBuilder.go
- step_.go
- step_AddModelObject.go
- step_AddStream.go
- step_AsConfirmation.go
- step_AsModal.go
- step_AsTooltip.go
- step_CacheURL.go
- step_Delete.go
- step_DeleteArchive.go
- step_DeleteAttachments.go
- step_Do.go
- step_Dump.go
- step_EditConnection.go
- step_EditContent.go
- step_EditModelObject.go
- step_EditRegistration.go
- step_EditTable.go
- step_EditTemplate.go
- step_EditWidget.go
- step_Error.go
- step_ForwardTo.go
- step_GetArchive.go
- step_Halt.go
- step_IfCondition.go
- step_InlineError.go
- step_InlineSaveButton.go
- step_InlineSuccess.go
- step_MakeArchive.go
- step_ProcessContent.go
- step_ProcessTags.go
- step_PromoteDraft.go
- step_RedirectTo.go
- step_RefreshPage.go
- step_ReloadPage.go
- step_RemoveEvent.go
- step_Save.go
- step_SaveAndPublish.go
- step_SearchIndex.go
- step_SendEmail.go
- step_SetData.go
- step_SetHeader.go
- step_SetPassword.go
- step_SetQueryParam.go
- step_SetRenderData.go
- step_SetResponse.go
- step_SetSimpleSharing.go
- step_SetState.go
- step_SetThumbnail.go
- step_Sleep.go
- step_Sort.go
- step_SortAttachments.go
- step_SortWidgets.go
- step_TriggerEvent.go
- step_UnPublish.go
- step_UploadAttachments.go
- step_ViewCSS.go
- step_ViewFeed.go
- step_ViewHTML.go
- step_ViewJSONLD.go
- step_WebSub.go
- step_WithAttachment.go
- step_WithChildren.go
- step_WithDraft.go
- step_WithFolder.go
- step_WithFollower.go
- step_WithFollowing.go
- step_WithMessage.go
- step_WithNextSibling.go
- step_WithParent.go
- step_WithPrevSibling.go
- step_WithResponse.go
- step_WithRule.go
- utilities.go