service

package
v0.0.0-...-7acbcea Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth interface {
	SignUp(ctx context.Context, dto models.UserSingUpDTO) (int, string, string, error)
	SignIn(ctx context.Context, dto models.UserSignInDTO) (int, string, string, error)
	Refresh(ctx context.Context, id int, token string) (string, string, error)
}

type AuthService

type AuthService struct {
	logger.Logger
	repository.Auth
	// contains filtered or unexported fields
}

func NewAuthService

func NewAuthService(logger logger.Logger, auth repository.Auth, accessConverter *fst.EncodedConverter,
	refreshConverter *fst.EncodedConverter) *AuthService

func (*AuthService) Refresh

func (a *AuthService) Refresh(ctx context.Context, id int, token string) (string, string, error)

func (*AuthService) SignIn

func (*AuthService) SignUp

type Chat

type Chat interface {
	CreateChat(ctx context.Context, id int, dto models.ChatCreateDTO) (int, error)
	AddMembers(ctx context.Context, id int, dto models.ChatAddMemberDTO) error
	RemoveMembers(ctx context.Context, id int, dto models.ChatRemoveMemberDTO) error
}

type ChatService

type ChatService struct {
	logger.Logger
	repository.Chat
	// contains filtered or unexported fields
}

func NewChatService

func NewChatService(logger logger.Logger, chat repository.Chat,
	accessConverter *fst.EncodedConverter, refreshConverter *fst.EncodedConverter) *ChatService

func (*ChatService) AddMembers

func (c *ChatService) AddMembers(ctx context.Context, id int, dto models.ChatAddMemberDTO) error

func (*ChatService) CreateChat

func (c *ChatService) CreateChat(ctx context.Context, id int, dto models.ChatCreateDTO) (int, error)

func (*ChatService) RemoveMembers

func (c *ChatService) RemoveMembers(ctx context.Context, id int, dto models.ChatRemoveMemberDTO) error

type Message

type Message interface {
}

type Service

type Service struct {
	Auth
	User
	Message
	Chat
}

func NewService

func NewService(logger logger.Logger, repository *repository.Repository,
	accessConverter *fst.EncodedConverter, refreshConverter *fst.EncodedConverter) *Service

type User

type User interface {
}

Jump to

Keyboard shortcuts

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