Documentation ¶
Index ¶
- func DefaultUserAgent() string
- type Caller
- type CloseHandler
- type ConnActiveHandler
- type ConnStateHandler
- type Event
- type EventHandler
- type Events
- type JSON
- type LogHandler
- type Objects
- type Payload
- type PropVisitor
- type Props
- func (ps *Props) Accept(callback PropVisitor) (err error)
- func (ps *Props) EncryptToJWT(key, secret string) (string, error)
- func (ps *Props) GetBool(key string) (val bool, err error)
- func (ps *Props) GetFloat(key string) (val float64, err error)
- func (ps *Props) GetInt(key string) (val int, err error)
- func (ps *Props) GetObject(key string) (ref *Props, err error)
- func (ps *Props) GetObjectArray(key string) (ref *Objects, err error)
- func (ps *Props) GetString(key string) (val string, err error)
- func (ps *Props) GetStringArray(key string) (ref *Strings, err error)
- func (ps *Props) MarshalJSON() (string, error)
- func (ps *Props) SetBool(key string, val bool)
- func (ps *Props) SetFloat(key string, val float64)
- func (ps *Props) SetInt(key string, val int)
- func (ps *Props) SetJSON(key string, ref *JSON)
- func (ps *Props) SetObject(key string, ref *Props)
- func (ps *Props) SetString(key string, val string)
- func (ps *Props) SetStringArray(key string, ref *Strings)
- func (ps *Props) String() string
- func (ps *Props) UnmarshalJSON(data string) error
- type Session
- func (s *Session) Close()
- func (s *Session) Open() (err error)
- func (s *Session) Send(params *Props, payload *Payload) (actionId int64, err error)
- func (s *Session) SetAddress(address string)
- func (s *Session) SetDisableLongPoll(disabled bool)
- func (s *Session) SetHeader(key, value string)
- func (s *Session) SetOnClose(h CloseHandler)
- func (s *Session) SetOnConnActive(h ConnActiveHandler)
- func (s *Session) SetOnConnState(h ConnStateHandler)
- func (s *Session) SetOnEvent(h EventHandler)
- func (s *Session) SetOnLog(h LogHandler)
- func (s *Session) SetOnSessionEvent(h SessionEventHandler)
- func (s *Session) SetParams(params *Props) (err error)
- type SessionEventHandler
- type Strings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultUserAgent ¶ added in v1.4.0
func DefaultUserAgent() string
Types ¶
type Caller ¶
type Caller struct {
// contains filtered or unexported fields
}
func (*Caller) SetAddress ¶
type CloseHandler ¶
type CloseHandler interface {
OnClose()
}
type ConnActiveHandler ¶
type ConnActiveHandler interface {
OnConnActive()
}
type ConnStateHandler ¶
type ConnStateHandler interface {
OnConnState(state string)
}
type Event ¶
func (*Event) GetPayload ¶
type EventHandler ¶
type LogHandler ¶
type LogHandler interface {
OnLog(msg string)
}
type Payload ¶
type Payload struct {
// contains filtered or unexported fields
}
func NewPayload ¶
func NewPayload() *Payload
type PropVisitor ¶
type Props ¶
type Props struct {
// contains filtered or unexported fields
}
func (*Props) Accept ¶
func (ps *Props) Accept(callback PropVisitor) (err error)
func (*Props) EncryptToJWT ¶ added in v1.5.0
func (*Props) GetObjectArray ¶
func (*Props) GetStringArray ¶
func (*Props) MarshalJSON ¶ added in v1.4.1
func (*Props) SetStringArray ¶
func (*Props) UnmarshalJSON ¶ added in v1.4.1
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func NewSession ¶
func NewSession() (s *Session)
func (*Session) SetAddress ¶
func (*Session) SetDisableLongPoll ¶ added in v1.5.0
func (*Session) SetOnClose ¶
func (s *Session) SetOnClose(h CloseHandler)
func (*Session) SetOnConnActive ¶
func (s *Session) SetOnConnActive(h ConnActiveHandler)
func (*Session) SetOnConnState ¶
func (s *Session) SetOnConnState(h ConnStateHandler)
func (*Session) SetOnEvent ¶
func (s *Session) SetOnEvent(h EventHandler)
func (*Session) SetOnLog ¶
func (s *Session) SetOnLog(h LogHandler)
func (*Session) SetOnSessionEvent ¶
func (s *Session) SetOnSessionEvent(h SessionEventHandler)
type SessionEventHandler ¶
type SessionEventHandler interface {
OnSessionEvent(params *Props)
}
type Strings ¶
type Strings struct {
// contains filtered or unexported fields
}
func NewStrings ¶
func NewStrings() *Strings
Click to show internal directories.
Click to hide internal directories.