inputs

package
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2018 License: AGPL-3.0 Imports: 7 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)

Types

type MsgInput added in v0.4.0

type MsgInput struct {
	// contains filtered or unexported fields
}

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, envelope *utils.TypedEnvelope) (*MsgInput, error)

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) 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 (i *MsgInput) MarshalJSON() ([]byte, error)

func (*MsgInput) Resolve added in v0.4.0

func (i *MsgInput) Resolve(key string) interface{}

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

func (i *MsgInput) String() string

String returns our default value if evaluated in a context, our text in our case

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