legacymigrate

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Migrate

func Migrate(ctx context.Context, targetDB *database.Database, sourceDialect, sourceURI string)

Types

type Insertable

type Insertable interface {
	Insert(context.Context) error
}

type LegacyMessage

type LegacyMessage struct {
	FBID       string
	FBTxnID    sql.NullInt64
	Index      int
	FBChat     int64
	FBReceiver int64
	FBSender   int64
	Timestamp  int64
	MXID       id.EventID
	MXRoom     id.RoomID
}

func (*LegacyMessage) ToNew

type LegacyPortal

type LegacyPortal struct {
	FBID       int64
	FBReceiver int64
	FBType     string
	MXID       sql.NullString
	Name       sql.NullString
	PhotoID    sql.NullString
	AvatarURL  sql.NullString
	Encrypted  bool
	NameSet    bool
	AvatarSet  bool
}

func (*LegacyPortal) ToNew

func (lp *LegacyPortal) ToNew(db *database.Database) *database.Portal

type LegacyPuppet

type LegacyPuppet struct {
	FBID      int64
	Name      sql.NullString
	PhotoID   sql.NullString
	PhotoMXC  sql.NullString
	NameSet   bool
	AvatarSet bool
}

func (*LegacyPuppet) ToNew

func (lp *LegacyPuppet) ToNew(db *database.Database) *database.Puppet

type LegacyReaction

type LegacyReaction struct {
	FBMsgID    string
	FBThreadID int64
	FBReceiver int64
	FBSender   int64
	Reaction   string
	MXID       id.EventID
	MXRoom     id.RoomID
}

func (*LegacyReaction) ToNew

type LegacyUser

type LegacyUser struct {
	MXID       id.UserID
	NoticeRoom id.RoomID
}

func (*LegacyUser) ToNew

func (lu *LegacyUser) ToNew(db *database.Database) *database.User

type ToNewable

type ToNewable[T Insertable] interface {
	ToNew(*database.Database) T
}

Jump to

Keyboard shortcuts

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