wireguard-ui/model/server.go
Khanh Ngo febf075f8d
Add Server config page
Handle server ip addresses input and store
TODO: Key pair form
2020-04-19 15:50:59 +07:00

26 lines
550 B
Go

package model
import (
"time"
)
// Server model
type Server struct {
KeyPair *ServerKeypair
Interface *ServerInterface
}
// ServerKeypair model
type ServerKeypair struct {
PrivateKey string `json:"private_key"`
PublicKey string `json:"pulbic_key"`
UpdatedAt time.Time `json:"updated_at"`
}
// ServerInterface model
type ServerInterface struct {
Addresses []string `json:"addresses"`
ListenPort int `json:"listen_port,string"` // ,string to get listen_port string input as int
UpdatedAt time.Time `json:"updated_at"`
}