Documentation
¶
Index ¶
- Constants
- func ReadInput(session flows.Session, envelope *utils.TypedEnvelope) (flows.Input, error)
- type MsgInput
- func (i *MsgInput) Channel() flows.Channel
- func (i *MsgInput) CreatedOn() time.Time
- func (i *MsgInput) Default() interface{}
- func (i *MsgInput) MarshalJSON() ([]byte, error)
- func (i *MsgInput) Resolve(key string) interface{}
- func (i *MsgInput) String() string
- func (i *MsgInput) Type() string
- func (i *MsgInput) UUID() flows.InputUUID
Constants ¶
View Source
const TypeMsg string = "msg"
TypeMsg is a constant for incoming messages
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MsgInput ¶ added in v0.4.0
type MsgInput struct {
// contains filtered or unexported fields
}
MsgInput is a message which can be used as input
func NewMsgInput ¶ added in v0.4.0
func NewMsgInput(uuid flows.InputUUID, channel flows.Channel, createdOn time.Time, urn urns.URN, text string, attachments []flows.Attachment) *MsgInput
NewMsgInput creates a new user input based on a message
func ReadMsgInput ¶ added in v0.4.0
func (*MsgInput) Default ¶ added in v0.4.0
func (i *MsgInput) Default() interface{}
Default returns our default value if evaluated in a context, which in this case is the text and attachments combined
func (*MsgInput) MarshalJSON ¶ added in v0.4.0
func (*MsgInput) Resolve ¶ added in v0.4.0
Resolve resolves the passed in key to a value, returning an error if the key is unknown
func (*MsgInput) String ¶ added in v0.4.0
String returns our default value if evaluated in a context, our text in our case
Click to show internal directories.
Click to hide internal directories.