ninchat-go: github.com/ninchat/ninchat-go/mobile Index | Files

package client

import "github.com/ninchat/ninchat-go/mobile"

Index

Package Files

client.go

type Caller Uses

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

func NewCaller Uses

func NewCaller() *Caller

func (*Caller) Call Uses

func (c *Caller) Call(params *Props, payload *Payload) (events *Events, err error)

func (*Caller) SetAddress Uses

func (c *Caller) SetAddress(address string)

type CloseHandler Uses

type CloseHandler interface {
    OnClose()
}

type ConnActiveHandler Uses

type ConnActiveHandler interface {
    OnConnActive()
}

type ConnStateHandler Uses

type ConnStateHandler interface {
    OnConnState(state string)
}

type Event Uses

type Event ninchat.Event

func (*Event) GetParams Uses

func (e *Event) GetParams() *Props

func (*Event) GetPayload Uses

func (e *Event) GetPayload() *Payload

func (*Event) String Uses

func (e *Event) String() string

type EventHandler Uses

type EventHandler interface {
    OnEvent(params *Props, payload *Payload, lastReply bool)
}

type Events Uses

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

func (*Events) Get Uses

func (es *Events) Get(i int) *Event

func (*Events) Length Uses

func (es *Events) Length() int

func (*Events) String Uses

func (es *Events) String() string

type JSON Uses

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

func NewJSON Uses

func NewJSON(s string) *JSON

type LogHandler Uses

type LogHandler interface {
    OnLog(msg string)
}

type Objects Uses

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

func (*Objects) Get Uses

func (os *Objects) Get(i int) *Props

func (*Objects) Length Uses

func (os *Objects) Length() int

func (*Objects) String Uses

func (os *Objects) String() string

type Payload Uses

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

func NewPayload Uses

func NewPayload() *Payload

func (*Payload) Append Uses

func (p *Payload) Append(blob []byte)

func (*Payload) Get Uses

func (p *Payload) Get(i int) []byte

func (*Payload) Length Uses

func (p *Payload) Length() int

func (*Payload) String Uses

func (p *Payload) String() string

type PropVisitor Uses

type PropVisitor interface {
    VisitBool(string, bool) error
    VisitNumber(string, float64) error
    VisitString(string, string) error
    VisitStringArray(string, *Strings) error
    VisitObject(string, *Props) error
    VisitObjectArray(string, *Objects) error
}

type Props Uses

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

func NewProps Uses

func NewProps() *Props

func (*Props) Accept Uses

func (ps *Props) Accept(callback PropVisitor) (err error)

func (*Props) GetBool Uses

func (ps *Props) GetBool(key string) (val bool, err error)

func (*Props) GetFloat Uses

func (ps *Props) GetFloat(key string) (val float64, err error)

func (*Props) GetInt Uses

func (ps *Props) GetInt(key string) (val int, err error)

func (*Props) GetObject Uses

func (ps *Props) GetObject(key string) (ref *Props, err error)

func (*Props) GetObjectArray Uses

func (ps *Props) GetObjectArray(key string) (ref *Objects, err error)

func (*Props) GetString Uses

func (ps *Props) GetString(key string) (val string, err error)

func (*Props) GetStringArray Uses

func (ps *Props) GetStringArray(key string) (ref *Strings, err error)

func (*Props) SetBool Uses

func (ps *Props) SetBool(key string, val bool)

func (*Props) SetFloat Uses

func (ps *Props) SetFloat(key string, val float64)

func (*Props) SetInt Uses

func (ps *Props) SetInt(key string, val int)

func (*Props) SetJSON Uses

func (ps *Props) SetJSON(key string, ref *JSON)

func (*Props) SetObject Uses

func (ps *Props) SetObject(key string, ref *Props)

func (*Props) SetString Uses

func (ps *Props) SetString(key string, val string)

func (*Props) SetStringArray Uses

func (ps *Props) SetStringArray(key string, ref *Strings)

func (*Props) String Uses

func (ps *Props) String() string

type Session Uses

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

func NewSession Uses

func NewSession() (s *Session)

func (*Session) Close Uses

func (s *Session) Close()

func (*Session) Open Uses

func (s *Session) Open() (err error)

func (*Session) Send Uses

func (s *Session) Send(params *Props, payload *Payload) (actionId int64, err error)

func (*Session) SetAddress Uses

func (s *Session) SetAddress(address string)

func (*Session) SetOnClose Uses

func (s *Session) SetOnClose(h CloseHandler)

func (*Session) SetOnConnActive Uses

func (s *Session) SetOnConnActive(h ConnActiveHandler)

func (*Session) SetOnConnState Uses

func (s *Session) SetOnConnState(h ConnStateHandler)

func (*Session) SetOnEvent Uses

func (s *Session) SetOnEvent(h EventHandler)

func (*Session) SetOnLog Uses

func (s *Session) SetOnLog(h LogHandler)

func (*Session) SetOnSessionEvent Uses

func (s *Session) SetOnSessionEvent(h SessionEventHandler)

func (*Session) SetParams Uses

func (s *Session) SetParams(params *Props) (err error)

type SessionEventHandler Uses

type SessionEventHandler interface {
    OnSessionEvent(params *Props)
}

type Strings Uses

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

func NewStrings Uses

func NewStrings() *Strings

func (*Strings) Append Uses

func (ss *Strings) Append(val string)

func (*Strings) Get Uses

func (ss *Strings) Get(i int) string

func (*Strings) Length Uses

func (ss *Strings) Length() int

func (*Strings) String Uses

func (ss *Strings) String() string

Package client imports 6 packages (graph). Updated 2019-05-06. Refresh now. Tools for package owners.