chat

package
v0.0.0-...-8c28d06 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

API represents websocket api service

func New

func New(m *mux.Router, store Store, l Limiter, authMW mux.MiddlewareFunc) *API

New creates new websocket api

type Limiter

type Limiter interface {
	Exceeds(string, goch.Limit) error
	ExceedsAny(map[string]goch.Limit) error
}

Limiter represents chat service limit checker

type Store

type Store interface {
	Save(*goch.Chat) error
	Get(string) (*goch.Chat, error)
	ListChannels() ([]string, error)
	GetUnreadCount(string, string) uint64
}

Store represents chat store interface

Jump to

Keyboard shortcuts

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