Documentation ¶
Index ¶
- Constants
- type GateClient
- func (g *GateClient) AddMobile(ctx context.Context) (list *MobileList, err error)
- func (g *GateClient) Broadcast(message []byte)
- func (g *GateClient) Close()
- func (g *GateClient) DeleteMobile(token string, ctx context.Context) (list *MobileList, err error)
- func (g *GateClient) GetMobileList(ctx context.Context) (list *MobileList, err error)
- func (g *GateClient) GetSettings() (Settings, error)
- func (g *GateClient) RegisterServer()
- func (g *GateClient) RequestFromProxy(message stream.Message, engine *gin.Engine)
- func (g *GateClient) Restart()
- func (g *GateClient) Send(command string, payload map[string]interface{}, ctx context.Context, ...) (err error)
- func (g *GateClient) SetAlexaApiEngine(engine *gin.Engine)
- func (g *GateClient) SetMobileApiEngine(engine *gin.Engine)
- func (g *GateClient) Shutdown()
- func (g *GateClient) Status() string
- func (g *GateClient) Subscribe(command string, f func(client stream.IStreamClient, msg stream.Message))
- func (g *GateClient) UnSubscribe(command string)
- func (g *GateClient) UpdateSettings(settings Settings) (err error)
- type IWsCallback
- type MobileList
- type Settings
- type StreamRequestModel
- type StreamResponseModel
- type WsClient
Constants ¶
View Source
const ( // Request ... Request = "request" // Response ... Response = "response" // StatusSuccess ... StatusSuccess = "success" // StatusError ... StatusError = "error" )
View Source
const ( // GateStatusWait ... GateStatusWait = "wait" // GateStatusConnected ... GateStatusConnected = "connected" // GateStatusNotConnected ... GateStatusNotConnected = "not connected" // GateStatusQuit ... GateStatusQuit = "quit" )
View Source
const ( // MobileGateProxy ... MobileGateProxy = string("mobile_gate_proxy") // AlexaGateProxy ... AlexaGateProxy = string("alexa_gate_proxy") )
View Source
const (
// ClientTypeServer ...
ClientTypeServer = "server"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GateClient ¶
GateClient ...
func NewGateClient ¶
func NewGateClient(adaptors *adaptors.Adaptors, graceful *graceful_service.GracefulService, metric *metrics.MetricManager) (gate *GateClient)
NewGateClient ...
func (*GateClient) AddMobile ¶
func (g *GateClient) AddMobile(ctx context.Context) (list *MobileList, err error)
AddMobile ...
func (*GateClient) Broadcast ¶ added in v0.0.15
func (g *GateClient) Broadcast(message []byte)
Broadcast ...
func (*GateClient) DeleteMobile ¶
func (g *GateClient) DeleteMobile(token string, ctx context.Context) (list *MobileList, err error)
DeleteMobile ...
func (*GateClient) GetMobileList ¶
func (g *GateClient) GetMobileList(ctx context.Context) (list *MobileList, err error)
GetMobileList ...
func (*GateClient) GetSettings ¶
func (g *GateClient) GetSettings() (Settings, error)
GetSettings ...
func (*GateClient) RegisterServer ¶ added in v0.0.13
func (g *GateClient) RegisterServer()
RegisterServer ...
func (*GateClient) RequestFromProxy ¶ added in v0.3.0
func (g *GateClient) RequestFromProxy(message stream.Message, engine *gin.Engine)
RequestFromProxy ...
func (*GateClient) Send ¶
func (g *GateClient) Send(command string, payload map[string]interface{}, ctx context.Context, f func(msg stream.Message)) (err error)
Send ...
func (*GateClient) SetAlexaApiEngine ¶ added in v0.3.0
func (g *GateClient) SetAlexaApiEngine(engine *gin.Engine)
SetAlexaApiEngine ...
func (*GateClient) SetMobileApiEngine ¶ added in v0.3.0
func (g *GateClient) SetMobileApiEngine(engine *gin.Engine)
SetMobileApiEngine ...
func (*GateClient) Subscribe ¶
func (g *GateClient) Subscribe(command string, f func(client stream.IStreamClient, msg stream.Message))
Subscribe ...
func (*GateClient) UpdateSettings ¶
func (g *GateClient) UpdateSettings(settings Settings) (err error)
UpdateSettings ...
type IWsCallback ¶
type IWsCallback interface {
// contains filtered or unexported methods
}
IWsCallback ...
type MobileList ¶
MobileList ...
type Settings ¶
type Settings struct { GateServerToken string `json:"gate_server_token"` Address string `json:"address"` Enabled bool `json:"enabled"` }
Settings ...
type StreamRequestModel ¶ added in v0.0.11
type StreamRequestModel struct { URI string `json:"uri"` Method string `json:"method"` Body []byte `json:"body"` Header http.Header `json:"header"` }
StreamRequestModel ...
type StreamResponseModel ¶ added in v0.0.11
type StreamResponseModel struct { Code int `json:"code"` Body []byte `json:"body"` Header http.Header `json:"header"` }
StreamResponseModel ...
type WsClient ¶
type WsClient struct {
// contains filtered or unexported fields
}
WsClient ...
func NewWsClient ¶
func NewWsClient(cb IWsCallback, metric *metrics.MetricManager) *WsClient
NewWsClient ...
func (*WsClient) UpdateSettings ¶ added in v0.0.23
UpdateSettings ...
Click to show internal directories.
Click to hide internal directories.