responses

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Success = iota
	Error
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Response

type Response interface {
	// GetPayload returns the content of this Response
	GetPayload() string

	// GetNode returns the unique ID of the Asterisk system on which this Response originated
	GetNode() string

	// GetType returns the type name of this Response
	GetType() ResponseType

	//GetActionID returns the uniqueID for the response
	GetID() string

	//GetMessage returns the messages  for the response
	GetMessage() string
}

type ResponseData

type ResponseData struct {
	// ActionId of the response
	ID string `json:"actionid,omitempty"`

	// Payload indicates the content of this Response
	PayLoad string `json:"payload,omitempty"`

	// Node indicates the unique identifier of the source Asterisk box for this Response
	Node *amitools.Node

	// Timestamp indicates the time this Response was generated
	Timestamp string `json:"timestamp,omitempty"`

	// Type is the type name of this response //Success-Error
	Type ResponseType `json:"type"`

	// Message of the response
	Message string `json:"message,omitempty"`
}

func NewResponseData

func NewResponseData() *ResponseData

func (*ResponseData) GetID

func (e *ResponseData) GetID() string

func (*ResponseData) GetMessage

func (e *ResponseData) GetMessage() string

func (*ResponseData) GetNode

func (e *ResponseData) GetNode() *amitools.Node

GetNode gets the node ID of the source Asterisk instance

func (*ResponseData) GetPayload

func (e *ResponseData) GetPayload() string

func (*ResponseData) GetType

func (e *ResponseData) GetType() ResponseType

GetType gets the type of the event

type ResponseType

type ResponseType int

func (ResponseType) String

func (w ResponseType) String() string

Jump to

Keyboard shortcuts

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