firebase

package
v0.0.0-...-916f8e4 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MessageRef     = "messages"
	UserIDMapRef   = "userid_username_map"
	UsernameMapRef = "username_userid_map"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type RealtimeDatabase

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

func NewRealtimeDatabase

func NewRealtimeDatabase(cfg config.Firebase) (*RealtimeDatabase, error)

func (*RealtimeDatabase) GetAllMessages

func (db *RealtimeDatabase) GetAllMessages() ([]entity.Message, error)

func (*RealtimeDatabase) GetMessageByUserID

func (db *RealtimeDatabase) GetMessageByUserID(userID string) ([]entity.Message, error)

func (*RealtimeDatabase) GetMessageByUsername

func (db *RealtimeDatabase) GetMessageByUsername(username string) ([]entity.Message, error)

func (*RealtimeDatabase) SaveMessage

func (db *RealtimeDatabase) SaveMessage(sender entity.User, message entity.Message) error

Jump to

Keyboard shortcuts

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