api

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpApi

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

func NewHttpApi

func NewHttpApi(io *socket.Server, channel *channels.Channel, express *express.Express, _options *options.Config) *HttpApi

Create new instance of http subscriber.

func (*HttpApi) GetChannel

func (api *HttpApi) GetChannel(w http.ResponseWriter, r *http.Request, router httprouter.Params)

Get a information about a channel.

func (*HttpApi) GetChannelUsers

func (api *HttpApi) GetChannelUsers(w http.ResponseWriter, r *http.Request, router httprouter.Params)

Get the users of a channel.

func (*HttpApi) GetChannels

func (api *HttpApi) GetChannels(w http.ResponseWriter, r *http.Request, _ httprouter.Params)

Get a list of the open channels on the server.

func (*HttpApi) GetRoot

func (api *HttpApi) GetRoot(w http.ResponseWriter, r *http.Request, router httprouter.Params)

Outputs a simple message to show that the server is running.

func (*HttpApi) GetStatus

func (api *HttpApi) GetStatus(w http.ResponseWriter, r *http.Request, router httprouter.Params)

Get the status of the server.

func (*HttpApi) Init

func (api *HttpApi) Init()

Initialize the API.

Jump to

Keyboard shortcuts

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