cliapi

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const CONTENT_TYPE = "Content-Type"
View Source
const CONTENT_TYPE_JSON = "application/json"

Variables

This section is empty.

Functions

func Init

func Init(cfg *utils.Config, router *mux.Router)

Types

type Firewall

type Firewall struct {
	Id       string         `json:"id"`
	Name     string         `json:"name"`
	RulesIn  []FirewallRule `json:"rulesIn"`
	RulesOut []FirewallRule `json:"rulesOut"`
}

type FirewallRule

type FirewallRule struct {
	Protocol string  `json:"protocol"`
	Port     string  `json:"port"`
	Host     string  `json:"host"`
	Groups   []Group `json:"groups"`
}

type Group

type Group struct {
	Id       string `json:"id"`
	Name     string `json:"name"`
	ObjectId string `json:"objectId"`
}

type JWTData

type JWTData struct {
	jwt.StandardClaims
	ShieldooClaims map[string]string `json:"shieldoo"`
}

type Listener

type Listener struct {
	ListenPort  int    `json:"listenPort"`
	Protocol    string `json:"protocol"`
	ForwardPort int    `json:"forwardPort"`
	ForwardHost string `json:"forwardHost"`
	Description string `json:"description"`
}

type Server

type Server struct {
	Id             string                   `json:"id"`
	Name           string                   `json:"name"`
	Groups         []Group                  `json:"groups"`
	Firewall       Firewall                 `json:"firewall"`
	Listeners      []Listener               `json:"listeners"`
	Autoupdate     bool                     `json:"autoupdate"`
	IpAddress      string                   `json:"ipAddress"`
	Description    string                   `json:"description"`
	Configuration  string                   `json:"configuration"`
	OSUpdatePolicy ServerOSAutoupdatePolicy `json:"osUpdatePolicy"`
}

type ServerOSAutoupdatePolicy

type ServerOSAutoupdatePolicy struct {
	Enabled                   bool `json:"enabled"`
	SecurityAutoupdateEnabled bool `json:"securityAutoupdateEnabled"`
	AllAutoupdateEnabled      bool `json:"allAutoupdateEnabled"`
	RestartAfterUpdate        bool `json:"restartAfterUpdate"`
	UpdateHour                int  `json:"updateHour"`
}

Jump to

Keyboard shortcuts

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