Documentation ¶
Index ¶
- Constants
- Variables
- func Create(db *sql.DB) error
- func Delete(db *sql.DB, where string, args ...interface{}) error
- func Domains(db *sql.DB, where string, args ...interface{}) ([]string, error)
- func NewAlias(db *sql.DB, name, domain, forwrd string) error
- func NewBox(db *sql.DB, name, domain, passwd string) error
- type Dest
Constants ¶
View Source
const ( TypeBox TypeAlias )
Variables ¶
View Source
var CreateSql = []string{`create table if not exists dest (
id integer primary key autoincrement,
type integer,
name text,
domain text,
enable integer default 1,
passwd text,
forwrd text,
unique (name, domain)
)`}
View Source
var DeleteSql = `delete from dest %s`
View Source
var DestsSql = `select
id, type, name, domain, enable, passwd, forwrd
from dest %s order by domain, name
`
View Source
var DomainsSql = `select
distinct domain
from dest %s order by domain
`
View Source
var InsertSql = `insert into dest
(type, name, domain, passwd, forwrd)
values (?, ?, ?, ?, ?)
`
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.