waits

package
v0.134.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2021 License: AGPL-3.0 Imports: 10 Imported by: 3

Documentation

Index

Constants

View Source
const TypeDial string = "dial"

TypeDial is the type of our dial wait

View Source
const TypeMsg string = "msg"

TypeMsg is the type of our message wait

Variables

This section is empty.

Functions

func ReadActivatedWait added in v0.33.0

func ReadActivatedWait(data json.RawMessage) (flows.ActivatedWait, error)

ReadActivatedWait reads an activated wait from the given JSON

func ReadWait

func ReadWait(data json.RawMessage) (flows.Wait, error)

ReadWait reads a wait from the given JSON

Types

type ActivatedDialWait added in v0.112.0

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

func NewActivatedDialWait added in v0.112.0

func NewActivatedDialWait(urn urns.URN) *ActivatedDialWait

func (*ActivatedDialWait) MarshalJSON added in v0.112.0

func (w *ActivatedDialWait) MarshalJSON() ([]byte, error)

MarshalJSON marshals this wait into JSON

func (*ActivatedDialWait) TimeoutSeconds added in v0.112.0

func (w *ActivatedDialWait) TimeoutSeconds() *int

func (*ActivatedDialWait) Type added in v0.112.0

func (w *ActivatedDialWait) Type() string

func (*ActivatedDialWait) URN added in v0.112.2

func (w *ActivatedDialWait) URN() urns.URN

type ActivatedMsgWait added in v0.33.0

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

func NewActivatedMsgWait added in v0.33.2

func NewActivatedMsgWait(timeoutSeconds *int, hint flows.Hint) *ActivatedMsgWait

func (*ActivatedMsgWait) Hint added in v0.33.0

func (w *ActivatedMsgWait) Hint() flows.Hint

Hint returns the hint (optional)

func (*ActivatedMsgWait) MarshalJSON added in v0.33.0

func (w *ActivatedMsgWait) MarshalJSON() ([]byte, error)

MarshalJSON marshals this wait into JSON

func (*ActivatedMsgWait) TimeoutSeconds added in v0.33.1

func (w *ActivatedMsgWait) TimeoutSeconds() *int

func (*ActivatedMsgWait) Type added in v0.33.0

func (w *ActivatedMsgWait) Type() string

type DialWait added in v0.112.0

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

DialWait is a wait which waits for a phone number to be dialed

func NewDialWait added in v0.112.0

func NewDialWait(phone string) *DialWait

NewDialWait creates a new Dial wait

func (*DialWait) AllowedFlowTypes added in v0.112.0

func (w *DialWait) AllowedFlowTypes() []flows.FlowType

AllowedFlowTypes returns the flow types which this wait is allowed to occur in

func (*DialWait) Begin added in v0.112.0

Begin beings waiting at this wait

func (*DialWait) End added in v0.112.0

func (w *DialWait) End(resume flows.Resume) error

End ends this wait or returns an error

func (*DialWait) MarshalJSON added in v0.112.0

func (w *DialWait) MarshalJSON() ([]byte, error)

MarshalJSON marshals this wait into JSON

func (*DialWait) Timeout added in v0.112.0

func (w *DialWait) Timeout() flows.Timeout

Timeout returns the timeout of this wait or nil if no timeout is set

func (*DialWait) Type added in v0.112.0

func (w *DialWait) Type() string

Type returns the type of this wait

type MsgWait

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

MsgWait is a wait which waits for an incoming message (i.e. a msg_received event)

func NewMsgWait

func NewMsgWait(timeout *Timeout, hint flows.Hint) *MsgWait

NewMsgWait creates a new message wait

func (*MsgWait) AllowedFlowTypes added in v0.107.0

func (w *MsgWait) AllowedFlowTypes() []flows.FlowType

AllowedFlowTypes returns the flow types which this wait is allowed to occur in

func (*MsgWait) Begin

Begin beings waiting at this wait

func (*MsgWait) End

func (w *MsgWait) End(resume flows.Resume) error

End ends this wait or returns an error

func (*MsgWait) Hint

func (w *MsgWait) Hint() flows.Hint

Hint returns the hint (optional)

func (*MsgWait) MarshalJSON

func (w *MsgWait) MarshalJSON() ([]byte, error)

MarshalJSON marshals this wait into JSON

func (*MsgWait) Timeout

func (w *MsgWait) Timeout() flows.Timeout

Timeout returns the timeout of this wait or nil if no timeout is set

func (*MsgWait) Type

func (w *MsgWait) Type() string

Type returns the type of this wait

type Timeout added in v0.33.0

type Timeout struct {
	Seconds_      int                `json:"seconds"       validate:"required"`
	CategoryUUID_ flows.CategoryUUID `json:"category_uuid" validate:"required,uuid4"`
}

func NewTimeout added in v0.33.0

func NewTimeout(seconds int, categoryUUID flows.CategoryUUID) *Timeout

func (*Timeout) CategoryUUID added in v0.33.0

func (t *Timeout) CategoryUUID() flows.CategoryUUID

func (*Timeout) Seconds added in v0.33.0

func (t *Timeout) Seconds() int

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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