Documentation ¶
Index ¶
- type Database
- func (database *Database) CreateDatabase() error
- func (database *Database) CreateDomainsTable() error
- func (database *Database) CreateProxiesTable() error
- func (database *Database) CreateTables() error
- func (database *Database) DomainCreate(domain string, proxify bool) bool
- func (database *Database) DomainDelete(domain string) bool
- func (database *Database) DomainExists(domain string) bool
- func (database *Database) DomainGet(domain string) (int, string, bool)
- func (database *Database) DomainList() map[string]bool
- func (database *Database) DomainUpdate(domain string, proxify bool) bool
- func (database *Database) GetConnection() *sql.DB
- func (database *Database) GetDomainsTableName() string
- func (database *Database) GetName() string
- func (database *Database) GetProxiesTableName() string
- func (database *Database) GetStorage() *storage.Storage
- func (database *Database) ProxyCreate(proxyType, proxyHost string, proxyPort int) bool
- func (database *Database) ProxyDelete(proxyType, proxyHost string, proxyPort int) bool
- func (database *Database) ProxyDisableAuthentication(proxyType, proxyHost string, proxyPort int) bool
- func (database *Database) ProxyEnableAuthentication(proxyType, proxyHost string, proxyPort int, username, password string) bool
- func (database *Database) ProxyExists(proxyType, proxyHost string, proxyPort int) bool
- func (database *Database) ProxyFindByHost(proxyHost string) []*ProxyServer
- func (database *Database) ProxyList() []string
- func (database *Database) Start() error
- func (database *Database) Stop() error
- func (database *Database) TableExists(table string) bool
- type ProxyServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
Database represents the database configuration.
func NewDatabase ¶
NewDatabase creates a new database.
func (*Database) CreateDatabase ¶
CreateDatabase creates the database file.
func (*Database) CreateDomainsTable ¶
CreateDomainsTable creates the domains table.
func (*Database) CreateProxiesTable ¶
CreateProxiesTable creates the proxies table.
func (*Database) CreateTables ¶
CreateTables creates the tables.
func (*Database) DomainCreate ¶
DomainCreate creates the domain.
func (*Database) DomainDelete ¶
DomainDelete deletes the domain.
func (*Database) DomainExists ¶
DomainExists checks if the domain exists.
func (*Database) DomainList ¶
DomainList lists the domains.
func (*Database) DomainUpdate ¶
DomainUpdate updates the domain.
func (*Database) GetConnection ¶
GetConnection returns the connection to the database.
func (*Database) GetDomainsTableName ¶
GetDomainsTableName returns the name of the table.
func (*Database) GetProxiesTableName ¶
func (*Database) GetStorage ¶
GetStorage returns the storage.
func (*Database) ProxyCreate ¶
ProxyCreate creates a new proxy.
func (*Database) ProxyDelete ¶
ProxyDelete deletes a proxy.
func (*Database) ProxyDisableAuthentication ¶
func (database *Database) ProxyDisableAuthentication(proxyType, proxyHost string, proxyPort int) bool
ProxyDisableAuthentication disables authentication for a proxy.
func (*Database) ProxyEnableAuthentication ¶
func (database *Database) ProxyEnableAuthentication(proxyType, proxyHost string, proxyPort int, username, password string) bool
ProxyEnableAuthentication enables authentication for a proxy.
func (*Database) ProxyExists ¶
ProxyExists checks if a proxy exists.
func (*Database) ProxyFindByHost ¶
func (database *Database) ProxyFindByHost(proxyHost string) []*ProxyServer
ProxyFindByHost finds all proxies by host.
func (*Database) TableExists ¶
TableExists checks if the table exists.