usecase

package
v0.0.0-...-9d3578c Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Usecase

type Usecase interface {
	GetUser(ctx context.Context, email string) (*model.User, error)
	VerifyIDToken(ctx context.Context, token string) error
	PostLogin(ctx context.Context, token string) (string, error)
	VerifySessionCookie(ctx context.Context, session string) (*auth.Token, error)

	GetRoomUsers(ctx context.Context, roomID string) ([]*response.RoomUser, error)

	GetMessages(ctx context.Context, roomID string, lastReadAt time.Time) ([]*response.Message, error)
	PostMessage(ctx context.Context, roomID, userID, content string, messageType model.MessageType, postedAt time.Time) error
	SubscribeMessages(ctx context.Context, conn *net.Conn, email string) error
}

func New

func New(database repository.Database, firebase repository.Firebase,
	logger logger.Logger) Usecase

Jump to

Keyboard shortcuts

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