model

package
v0.0.0-...-1494120 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DaemonizeUID     = 100
	DaemonizeGID     = 100
	BasePath         = "/opt/go-panel"
	DatabaseFilePath = BasePath + "/var/db/master.db"
)

Variables

View Source
var (
	// GitRepository is the git repository that was compiled.
	GitRepository string
	// GitCommit is the git commit that was compiled.
	GitCommit string
	// VersionPre indicates prerelease.
	VersionPre = ""
	// VersionDev indicates development branch. Releases will be empty string.
	VersionDev string
)

Functions

func Version

func Version() semver.Version

Version is the specification version that the package types support.

Types

type Database

type Database struct {
	ID       int64
	Users    []DatabaseUser
	Name     string
	Type     string
	Port     uint
	Version  string
	User     string
	Password string
}

Database godoc.

func (Database) Validate

func (d Database) Validate() error

Validate godoc.

type DatabaseUser

type DatabaseUser struct {
	ID         int64
	DatabaseID int64
	Database   *Database
	Username   string
	Password   string
	Rights     []string
}

DatabaseUser godoc.

func (DatabaseUser) Validate

func (d DatabaseUser) Validate() error

Validate godoc.

type DnsRecord

type DnsRecord struct {
	ID       int64
	ZoneID   int64
	Zone     DnsZone
	Type     string
	Priority int32
	Weight   int32
	TTL      int64
	Name     string
	Value    string
}

DnsRecord godoc.

type DnsZone

type DnsZone struct {
	ID      int64
	Name    string
	Email   string
	TTL     int64
	Refresh int64
	Retry   int64
	Expire  int64
	Minimum int64
	Serial  int64
	Records []DnsRecord
}

DnsZone godoc.

type Domain

type Domain struct {
	ID            int64
	Name          string
	DocumentRoot  string
	EnableSSL     bool
	EnablePHP     bool
	EnableCGI     bool
	EnableEmail   bool
	EnableWebMail bool
	PHPVersion    string
}

Domain godoc.

func (Domain) Validate

func (d Domain) Validate() error

Validate godoc.

type Mailbox

type Mailbox struct {
	ID             int64
	DomainID       int64
	Domain         *Domain
	Active         bool
	Homedir        string
	Quota          int
	Username       string
	Password       string
	DisablePOP3    bool
	DisableIMAP    bool
	DisableSMTP    bool
	DisableWebmail bool
}

Mailbox godoc.

func (*Mailbox) Validate

func (m *Mailbox) Validate() error

Mailbox godoc

type User

type User struct {
	ID       int64
	Rights   UserRights
	Name     string
	Username string
	Email    string
	Password string
}

User godoc.

func (User) Validate

func (u User) Validate() error

Validate godoc.

type UserRights

type UserRights uint16

UserRights godoc.

Jump to

Keyboard shortcuts

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