api

package
v0.0.0-...-2562752 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2018 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertBytesToMap

func ConvertBytesToMap(input []byte) (map[string]interface{}, error)

ConvertBytesToMap converts byte array into map interface.

func ConvertInterfaceToJSONBytes

func ConvertInterfaceToJSONBytes(input interface{}, inputError error) []byte

ConvertInterfaceToJSONBytes converts any interface to json bytes.

Types

type GetSamplesAPI

type GetSamplesAPI interface {
	HanldeWebSocket(context *gin.Context)
	HandleMessage(conn *websocket.Conn, messageType int, messageBytes []byte)
}

GetSamplesAPI is the interface for GetSamplesAPI.

type GetSamplesAPIImpl

type GetSamplesAPIImpl struct {
	Interactor core.GetSamplesInteractor
}

GetSamplesAPIImpl is the implementation of GetSamplesAPI interface.

func (GetSamplesAPIImpl) GetUgrader

func (api GetSamplesAPIImpl) GetUgrader() websocket.Upgrader

GetUgrader .

func (GetSamplesAPIImpl) HandleMessage

func (api GetSamplesAPIImpl) HandleMessage(conn *websocket.Conn, messageType int, messageBytes []byte)

HandleMessage handles message from client.

func (GetSamplesAPIImpl) HanldeWebSocket

func (api GetSamplesAPIImpl) HanldeWebSocket(context *gin.Context)

HanldeWebSocket handles websocket connection.

Jump to

Keyboard shortcuts

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