Documentation ¶
Overview ¶
Package Step encapsulates the DATA required for each pipeline step in the builder. This package does not contain any building functions (that's in /build) but these objects know how to parse and "compile" raw data into the arguments required to execute each step.
Index ¶
- func FuncMap() template.FuncMap
- type AddModelObject
- type AddStream
- type AsConfirmation
- type AsModal
- type AsTooltip
- type Delete
- type DeleteAttachments
- type Do
- type EditConnection
- type EditContent
- type EditModelObject
- type EditWidget
- type ForwardTo
- type Halt
- type IfCondition
- type InlineError
- type InlineSuccess
- type ProcessContent
- type Publish
- type RedirectTo
- type RefreshPage
- type ReloadPage
- type RemoveEvent
- type Save
- type SendEmail
- type ServerRedirect
- type SetData
- type SetHeader
- type SetQueryParam
- type SetRenderData
- type SetResponse
- type SetSimpleSharing
- type SetState
- type SetThumbnail
- type Sort
- type SortAttachments
- type SortWidgets
- type Step
- type StreamPromoteDraft
- type TableEditor
- type TriggerEvent
- type UnPublish
- type UploadAttachment
- type ViewFeed
- type ViewHTML
- type ViewJSONLD
- type WebSub
- type WithChildren
- type WithDraft
- type WithFolder
- type WithFollower
- type WithFollowing
- type WithMessage
- type WithNextSibling
- type WithParent
- type WithPrevSibling
- type WithResponse
- type WithRule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AddModelObject ¶
AddModelObject is an action that can add new model objects of any type
func NewAddModelObject ¶
func NewAddModelObject(stepInfo mapof.Any) (AddModelObject, error)
NewAddModelObject returns a fully initialized AddModelObject record
func (AddModelObject) AmStep ¶
func (step AddModelObject) AmStep()
AmStep is here only to verify that this struct is a build pipeline step
type AddStream ¶ added in v0.6.0
type AddStream struct { Style string // Style of input widget to use. Options are: "chooser", "modal", 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 }
AddStream is an action that can add new sub-streams to the domain.
Uses: Display a pop-up to choose a template and create a new stream Embed a custom "create" widget into the current page - possibly selecting between multiple templates Create a new stream using a specific template as a part of a larger pipeline
func NewAddStream ¶ added in v0.6.0
NewAddStream returns a fully initialized AddStream record
type AsConfirmation ¶
AsConfirmation displays a confirmation dialog on GET, giving users an option to continue or not
func NewAsConfirmation ¶
func NewAsConfirmation(stepInfo mapof.Any) (AsConfirmation, error)
NewAsConfirmation returns a fully initialized AsConfirmation object
func (AsConfirmation) AmStep ¶
func (step AsConfirmation) AmStep()
AmStep is here only to verify that this struct is a build pipeline step
type AsModal ¶
AsModal represents an action-step that can update the data.DataMap custom data stored in a Stream
func NewAsModal ¶
NewAsModal returns a fully initialized AsModal object
type AsTooltip ¶ added in v0.6.0
type AsTooltip struct {
SubSteps []Step
}
AsTooltip represents an action-step that can update the data.DataMap custom data stored in a Stream
func NewAsTooltip ¶ added in v0.6.0
NewAsTooltip returns a fully initialized AsTooltip object
type Delete ¶
Delete represents an action-step that can delete a Stream from the Domain
type DeleteAttachments ¶
type DeleteAttachments struct {
All bool
}
DeleteAttachments represents an action that can upload attachments. It can only be used on a StreamBuilder
func NewDeleteAttachments ¶
func NewDeleteAttachments(stepInfo mapof.Any) (DeleteAttachments, error)
NewDeleteAttachments returns a fully parsed DeleteAttachments object
func (DeleteAttachments) AmStep ¶
func (step DeleteAttachments) AmStep()
AmStep is here only to verify that this struct is a build pipeline step
type Do ¶ added in v0.6.0
type Do struct {
Action string
}
Do represents an action-step that calls anoter action to continue processing
type EditConnection ¶
type EditConnection struct{}
EditConnection contains the configuration data for a modal that lets administrators manage connections to external servers.
func NewEditConnection ¶
func NewEditConnection(stepInfo mapof.Any) (EditConnection, error)
func (EditConnection) AmStep ¶
func (step EditConnection) AmStep()
AmStep is here only to verify that this struct is a build pipeline step
type EditContent ¶
EditContent represents an action-step that can edit/update Container in a streamDraft.
func NewEditContent ¶
func NewEditContent(stepInfo mapof.Any) (EditContent, error)
func (EditContent) AmStep ¶
func (step EditContent) AmStep()
AmStep is here only to verify that this struct is a build pipeline step
type EditModelObject ¶
EditModelObject is an action that can add new sub-streams to the domain.
func NewEditModelObject ¶
func NewEditModelObject(stepInfo mapof.Any) (EditModelObject, error)
NewEditModelObject returns a fully initialized EditModelObject record
func (EditModelObject) AmStep ¶
func (step EditModelObject) AmStep()
AmStep is here only to verify that this struct is a build pipeline step
type EditWidget ¶ added in v0.6.0
type EditWidget struct{}
EditWidget represents an action-step that locates an existing widget and creates a builder for it.
func NewEditWidget ¶ added in v0.6.0
func NewEditWidget(stepInfo mapof.Any) (EditWidget, error)
NewEditWidget returns a fully initialized EditWidget object
func (EditWidget) AmStep ¶ added in v0.6.0
func (step EditWidget) AmStep()
AmStep is here only to verify that this struct is a build pipeline step
type ForwardTo ¶
ForwardTo represents an action-step that forwards the user to a new page.
func NewForwardTo ¶
NewForwardTo returns a fully initialized ForwardTo object
type Halt ¶ added in v0.6.0
type Halt struct{}
Halt represents an action-step that can update the data.DataMap custom data stored in a Stream
type IfCondition ¶
IfCondition represents an action-step that can update the data.DataMap custom data stored in a Stream
func NewIfCondition ¶
func NewIfCondition(stepInfo mapof.Any) (IfCondition, error)
func (IfCondition) AmStep ¶
func (step IfCondition) AmStep()
AmStep is here only to verify that this struct is a build pipeline step
type InlineError ¶ added in v0.6.0
InlineError represents an action-step that displays an "inline failure" message on a form
func NewInlineError ¶ added in v0.6.0
func NewInlineError(stepInfo mapof.Any) (InlineError, error)
func (InlineError) AmStep ¶ added in v0.6.0
func (step InlineError) AmStep()
AmStep is here only to verify that this struct is a build pipeline step
type InlineSuccess ¶ added in v0.6.0
InlineSuccess represents an action-step that displays an "inline success" message on a form
func NewInlineSuccess ¶ added in v0.6.0
func NewInlineSuccess(stepInfo mapof.Any) (InlineSuccess, error)
func (InlineSuccess) AmStep ¶ added in v0.6.0
func (step InlineSuccess) AmStep()
AmStep is here only to verify that this struct is a build pipeline step
type ProcessContent ¶ added in v0.6.0
ProcessContent is an action that can add new sub-streams to the domain.
func NewProcessContent ¶ added in v0.6.0
func NewProcessContent(stepInfo mapof.Any) (ProcessContent, error)
NewProcessContent returns a fully initialized ProcessContent record
func (ProcessContent) AmStep ¶ added in v0.6.0
func (step ProcessContent) AmStep()
AmStep is here to verify that this struct is a build pipeline step
type Publish ¶
type Publish struct{}
Publish represents an action-step that can update a stream's PublishDate with the current time.
func NewPublish ¶
NewPublish returns a fully initialized Publish object
type RedirectTo ¶
RedirectTo represents an action-step that forwards the user to a new page.
func NewRedirectTo ¶
func NewRedirectTo(stepInfo mapof.Any) (RedirectTo, error)
NewRedirectTo returns a fully initialized RedirectTo object
func (RedirectTo) AmStep ¶
func (step RedirectTo) AmStep()
AmStep is here only to verify that this struct is a build pipeline step
type RefreshPage ¶
type RefreshPage struct{}
RefreshPage represents an pipeline-step that forwards the user to a new page.
func NewRefreshPage ¶
func NewRefreshPage(stepInfo mapof.Any) (RefreshPage, error)
NewRefreshPage returns a fully initialized RefreshPage object
func (RefreshPage) AmStep ¶
func (step RefreshPage) AmStep()
AmStep is here only to verify that this struct is a build pipeline step
type ReloadPage ¶
type ReloadPage struct{}
ReloadPage represents an pipeline-step that forwards the user to a new page.
func NewReloadPage ¶
func NewReloadPage(stepInfo mapof.Any) (ReloadPage, error)
NewReloadPage returns a fully initialized ReloadPage object
func (ReloadPage) AmStep ¶
func (step ReloadPage) AmStep()
AmStep is here only to verify that this struct is a build pipeline step
type RemoveEvent ¶ added in v0.6.0
type RemoveEvent struct {
Event string
}
RemoveEvent represents an action-step that removes an HX-Trigger event from the HTTP result
func NewRemoveEvent ¶ added in v0.6.0
func NewRemoveEvent(stepInfo mapof.Any) (RemoveEvent, error)
NewRemoveEvent returns a fully initialized RemoveEvent object
func (RemoveEvent) AmStep ¶ added in v0.6.0
func (step RemoveEvent) AmStep()
AmStep is here only to verify that this struct is a build pipeline step
type Save ¶
Save represents an action-step that can save changes to any object
type SendEmail ¶ added in v0.6.0
type SendEmail struct {
Email string
}
SendEmail represents an action-step that can send a named email to a user
func NewSendEmail ¶ added in v0.6.0
NewSendEmail returns a fully initialized SendEmail object
type ServerRedirect ¶
ServerRedirect represents an action-step that forwards the user to a new page.
func NewServerRedirect ¶
func NewServerRedirect(stepInfo mapof.Any) (ServerRedirect, error)
NewServerRedirect returns a fully initialized ServerRedirect object
func (ServerRedirect) AmStep ¶
func (step ServerRedirect) AmStep()
AmStep is here only to verify that this struct is a build pipeline step
type SetData ¶
type SetData 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. }
SetData represents an action-step that can update the custom data stored in a Stream
func NewSetData ¶
NewSetData returns a fully initialized SetData object
type SetHeader ¶
SetHeader represents an action-step that can update the custom data stored in a Stream
func NewSetHeader ¶
NewSetHeader returns a fully initialized SetHeader object
type SetQueryParam ¶
SetQueryParam represents an action-step that forwards the user to a new page.
func NewSetQueryParam ¶
func NewSetQueryParam(stepInfo mapof.Any) (SetQueryParam, error)
NewSetQueryParam returns a fully initialized SetQueryParam object
func (SetQueryParam) AmStep ¶
func (step SetQueryParam) AmStep()
AmStep is here only to verify that this struct is a build pipeline step
type SetRenderData ¶ added in v0.6.0
type SetRenderData struct {
Values map[string]*template.Template // values to set directly into the object
}
SetRenderData represents an action-step that can update the custom data stored in a builder
func NewSetRenderData ¶ added in v0.6.0
func NewSetRenderData(stepInfo mapof.Any) (SetRenderData, error)
NewSetRenderData returns a fully initialized SetRenderData object
func (SetRenderData) AmStep ¶ added in v0.6.0
func (step SetRenderData) AmStep()
AmStep is here only to verify that this struct is a build pipeline step
type SetResponse ¶ added in v0.6.0
type SetResponse struct{}
SetResponse represents an action-step that can create/update a response to the current model object
func NewSetResponse ¶ added in v0.6.0
func NewSetResponse(stepInfo mapof.Any) (SetResponse, error)
NewSetResponse returns a fully initialized SetResponse object
func (SetResponse) AmStep ¶ added in v0.6.0
func (step SetResponse) AmStep()
AmStep is here only to verify that this struct is a build pipeline step
type SetSimpleSharing ¶
SetSimpleSharing represents an action that can edit a top-level folder in the Domain
func NewSetSimpleSharing ¶
func NewSetSimpleSharing(stepInfo mapof.Any) (SetSimpleSharing, error)
NewSetSimpleSharing returns a fully parsed SetSimpleSharing object
func (SetSimpleSharing) AmStep ¶
func (step SetSimpleSharing) AmStep()
AmStep is here only to verify that this struct is a build pipeline step
type SetState ¶
type SetState struct {
State string
}
SetState represents an action-step that can change a Stream's state
type SetThumbnail ¶
type SetThumbnail struct {
Path string
}
SetThumbnail represents an action-step that can update the data.DataMap custom data stored in a Stream
func NewSetThumbnail ¶
func NewSetThumbnail(stepInfo mapof.Any) (SetThumbnail, error)
func (SetThumbnail) AmStep ¶
func (step SetThumbnail) AmStep()
AmStep is here only to verify that this struct is a build pipeline step
type SortAttachments ¶
SortAttachments represents an action-step that can update multiple records at once
func NewSortAttachments ¶
func NewSortAttachments(stepInfo mapof.Any) (SortAttachments, error)
func (SortAttachments) AmStep ¶
func (step SortAttachments) AmStep()
AmStep is here only to verify that this struct is a build pipeline step
type SortWidgets ¶
type SortWidgets struct{}
SortWidgets represents an action-step that can update multiple records at once
func NewSortWidgets ¶
func NewSortWidgets(stepInfo mapof.Any) (SortWidgets, error)
func (SortWidgets) AmStep ¶
func (step SortWidgets) AmStep()
AmStep is here only to verify that this struct is a build pipeline step
type Step ¶
type Step interface {
// AmStep is a NO-OP. It is only used to validate that a struct contains "step-like" data.
AmStep()
}
Step interface is used here to bind together the structs in this package
type StreamPromoteDraft ¶
type StreamPromoteDraft struct {
StateID string
}
StreamPromoteDraft represents a pipeline-step that can copy the Container from a StreamDraft into its corresponding Stream
func NewStreamPromoteDraft ¶
func NewStreamPromoteDraft(stepInfo mapof.Any) (StreamPromoteDraft, error)
func (StreamPromoteDraft) AmStep ¶
func (step StreamPromoteDraft) AmStep()
AmStep is here only to verify that this struct is a build pipeline step
type TableEditor ¶
TableEditor is an action that can add new sub-streams to the domain.
func NewTableEditor ¶
func NewTableEditor(stepInfo mapof.Any) (TableEditor, error)
NewTableEditor returns a fully initialized TableEditor record
func (TableEditor) AmStep ¶
func (step TableEditor) AmStep()
AmStep is here to verify that this struct is a build pipeline step
type TriggerEvent ¶
TriggerEvent represents an action-step that forwards the user to a new page.
func NewTriggerEvent ¶
func NewTriggerEvent(stepInfo mapof.Any) (TriggerEvent, error)
NewTriggerEvent returns a fully initialized TriggerEvent object
func (TriggerEvent) AmStep ¶
func (step TriggerEvent) AmStep()
AmStep is here only to verify that this struct is a build pipeline step
type UnPublish ¶
type UnPublish struct {
Role string
}
UnPublish represents an action-step that can update a stream's UnPublishDate with the current time.
func NewUnPublish ¶
NewUnPublish returns a fully initialized UnPublish object
type UploadAttachment ¶
type UploadAttachment struct {
Maximum int
}
UploadAttachment represents an action that can upload attachments. It can only be used on a StreamBuilder
func NewUploadAttachment ¶
func NewUploadAttachment(stepInfo mapof.Any) (UploadAttachment, error)
NewUploadAttachment returns a fully parsed UploadAttachment object
func (UploadAttachment) AmStep ¶
func (step UploadAttachment) AmStep()
AmStep is here only to verify that this struct is a build pipeline step
type ViewFeed ¶
type ViewFeed struct { }
ViewFeed represents an action-step that can build a Stream into HTML
func NewViewFeed ¶
NewViewFeed generates a fully initialized ViewFeed step.
type ViewHTML ¶
ViewHTML represents an action-step that can build a Stream into HTML
func NewViewHTML ¶
NewViewHTML generates a fully initialized ViewHTML step.
type ViewJSONLD ¶ added in v0.6.0
type ViewJSONLD struct {
Method string
}
ViewJSONLD represents an action-step that can build a Stream into HTML
func NewViewJSONLD ¶ added in v0.6.0
func NewViewJSONLD(stepInfo mapof.Any) (ViewJSONLD, error)
NewViewJSONLD generates a fully initialized ViewJSONLD step.
func (ViewJSONLD) AmStep ¶ added in v0.6.0
func (step ViewJSONLD) AmStep()
AmStep is here only to verify that this struct is a build pipeline step
type WebSub ¶
type WebSub struct { }
WebSub represents an action-step that can build a Stream into HTML
type WithChildren ¶
type WithChildren struct {
SubSteps []Step
}
WithChildren represents an action-step that can update the data.DataMap custom data stored in a Stream
func NewWithChildren ¶
func NewWithChildren(stepInfo mapof.Any) (WithChildren, error)
NewWithChildren returns a fully initialized WithChildren object
func (WithChildren) AmStep ¶
func (step WithChildren) AmStep()
AmStep is here only to verify that this struct is a build pipeline step
type WithDraft ¶
type WithDraft struct {
SubSteps []Step
}
WithDraft represents an action-step that can update the data.DataMap custom data stored in a Stream
func NewWithDraft ¶
NewWithDraft returns a fully initialized WithDraft object
type WithFolder ¶
type WithFolder struct {
SubSteps []Step
}
WithFolder represents an action-step that can update the data.DataMap custom data stored in a Stream
func NewWithFolder ¶
func NewWithFolder(stepInfo mapof.Any) (WithFolder, error)
NewWithFolder returns a fully initialized WithFolder object
func (WithFolder) AmStep ¶
func (step WithFolder) AmStep()
AmStep is here only to verify that this struct is a build pipeline step
type WithFollower ¶
type WithFollower struct {
SubSteps []Step
}
WithFollower represents an action-step that can update the data.DataMap custom data stored in a Stream
func NewWithFollower ¶
func NewWithFollower(stepInfo mapof.Any) (WithFollower, error)
NewWithFollower returns a fully initialized WithFollower object
func (WithFollower) AmStep ¶
func (step WithFollower) AmStep()
AmStep is here only to verify that this struct is a build pipeline step
type WithFollowing ¶
type WithFollowing struct {
SubSteps []Step
}
WithFollowing represents an action-step that can update the data.DataMap custom data stored in a Stream
func NewWithFollowing ¶
func NewWithFollowing(stepInfo mapof.Any) (WithFollowing, error)
NewWithFollowing returns a fully initialized WithFollowing object
func (WithFollowing) AmStep ¶
func (step WithFollowing) AmStep()
AmStep is here only to verify that this struct is a build pipeline step
type WithMessage ¶
type WithMessage struct {
SubSteps []Step
}
WithMessage represents an action-step that can update the data.DataMap custom data stored in a Stream
func NewWithMessage ¶
func NewWithMessage(stepInfo mapof.Any) (WithMessage, error)
NewWithMessage returns a fully initialized WithMessage object
func (WithMessage) AmStep ¶
func (step WithMessage) AmStep()
AmStep is here only to verify that this struct is a build pipeline step
type WithNextSibling ¶
type WithNextSibling struct {
SubSteps []Step
}
WithNextSibling represents an action-step that can update the data.DataMap custom data stored in a Stream
func NewWithNextSibling ¶
func NewWithNextSibling(stepInfo mapof.Any) (WithNextSibling, error)
NewWithNextSibling returns a fully initialized WithNextSibling object
func (WithNextSibling) AmStep ¶
func (step WithNextSibling) AmStep()
AmStep is here only to verify that this struct is a build pipeline step
type WithParent ¶
type WithParent struct {
SubSteps []Step
}
WithParent represents an action-step that can update the data.DataMap custom data stored in a Stream
func NewWithParent ¶
func NewWithParent(stepInfo mapof.Any) (WithParent, error)
NewWithParent returns a fully initialized WithParent object
func (WithParent) AmStep ¶
func (step WithParent) AmStep()
AmStep is here only to verify that this struct is a build pipeline step
type WithPrevSibling ¶
type WithPrevSibling struct {
SubSteps []Step
}
WithPrevSibling represents an action-step that can update the data.DataMap custom data stored in a Stream
func NewWithPrevSibling ¶
func NewWithPrevSibling(stepInfo mapof.Any) (WithPrevSibling, error)
NewWithPrevSibling returns a fully initialized WithPrevSibling object
func (WithPrevSibling) AmStep ¶
func (step WithPrevSibling) AmStep()
AmStep is here only to verify that this struct is a build pipeline step
type WithResponse ¶ added in v0.6.0
type WithResponse struct {
SubSteps []Step
}
WithResponse represents an action-step that can update the data.DataMap custom data stored in a Stream
func NewWithResponse ¶ added in v0.6.0
func NewWithResponse(stepInfo mapof.Any) (WithResponse, error)
NewWithResponse returns a fully initialized WithResponse object
func (WithResponse) AmStep ¶ added in v0.6.0
func (step WithResponse) AmStep()
AmStep is here only to verify that this struct is a build pipeline step
type WithRule ¶ added in v0.6.0
type WithRule struct {
SubSteps []Step
}
WithRule represents an action-step that can update the data.DataMap custom data stored in a Stream
func NewWithRule ¶ added in v0.6.0
NewWithRule returns a fully initialized WithRule object
Source Files ¶
- addModelObject.go
- addStream.go
- asConfirmation.go
- asModal.go
- asTooltip.go
- delete.go
- deleteAttachments.go
- do.go
- editConnection.go
- editContent.go
- editModelObject.go
- editTable.go
- editWidget.go
- forwardTo.go
- functions.go
- halt.go
- ifCondition.go
- inlineError.go
- inlineSuccess.go
- processContent.go
- promoteDraft.go
- publish.go
- redirectTo.go
- refreshPage.go
- reloadPage.go
- removeEvent.go
- save.go
- sendEmail.go
- serverRedirect.go
- setData.go
- setHeader.go
- setQueryParam.go
- setRenderData.go
- setResponse.go
- setSimpleSharing.go
- setState.go
- setThumbnail.go
- sort.go
- sortAttachments.go
- sortWidgets.go
- step.go
- triggerEvent.go
- unPublish.go
- uploadAttachment.go
- viewFeed.go
- viewHTML.go
- viewJSONLD.go
- webSub.go
- withChildren.go
- withDraft.go
- withFolder.go
- withFollower.go
- withFollowing.go
- withMessage.go
- withNextSibling.go
- withParent.go
- withPrevSibling.go
- withResponse.go
- withRule.go