Documentation ¶
Index ¶
- func CreateClient(client *model.Client) (*model.Client, error)
- func DeleteClient(id string) error
- func EmailClient(id string) error
- func GetAllReservedIps() ([]string, error)
- func GetServerStatus() (*model.Status, error)
- func MakeErrorResponse(status int64, err string, server *model.Server, client *model.Client, ...) *model.Response
- func MakeSucessResponse(status int64, message string, server *model.Server, client *model.Client, ...) *model.Response
- func ReadClient(id string) (*model.Client, error)
- func ReadClientConfig(id string) ([]byte, error)
- func ReadClients() ([]*model.Client, error)
- func ReadServer() (*model.Server, error)
- func ReadWgConfigFile() ([]byte, error)
- func UpdateClient(UUID string, client *model.Client) (*model.Client, error)
- func UpdateServer(server *model.Server) (*model.Server, error)
- func UpdateServerConfigWg() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateClient ¶
CreateClient client with all necessary data
func GetAllReservedIps ¶
GetAllReservedIps the list of all reserved IPs, client and server
func GetServerStatus ¶
Method to get the server status
func MakeErrorResponse ¶
func MakeErrorResponse(status int64, err string, server *model.Server, client *model.Client, clients []*model.Client) *model.Response
error response message
func MakeSucessResponse ¶
func MakeSucessResponse(status int64, message string, server *model.Server, client *model.Client, clients []*model.Client) *model.Response
success response message
func ReadClientConfig ¶
ReadClientConfig in wg format
func ReadWgConfigFile ¶
ReadWgConfigFile return content of wireguard config file
func UpdateClient ¶
UpdateClient preserve keys
func UpdateServer ¶
UpdateServer keep private values from existing one
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.