handlers

package
v0.0.0-...-4b0d453 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateEntity

func CreateEntity(c *gin.Context)

func GenerateVpnConfig

func GenerateVpnConfig(c *gin.Context)

func GetEntityInfo

func GetEntityInfo(c *gin.Context)

func GetServices

func GetServices(c *gin.Context)

func GetVpnConfig

func GetVpnConfig(c *gin.Context)

func HashPassword

func HashPassword(password string) (string, error)

func UploadSShKey

func UploadSShKey(c *gin.Context)

Types

type Entity

type Entity struct {
	Name     string `json:"name" validate:"required,min=3,max=30"`
	Password string `json:"password" validate:"required,min=8,max=100"`
}

func (*Entity) WriteEntity

func (t *Entity) WriteEntity(login string) error

type SSHStruct

type SSHStruct struct {
	Key string `json:"key"`
}

type Service

type Service struct {
	Name        string  `json:"name"`
	Description string  `json:"description"`
	Reputation  int     `json:"reputation"`
	Lost        int     `json:"lost"`
	Gained      int     `json:"gained"`
	Status      int     `json:"status"`
	SLA         float64 `json:"sla"`
}

Jump to

Keyboard shortcuts

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