service

package
v0.0.0-...-e384ca1 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chat

type Chat interface {
	Create(user *model.Chat) (string, error)
	GetAllForUser(userId string) ([]*model.Chat, error)
}

type ChatService

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

func NewChatService

func NewChatService(repo repository.Chat, userRepo repository.User) *ChatService

func (*ChatService) Create

func (s *ChatService) Create(chat *model.Chat) (string, error)

func (*ChatService) GetAllForUser

func (s *ChatService) GetAllForUser(userId string) ([]*model.Chat, error)

type Message

type Message interface {
	Create(message *model.Message) (string, error)
	GetAllForChat(chatId string) ([]*model.Message, error)
}

type MessageService

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

func NewMessageService

func NewMessageService(repo repository.Message, userRepo repository.User, chatRepo repository.Chat) *MessageService

func (*MessageService) Create

func (s *MessageService) Create(message *model.Message) (string, error)

func (*MessageService) GetAllForChat

func (s *MessageService) GetAllForChat(chatId string) ([]*model.Message, error)

type Service

type Service struct {
	User
	Chat
	Message
}

func NewService

func NewService(repos *repository.Repository) *Service

type User

type User interface {
	Create(user *model.User) (string, error)
}

type UserService

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

func NewUserService

func NewUserService(repo repository.User) *UserService

func (*UserService) Create

func (s *UserService) Create(user *model.User) (string, error)

Directories

Path Synopsis
Package mock_service is a generated GoMock package.
Package mock_service is a generated GoMock package.

Jump to

Keyboard shortcuts

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