model

package
v1.5.13 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: AGPL-3.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DbAccount

type DbAccount struct {
	*dbschema.NgingDbAccount
}

func NewDbAccount

func NewDbAccount(ctx echo.Context) *DbAccount

func (*DbAccount) Add

func (a *DbAccount) Add() (interface{}, error)

func (*DbAccount) Edit

func (a *DbAccount) Edit(id uint, mw func(db.Result) db.Result, args ...interface{}) error

func (*DbAccount) SetOptions

func (a *DbAccount) SetOptions() error

type DbSync

type DbSync struct {
	*dbschema.NgingDbSync
}

func NewDbSync

func NewDbSync(ctx echo.Context) *DbSync

func (*DbSync) Add

func (a *DbSync) Add() (interface{}, error)

func (*DbSync) Edit

func (a *DbSync) Edit(mw func(db.Result) db.Result, args ...interface{}) error

func (*DbSync) HidePassword

func (a *DbSync) HidePassword(dsn string) string

func (*DbSync) ParseDSN

func (a *DbSync) ParseDSN(dsn string) (user string, pwd string, host string, dbName string)

func (*DbSync) ToDSN

func (a *DbSync) ToDSN(user, pwd, host, db string) string

func (*DbSync) ToDSNFromAccount

func (a *DbSync) ToDSNFromAccount(acc *dbschema.NgingDbAccount) string

type DbSyncLog

type DbSyncLog struct {
	*dbschema.NgingDbSyncLog
}

func NewDbSyncLog

func NewDbSyncLog(ctx echo.Context) *DbSyncLog

func (*DbSyncLog) Add

func (a *DbSyncLog) Add() (interface{}, error)

func (*DbSyncLog) Edit

func (a *DbSyncLog) Edit(mw func(db.Result) db.Result, args ...interface{}) error

type DbSyncWithAccount

type DbSyncWithAccount struct {
	*dbschema.NgingDbSync
	SrcAccount *dbschema.NgingDbAccount `db:"-,relation=id:source_account_id"`
	DstAccount *dbschema.NgingDbAccount `db:"-,relation=id:destination_account_id"`
}

Jump to

Keyboard shortcuts

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