rcs_server

package
v0.0.0-...-9835270 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: AGPL-3.0, Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDatabase

func NewDatabase(driver, createAddr, address, underlying, topic string, useAsync bool) (interface{}, error)

Types

type Database

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

func (*Database) DeleteFriendshipByRoomID

func (d *Database) DeleteFriendshipByRoomID(
	ctx context.Context, roomID string,
) error

func (*Database) GetFriendshipByFcIDAndToFcID

func (d *Database) GetFriendshipByFcIDAndToFcID(
	ctx context.Context, fcID, toFcID string,
) (*types.RCSFriendship, error)

func (*Database) GetFriendshipByFcIDOrToFcID

func (d *Database) GetFriendshipByFcIDOrToFcID(
	ctx context.Context, fcID, toFcID string,
) (*external.GetFriendshipResponse, error)

func (*Database) GetFriendshipByRoomID

func (d *Database) GetFriendshipByRoomID(
	ctx context.Context, roomID string,
) (*types.RCSFriendship, error)

func (*Database) GetFriendshipsByFcIDOrToFcID

func (d *Database) GetFriendshipsByFcIDOrToFcID(
	ctx context.Context, userID string,
) ([]external.Friendship, error)

func (*Database) GetFriendshipsByFcIDOrToFcIDWithBot

func (d *Database) GetFriendshipsByFcIDOrToFcIDWithBot(
	ctx context.Context, userID string,
) ([]external.Friendship, error)

func (*Database) InsertFriendship

func (d *Database) InsertFriendship(
	ctx context.Context, ID, roomID, fcID, toFcID, fcIDState, toFcIDState string,
	fcIDIsBot, toFcIDIsBot bool, fcIDRemark, toFcIDRemark string,
	fcIDOnceJoined, toFcIDOnceJoined bool, fcIDDomain, toFcIDDomain, eventID string,
) error

func (*Database) NotFound

func (d *Database) NotFound(err error) bool

func (*Database) SetGauge

func (d *Database) SetGauge(gauge mon.LabeledGauge)

func (*Database) SetIDGenerator

func (d *Database) SetIDGenerator(idg *uid.UidGenerator)

func (*Database) UpdateFriendshipByRoomID

func (d *Database) UpdateFriendshipByRoomID(
	ctx context.Context, ID, roomID, fcID, toFcID, fcIDState, toFcIDState string,
	fcIDIsBot, toFcIDIsBot bool, fcIDRemark, toFcIDRemark string,
	fcIDOnceJoined, toFcIDOnceJoined bool, fcIDDomain, toFcIDDomain, eventID string,
) error

Jump to

Keyboard shortcuts

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