model

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2022 License: AGPL-3.0 Imports: 7 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 FtpUser

type FtpUser struct {
	*dbschema.NgingFtpUser
}

func NewFtpUser

func NewFtpUser(ctx echo.Context) *FtpUser

func (*FtpUser) Add

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

func (*FtpUser) CheckPasswd

func (f *FtpUser) CheckPasswd(username string, password string) (bool, error)

func (*FtpUser) Edit

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

func (*FtpUser) Exists

func (f *FtpUser) Exists(username string, excludeIDs ...uint) (bool, error)

func (*FtpUser) RootPath

func (f *FtpUser) RootPath(username string) (basePath string, err error)

type FtpUserAndGroup

type FtpUserAndGroup struct {
	*dbschema.NgingFtpUser
	Group *dbschema.NgingFtpUserGroup `db:"-,relation=id:group_id|gtZero"`
}

type FtpUserGroup

type FtpUserGroup struct {
	*dbschema.NgingFtpUserGroup
}

func NewFtpUserGroup

func NewFtpUserGroup(ctx echo.Context) *FtpUserGroup

func (*FtpUserGroup) Exists

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

func (*FtpUserGroup) ExistsOther

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

func (*FtpUserGroup) ListByActive

func (f *FtpUserGroup) ListByActive(page int, size int) (func() int64, []*dbschema.NgingFtpUserGroup, error)

Jump to

Keyboard shortcuts

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