vpn

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2017 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Log

type Log struct {
	ID          uint   `orm:"column(id)" json:"id"`
	TrustedIP   string `orm:"column(trusted_id)"`
	TrustedPort uint
	RemoteIP    string `orm:"column(remote_ip)"`
	RemotePort  uint
	StartUp     time.Time
	ShutDown    *time.Time
	Received    float64
	Send        float64
	UpdatedAt   time.Time `orm:"auto_now" json:"updatedAt"`
	CreatedAt   time.Time `orm:"auto_now_add" json:"createdAt"`

	User *User `orm:"rel(fk)"`
}

Log log

func (*Log) TableName

func (*Log) TableName() string

TableName table name

type Plugin

type Plugin struct {
	nut.Controller
}

Plugin controller

func (*Plugin) GetHome

func (p *Plugin) GetHome()

GetHome home @router / [get]

type User

type User struct {
	ID        uint `orm:"column(id)" json:"id"`
	FullName  string
	Email     string
	Details   string
	Password  string
	Online    bool
	Enable    bool
	StartUp   time.Time
	ShutDown  time.Time
	UpdatedAt time.Time `orm:"auto_now" json:"updatedAt"`
	CreatedAt time.Time `orm:"auto_now_add" json:"createdAt"`
}

User user

func (*User) ChkPassword

func (p *User) ChkPassword(password string) bool

ChkPassword check password

func (*User) SetPassword

func (p *User) SetPassword(password string) error

SetPassword set password (md5 with salt)

func (*User) TableName

func (*User) TableName() string

TableName table name

Jump to

Keyboard shortcuts

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