model

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: AGPL-3.0 Imports: 10 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 FtpPermission added in v1.3.1

type FtpPermission struct {
	*dbschema.NgingFtpPermission
}

func NewFtpPermission added in v1.3.1

func NewFtpPermission(ctx echo.Context) *FtpPermission

func (*FtpPermission) DeleteByTarget added in v1.3.1

func (f *FtpPermission) DeleteByTarget(targetType string, targetID uint) error

func (*FtpPermission) Exists added in v1.3.1

func (f *FtpPermission) Exists(targetType string, targetID uint) (bool, error)

func (*FtpPermission) GetByTarget added in v1.3.1

func (f *FtpPermission) GetByTarget(targetType string, targetID uint) error

func (*FtpPermission) Save added in v1.3.1

func (f *FtpPermission) Save() (pk interface{}, err error)

type FtpUser

type FtpUser struct {
	*dbschema.NgingFtpUser
	// contains filtered or unexported fields
}

func NewFtpUser

func NewFtpUser(ctx echo.Context) *FtpUser

func (*FtpUser) Add

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

func (*FtpUser) Allowed added in v1.3.1

func (f *FtpUser) Allowed(path string, modification bool) bool

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) ExistsAvailable added in v1.3.3

func (f *FtpUser) ExistsAvailable() (bool, error)

func (*FtpUser) GetRootPathOnce added in v1.3.1

func (f *FtpUser) GetRootPathOnce(username string) (string, 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