wireguard-ui/model/client.go

39 lines
1.1 KiB
Go
Raw Permalink Normal View History

2020-04-18 11:17:49 +02:00
package model
import (
"time"
)
// Client model
type Client struct {
ID string `json:"id"`
PrivateKey string `json:"private_key"`
PublicKey string `json:"public_key"`
PresharedKey string `json:"preshared_key"`
Name string `json:"name"`
2023-12-29 09:22:12 +01:00
TgUserid string `json:"telegram_userid"`
Email string `json:"email"`
SubnetRanges []string `json:"subnet_ranges,omitempty"`
AllocatedIPs []string `json:"allocated_ips"`
AllowedIPs []string `json:"allowed_ips"`
ExtraAllowedIPs []string `json:"extra_allowed_ips"`
2023-12-25 20:21:37 +01:00
Endpoint string `json:"endpoint"`
2024-01-09 21:03:27 +01:00
AdditionalNotes string `json:"additional_notes"`
UseServerDNS bool `json:"use_server_dns"`
Enabled bool `json:"enabled"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
2020-04-18 11:17:49 +02:00
}
2020-04-18 16:42:53 +02:00
// ClientData includes the Client and extra data
type ClientData struct {
2020-04-25 08:07:05 +02:00
Client *Client
QRCode string
2020-04-18 16:42:53 +02:00
}
type QRCodeSettings struct {
2023-12-29 09:22:12 +01:00
Enabled bool
IncludeDNS bool
IncludeMTU bool
}