chat_app

package
v0.0.0-...-945c817 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2019 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start() error

Types

type Client

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

func NewClient

func NewClient(ws *websocket.Conn, server *Server) *Client

func (*Client) Conn

func (c *Client) Conn() *websocket.Conn

func (*Client) Done

func (c *Client) Done()

func (*Client) Listen

func (c *Client) Listen()

func (*Client) Write

func (c *Client) Write(msg *model.Message)

type Config

type Config struct {
	BindAddr    string
	LogLevel    string
	DatabaseURL string
	SessionKey  string
	ClientUrl   string
}

func NewConfig

func NewConfig() *Config

type Server

type Server struct {
	MesUcase  message.Usecase
	ChatUcase chat.Usecase
	// contains filtered or unexported fields
}

func NewServer

func NewServer(pattern string, mUcase message.Usecase, chUcase chat.Usecase) *Server

func (*Server) Add

func (s *Server) Add(c *Client)

func (*Server) Del

func (s *Server) Del(c *Client)

func (*Server) Done

func (s *Server) Done()

func (*Server) Err

func (s *Server) Err(err error)

func (*Server) Listen

func (s *Server) Listen()

func (*Server) SendAll

func (s *Server) SendAll(msg *model2.Message)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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