Documentation ¶
Index ¶
- Variables
- func API_ConnectToExisting(w http.ResponseWriter, req *http.Request)
- func API_GetConfig(w http.ResponseWriter, req *http.Request)
- func API_GetLogs(w http.ResponseWriter, req *http.Request)
- func API_Ping(w http.ResponseWriter, req *http.Request)
- func API_Reset(w http.ResponseWriter, req *http.Request)
- func API_Restart(w http.ResponseWriter, req *http.Request)
- func CheckConstellationToken(req *http.Request) error
- func CloseNATSClient()
- func ConstellationAPIDevices(w http.ResponseWriter, req *http.Request)
- func DeviceBlock(w http.ResponseWriter, req *http.Request)
- func DeviceCreate(w http.ResponseWriter, req *http.Request)
- func DeviceList(w http.ResponseWriter, req *http.Request)
- func ExportConfigToYAML(overwriteConfig utils.ConstellationConfig, outputPath string) error
- func GetAllLightHouses() ([]utils.ConstellationDevice, error)
- func GetBlockedDevices() ([]utils.ConstellationDevice, error)
- func GetCertFingerprint(certPath string) (string, error)
- func GetDeviceConfigForSync(nickname, deviceName string) ([]byte, error)
- func GetDeviceConfigManualSync(w http.ResponseWriter, req *http.Request)
- func GetDeviceConfigSync(w http.ResponseWriter, req *http.Request)
- func GetDeviceIp(device string) string
- func GetNATSCredentials(isMaster bool) (string, string, error)
- func Init()
- func InitConfig()
- func InitDNS()
- func InitNATSClient()
- func IsClientConnected() bool
- func MakeSyncPayload() string
- func MasterNATSClientRouter()
- func PingNATSClient() bool
- func PublishNATSMessage(topic string, payload string)
- func ReceiveSyncPayload(rawPayload string)
- func RequestSyncPayload()
- func ResetNebula() error
- func RestartNebula()
- func SendNATSMessage(topic string, payload string) (string, error)
- func SendSyncPayload(username string)
- func SlaveConfigSync(newConfig string) (bool, error)
- func SlaveNATSClientRouter()
- func StartNATS()
- func StopNATS()
- func TriggerClientResync() error
- type DeviceBlockRequestJSON
- type DeviceCreateRequestJSON
- type DeviceResyncRequest
- type SyncPayload
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ProcessMux sync.Mutex ConstellationInitLock sync.Mutex )
View Source
var APIKey = ""
View Source
var CachedDeviceNames = map[string]string{}
View Source
var CachedDevices = map[string]utils.ConstellationDevice{}
View Source
var DNSBlacklist = map[string]bool{}
View Source
var DNSStarted = false
View Source
var DeviceName = ""
View Source
var MASTERPWD = utils.GenerateRandomString(24)
View Source
var MASTERUSER = "SERVERUSER"
View Source
var NATSClientTopic = ""
View Source
var NebulaDefaultConfig utils.NebulaConfig
View Source
var NebulaFailedStarting = false
View Source
var NebulaStarted = false
Functions ¶
func API_ConnectToExisting ¶
func API_ConnectToExisting(w http.ResponseWriter, req *http.Request)
func API_GetConfig ¶
func API_GetConfig(w http.ResponseWriter, req *http.Request)
func API_GetLogs ¶
func API_GetLogs(w http.ResponseWriter, req *http.Request)
func API_Restart ¶
func API_Restart(w http.ResponseWriter, req *http.Request)
func CheckConstellationToken ¶
TODO: Cache this
func CloseNATSClient ¶
func CloseNATSClient()
func ConstellationAPIDevices ¶
func ConstellationAPIDevices(w http.ResponseWriter, req *http.Request)
func DeviceBlock ¶
func DeviceBlock(w http.ResponseWriter, req *http.Request)
func DeviceCreate ¶
func DeviceCreate(w http.ResponseWriter, req *http.Request)
func DeviceList ¶
func DeviceList(w http.ResponseWriter, req *http.Request)
func ExportConfigToYAML ¶
func ExportConfigToYAML(overwriteConfig utils.ConstellationConfig, outputPath string) error
func GetAllLightHouses ¶
func GetAllLightHouses() ([]utils.ConstellationDevice, error)
func GetBlockedDevices ¶
func GetBlockedDevices() ([]utils.ConstellationDevice, error)
func GetCertFingerprint ¶
func GetDeviceConfigForSync ¶
func GetDeviceConfigManualSync ¶
func GetDeviceConfigManualSync(w http.ResponseWriter, req *http.Request)
func GetDeviceConfigSync ¶
func GetDeviceConfigSync(w http.ResponseWriter, req *http.Request)
func GetDeviceIp ¶
func InitConfig ¶
func InitConfig()
func InitNATSClient ¶
func InitNATSClient()
func IsClientConnected ¶
func IsClientConnected() bool
func MakeSyncPayload ¶
func MakeSyncPayload() string
func MasterNATSClientRouter ¶
func MasterNATSClientRouter()
func PingNATSClient ¶
func PingNATSClient() bool
func PublishNATSMessage ¶
func ReceiveSyncPayload ¶
func ReceiveSyncPayload(rawPayload string)
func RequestSyncPayload ¶
func RequestSyncPayload()
func ResetNebula ¶
func ResetNebula() error
func RestartNebula ¶
func RestartNebula()
func SendSyncPayload ¶
func SendSyncPayload(username string)
func SlaveConfigSync ¶
func SlaveNATSClientRouter ¶
func SlaveNATSClientRouter()
func TriggerClientResync ¶
func TriggerClientResync() error
Types ¶
type DeviceBlockRequestJSON ¶
type DeviceCreateRequestJSON ¶
type DeviceCreateRequestJSON struct { DeviceName string `json:"deviceName",validate:"required,min=3,max=32,alphanum"` IP string `json:"ip",validate:"required,ipv4"` PublicKey string `json:"publicKey",omitempty` // for devices only Nickname string `json:"nickname",validate:"max=32,alphanum",omitempty` // for lighthouse only IsLighthouse bool `json:"isLighthouse",omitempty` IsRelay bool `json:"isRelay",omitempty` PublicHostname string `json:"PublicHostname",omitempty` Port string `json:"port",omitempty` }
type DeviceResyncRequest ¶
type SyncPayload ¶
Click to show internal directories.
Click to hide internal directories.