mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-05-24 00:24:06 +03:00
Add Server config page
Handle server ip addresses input and store TODO: Key pair form
This commit is contained in:
parent
20fcdbafa5
commit
febf075f8d
9 changed files with 285 additions and 22 deletions
25
model/server.go
Normal file
25
model/server.go
Normal file
|
@ -0,0 +1,25 @@
|
|||
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"`
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue