handlers

package
v0.0.0-...-a522a1c Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddSubnetToEntity

func AddSubnetToEntity(c *gin.Context)

func CreateEntity

func CreateEntity(c *gin.Context)

func DeleteEntities

func DeleteEntities(c *gin.Context)

func DeleteScript

func DeleteScript(c *gin.Context)

func EntitiesList

func EntitiesList(c *gin.Context)

func GenerateVpns

func GenerateVpns(c *gin.Context)

func GetScenario

func GetScenario(c *gin.Context)

func GetScript

func GetScript(c *gin.Context)

func GetScriptsList

func GetScriptsList(c *gin.Context)

func HashPassword

func HashPassword(password string) (string, error)

func UpdateScenario

func UpdateScenario(c *gin.Context)

func UploadScript

func UploadScript(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"`
	Subnet   string `json:"subnet"`
	IP       string `json:"ip"`
	Visible  bool   `json:"visible"`
}

func (*Entity) WriteEntity

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

type Script

type Script struct {
	Name    string `json:"name"`
	Size    int64  `json:"size"`
	Modifed string `json:"modifed"`
}

type ScriptName

type ScriptName struct {
	Name string `json:"name"`
}

type Subnet

type Subnet struct {
	Entity string `json:"entity"`
	Subnet string `json:"subnet"`
}

Jump to

Keyboard shortcuts

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