model

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoneDirectory      = errors.New(`No accessible directory`)
	ErrBannedUser         = errors.New(`The current account has been disabled`)
	ErrIPAddressIsBlocked = errors.New(`IP is blocked`)
)

Functions

This section is empty.

Types

type FrpClient

type FrpClient struct {
	*dbschema.NgingFrpClient
}

func NewFrpClient

func NewFrpClient(ctx echo.Context) *FrpClient

func (*FrpClient) Add

func (f *FrpClient) Add() (pk interface{}, err error)

func (*FrpClient) Edit

func (f *FrpClient) Edit(mw func(db.Result) db.Result, args ...interface{}) error

func (*FrpClient) Exists

func (f *FrpClient) Exists(name string, excludeIds ...uint) (bool, error)

type FrpClientAndGroup

type FrpClientAndGroup struct {
	*dbschema.NgingFrpClient
	Group   *dbschema.NgingFrpGroup `db:"-,relation=id:group_id|gtZero"`
	Running bool
}

type FrpGroup

type FrpGroup struct {
	*dbschema.NgingFrpGroup
}

func NewFrpGroup

func NewFrpGroup(ctx echo.Context) *FrpGroup

func (*FrpGroup) Exists

func (f *FrpGroup) Exists(name string) (bool, error)

func (*FrpGroup) ExistsOther

func (f *FrpGroup) ExistsOther(name string, id uint) (bool, error)

type FrpServer

type FrpServer struct {
	*dbschema.NgingFrpServer
}

func NewFrpServer

func NewFrpServer(ctx echo.Context) *FrpServer

func (*FrpServer) Add

func (f *FrpServer) Add() (pk interface{}, err error)

func (*FrpServer) Edit

func (f *FrpServer) Edit(mw func(db.Result) db.Result, args ...interface{}) error

func (*FrpServer) Exists

func (f *FrpServer) Exists(name string, excludeIds ...uint) (bool, error)

type FrpServerAndGroup

type FrpServerAndGroup struct {
	*dbschema.NgingFrpServer
	Group   *dbschema.NgingFrpGroup `db:"-,relation=id:group_id|gtZero"`
	Running bool
}

type FrpUser

type FrpUser struct {
	*dbschema.NgingFrpUser
}

func NewFrpUser

func NewFrpUser(ctx echo.Context) *FrpUser

func (*FrpUser) Add

func (f *FrpUser) Add() (pk interface{}, err error)

func (*FrpUser) CheckPasswd

func (f *FrpUser) CheckPasswd(serverID uint, username string, password string) error

func (*FrpUser) Edit

func (f *FrpUser) Edit(mw func(db.Result) db.Result, args ...interface{}) error

func (*FrpUser) Exists

func (f *FrpUser) Exists(serverID uint, username string, excludeIDs ...uint64) (bool, error)

type FrpUserAndServer

type FrpUserAndServer struct {
	*dbschema.NgingFrpUser
	Server *dbschema.NgingFrpServer `db:"-,relation=id:server_id|gtZero"`
}

Jump to

Keyboard shortcuts

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