httpapi

package
v0.0.0-...-407fbd6 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ChannelHub map[string]*Hub

Functions

func ChannelCreateChatHandler

func ChannelCreateChatHandler(w http.ResponseWriter, r *http.Request)

func CreateChannelHandler

func CreateChannelHandler(w http.ResponseWriter, r *http.Request)

func DetailChannelHandler

func DetailChannelHandler(w http.ResponseWriter, r *http.Request)

func JSONView

func JSONView(w http.ResponseWriter, data interface{}, statusCode int)

func ListenChannelHandler

func ListenChannelHandler(w http.ResponseWriter, r *http.Request)

func LoginHandler

func LoginHandler(w http.ResponseWriter, r *http.Request)

func SearchChannelHandler

func SearchChannelHandler(w http.ResponseWriter, r *http.Request)

func Serve

func Serve()

func VerifyLoginHandler

func VerifyLoginHandler(w http.ResponseWriter, r *http.Request)

Types

type Client

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

Client is a middleman between the websocket connection and the hub.

type FileSystem

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

FileSystem custom file system handler

func (FileSystem) Open

func (fs FileSystem) Open(path string) (http.File, error)

Open opens file

type Hub

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

Hub maintains the set of active clients and broadcasts messages to the clients.

Jump to

Keyboard shortcuts

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