repository

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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database interface {
	SelectUser(ctx context.Context, email string) (*model.User, error)
	UpsertUser(ctx context.Context, name, email, pictureUrl string, updatedAt time.Time) error

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

	SelectMessages(ctx context.Context, roomID string, lastReadAt time.Time) ([]*model.Message, error)
	InsertMessage(ctx context.Context, roomID, userID, content string, messageType model.MessageType, postedAt time.Time) error
	IsUserInRoom(ctx context.Context, userID, roomID string) (bool, error)
}

interface for database operations.

type Firebase

type Firebase interface {
	VerifyIDToken(ctx context.Context, idToken string) (*auth.Token, error)
	CreateSession(ctx context.Context, idToken string) (string, error)
	VerifySessionCookie(ctx context.Context, cookie string) (*auth.Token, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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