zammad

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: May 29, 2019 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

type Session struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Session keeps track of the states successfully submitted to Zammad

func NewSession

func NewSession() (*Session, context.Context)

NewSession initializes a new Session to keep track of call information sent to zammad. The result should be used as a singleton.

func (*Session) ShutdownIfEmpty added in v0.1.4

func (zs *Session) ShutdownIfEmpty()

ShutdownIfEmpty is used to short-circuit the call handling loop

func (*Session) Submit

func (zs *Session) Submit(ctx context.Context, call *innovaphone.CallInSession) error

Submit sends a call to Zammad, if we are aware of it and can correctly map its state to some known Zammad state

type State

type State int

State represents the call state from Zammad's perspective

const (
	StateNew State = iota
	StateRinging
	StateConnected
	StateDisconnected
)

Possible states for a Zammad call

func (State) MarshalJSON

func (s State) MarshalJSON() ([]byte, error)

MarshalJSON is used by expvar

func (State) String

func (s State) String() string

Jump to

Keyboard shortcuts

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