inputs

package
v0.10.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 31, 2018 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const TypeMsg string = "msg"

TypeMsg is a constant for incoming messages

Variables

This section is empty.

Functions

func ReadInput added in v0.4.0

func ReadInput(session flows.Session, envelope *utils.TypedEnvelope) (flows.Input, error)

ReadInput reads an input from the given typed envelope

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 ReadMsgInput(session flows.Session, data json.RawMessage) (*MsgInput, error)

ReadMsgInput reads a message input from the given JSON

func (*MsgInput) Channel added in v0.4.0

func (i *MsgInput) Channel() flows.Channel

func (*MsgInput) CreatedOn added in v0.4.0

func (i *MsgInput) CreatedOn() time.Time

func (*MsgInput) Describe added in v0.10.1

func (i *MsgInput) Describe() string

Describe returns a representation of this type for error messages

func (*MsgInput) MarshalJSON added in v0.4.0

func (i *MsgInput) MarshalJSON() ([]byte, error)

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

func (i *MsgInput) Resolve(env utils.Environment, key string) types.XValue

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(...))

func (*MsgInput) Type added in v0.4.0

func (i *MsgInput) Type() string

Type returns the type of this event

func (*MsgInput) UUID added in v0.4.0

func (i *MsgInput) UUID() flows.InputUUID

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL