services

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthService

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

func NewAuthService

func NewAuthService(repository authRepository) *AuthService

func (AuthService) Login

func (s AuthService) Login(userName, password string) (string, error)

Login returns token

type ChatService

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

func NewChatService

func NewChatService(repository chatRepository) *ChatService

func (ChatService) Reader

func (s ChatService) Reader(conn *websocket.Conn, userId models.UserId) error

func (ChatService) SetUser

func (s ChatService) SetUser(user models.User)

func (ChatService) Upgrader

func (s ChatService) Upgrader() websocket.Upgrader

func (ChatService) UsersInChat

func (s ChatService) UsersInChat() map[models.UserId]models.User

type UserService

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

func NewUserService

func NewUserService(repository userRepository) *UserService

func (*UserService) CreateUser

func (s *UserService) CreateUser(user models.User) (models.User, error)

CreateUser creates a new user and adds it to users

Jump to

Keyboard shortcuts

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