Documentation ¶
Index ¶
- Constants
- func ReadInput(session flows.Session, data json.RawMessage) (flows.Input, error)
- func ReadMsgInput(session flows.Session, data json.RawMessage) (flows.Input, error)
- func RegisterType(name string, f readFunc)
- type MsgInput
- func (i *MsgInput) Channel() *flows.Channel
- func (i *MsgInput) CreatedOn() time.Time
- func (i *MsgInput) Describe() string
- func (i *MsgInput) MarshalJSON() ([]byte, error)
- func (i *MsgInput) Reduce(env utils.Environment) types.XPrimitive
- func (i *MsgInput) Resolve(env utils.Environment, key string) types.XValue
- func (i *MsgInput) ToXJSON(env utils.Environment) types.XText
- 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 ¶
func ReadMsgInput ¶ added in v0.4.0
ReadMsgInput reads a message input from the given JSON
func RegisterType ¶ added in v0.11.0
func RegisterType(name string, f readFunc)
RegisterType registers a new type of input
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(assets flows.SessionAssets, msg *flows.MsgIn, createdOn time.Time) (*MsgInput, error)
NewMsgInput creates a new user input based on a message
func (*MsgInput) Describe ¶ added in v0.10.1
Describe returns a representation of this type for error messages
func (*MsgInput) MarshalJSON ¶ added in v0.4.0
MarshalJSON marshals this msg input into JSON
func (*MsgInput) Reduce ¶ added in v0.8.0
func (i *MsgInput) Reduce(env utils.Environment) types.XPrimitive
Reduce is called when this object needs to be reduced to a primitive
func (*MsgInput) Resolve ¶ added in v0.4.0
Resolve resolves the given key when this input is referenced in an expression
func (*MsgInput) ToXJSON ¶ added in v0.8.0
func (i *MsgInput) ToXJSON(env utils.Environment) types.XText
ToXJSON is called when this type is passed to @(json(...))
Click to show internal directories.
Click to hide internal directories.