Documentation ¶
Index ¶
- Constants
- func ClearActiveFromAllTunnels(db *gorm.DB) error
- func CountAllActiveTunnels(db *gorm.DB) (int, error)
- func CountUsers(db *gorm.DB) (int, error)
- func CountVTunActiveTunnels(db *gorm.DB) (int, error)
- func CountVtunTunnels(db *gorm.DB) (int, error)
- func CountWireguardActiveTunnels(db *gorm.DB) (int, error)
- func CountWireguardTunnels(db *gorm.DB) (int, error)
- func DeleteTunnel(db *gorm.DB, id uint) error
- func DeleteUser(db *gorm.DB, id uint) error
- func GetNextVTunIP(db *gorm.DB, config *config.Config) (string, error)
- func GetNextWireguardIP(db *gorm.DB, config *config.Config) (string, error)
- func GetNextWireguardPort(db *gorm.DB, config *config.Config) (uint16, error)
- func TunnelIDExists(db *gorm.DB, id uint) (bool, error)
- func UserExists(db *gorm.DB, user User) (bool, error)
- func UserIDExists(db *gorm.DB, id uint) (bool, error)
- type AppSettings
- type Tunnel
- func FindTunnelByID(db *gorm.DB, id uint) (Tunnel, error)
- func FindTunnelByIP(db *gorm.DB, ip net.IP) (Tunnel, error)
- func FindTunnelByInterface(db *gorm.DB, iface string) (Tunnel, error)
- func ListAllTunnels(db *gorm.DB) ([]Tunnel, error)
- func ListClientTunnels(db *gorm.DB) ([]Tunnel, error)
- func ListServerTunnels(db *gorm.DB) ([]Tunnel, error)
- func ListVtunTunnels(db *gorm.DB) ([]Tunnel, error)
- func ListWireguardTunnels(db *gorm.DB) ([]Tunnel, error)
- type User
- type UsersSeeder
Constants ¶
View Source
const UserSeederRows = 1
Variables ¶
This section is empty.
Functions ¶
func CountVTunActiveTunnels ¶ added in v0.0.100
func CountWireguardActiveTunnels ¶ added in v0.0.100
func GetNextVTunIP ¶ added in v0.0.100
func GetNextWireguardIP ¶ added in v0.0.100
func GetNextWireguardPort ¶ added in v0.0.100
Types ¶
type AppSettings ¶
type Tunnel ¶
type Tunnel struct { ID uint `json:"id" gorm:"primaryKey"` Hostname string `json:"hostname" binding:"required"` IP string `json:"ip" binding:"required"` Password string `json:"-" binding:"required"` Active bool `json:"active"` Client bool `json:"client"` TunnelInterface string `json:"-"` RXBytes uint64 `json:"rx_bytes"` TXBytes uint64 `json:"tx_bytes"` TotalRXMB float64 `json:"total_rx_mb"` TotalTXMB float64 `json:"total_tx_mb"` RXBytesPerSec uint64 `json:"rx_bytes_per_sec"` TXBytesPerSec uint64 `json:"tx_bytes_per_sec"` Wireguard bool `json:"wireguard" gorm:"default:false"` WireguardServerKey string `json:"wireguard_server_key"` WireguardPort uint16 `json:"wireguard_port"` ConnectionTime time.Time `json:"connection_time"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"-"` DeletedAt gorm.DeletedAt `json:"-" gorm:"index"` }
type User ¶
type UsersSeeder ¶
type UsersSeeder struct { gorm_seeder.SeederAbstract // contains filtered or unexported fields }
func NewUsersSeeder ¶
func NewUsersSeeder(cfg gorm_seeder.SeederConfiguration, config *config.Config) UsersSeeder
Click to show internal directories.
Click to hide internal directories.