webui

package
v0.0.0-...-2987df4 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2019 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SessKeyUserID UserID auth type
	SessKeyUserID = "uid"
)

Variables

This section is empty.

Functions

func AddDeviceCfg

func AddDeviceCfg(ctx *Context, dev config.DeviceCfg)

AddDeviceCfg Insert new measurement groups to de internal BBDD --pending--

func AddHMCServerServer

func AddHMCServerServer(ctx *Context, dev config.HMCCfg)

AddHMCServerServer Insert new measurement groups to de internal BBDD --pending--

func AddInfluxServer

func AddInfluxServer(ctx *Context, dev config.InfluxCfg)

AddInfluxServer Insert new measurement groups to de internal BBDD --pending--

func AgentReloadConf

func AgentReloadConf(ctx *Context)

AgentReloadConf xx

func BulkExportObjectToFile

func BulkExportObjectToFile(ctx *Context, data impexp.ExportData)

BulkExportObjectToFile export object recursively to file

func DeleteDeviceCfg

func DeleteDeviceCfg(ctx *Context)

DeleteDeviceCfg --pending--

func DeleteHMCServerServer

func DeleteHMCServerServer(ctx *Context)

DeleteHMCServerServer --pending--

func DeleteInfluxServer

func DeleteInfluxServer(ctx *Context)

DeleteInfluxServer --pending--

func ExportObject

func ExportObject(ctx *Context)

ExportObject export object

func ExportObjectToFile

func ExportObjectToFile(ctx *Context, info impexp.ExportInfo)

ExportObjectToFile export Object to file

func GetContextHandler

func GetContextHandler() macaron.Handler

GetContextHandler get handler

func GetDeviceCfg

func GetDeviceCfg(ctx *Context)

GetDeviceCfg Return Server Array

func GetDeviceCfgAffectOnDel

func GetDeviceCfgAffectOnDel(ctx *Context)

GetDeviceCfgAffectOnDel --pending--

func GetDeviceCfgByID

func GetDeviceCfgByID(ctx *Context)

GetDeviceCfgByID --pending--

func GetHMCServerAffectOnDel

func GetHMCServerAffectOnDel(ctx *Context)

GetHMCServerAffectOnDel --pending--

func GetHMCServerServer

func GetHMCServerServer(ctx *Context)

GetHMCServerServer Return Server Array

func GetHMCServerServerByID

func GetHMCServerServerByID(ctx *Context)

GetHMCServerServerByID --pending--

func GetInfluxAffectOnDel

func GetInfluxAffectOnDel(ctx *Context)

GetInfluxAffectOnDel --pending--

func GetInfluxServer

func GetInfluxServer(ctx *Context)

GetInfluxServer Return Server Array

func GetInfluxServerByID

func GetInfluxServerByID(ctx *Context)

GetInfluxServerByID --pending--

func ImportDataFile

func ImportDataFile(ctx *Context, uf UploadForm)

ImportDataFile import data from uploaded file

func ImportHMCDevices

func ImportHMCDevices(ctx *Context, dev config.HMCCfg)

ImportHMCDevices new snmpdevice to de internal BBDD --pending--

func NewAPICfgDevice

func NewAPICfgDevice(m *macaron.Macaron) error

NewAPICfgDevice DeviceCfg API REST creator

func NewAPICfgHMCServer

func NewAPICfgHMCServer(m *macaron.Macaron) error

NewAPICfgHMCServer HMCServer API REST creator

func NewAPICfgImportExport

func NewAPICfgImportExport(m *macaron.Macaron) error

NewAPICfgImportExport Import/Export REST API creator

func NewAPICfgInfluxServer

func NewAPICfgInfluxServer(m *macaron.Macaron) error

NewAPICfgInfluxServer InfluxServer API REST creator

func NewAPIRtAgent

func NewAPIRtAgent(m *macaron.Macaron) error

NewAPIRtAgent set API for the runtime management

func NewAPIRtDevice

func NewAPIRtDevice(m *macaron.Macaron) error

NewAPIRtDevice Runtime Device REST API creator

func PingDeviceCfg

func PingDeviceCfg(ctx *Context, cfg config.DeviceCfg)

PingDeviceCfg Return ping result

func PingHMCServer

func PingHMCServer(ctx *Context, cfg config.HMCCfg)

PingHMCServer Return ping result

func PingInfluxServer

func PingInfluxServer(ctx *Context, cfg config.InfluxCfg)

PingInfluxServer Return ping result

func RTActHMCAPIDebugDev

func RTActHMCAPIDebugDev(ctx *Context)

RTActHMCAPIDebugDev xx

func RTActivateDev

func RTActivateDev(ctx *Context)

RTActivateDev xx

func RTDeactHMCAPIDebugDev

func RTDeactHMCAPIDebugDev(ctx *Context)

RTDeactHMCAPIDebugDev xx

func RTDeactivateDev

func RTDeactivateDev(ctx *Context)

RTDeactivateDev xx

func RTForceGather

func RTForceGather(ctx *Context)

RTForceGather force gather

func RTForceHMCScan

func RTForceHMCScan(ctx *Context)

RTForceHMCScan force scan for HMC devices

func RTGetInfo

func RTGetInfo(ctx *Context)

RTGetInfo xx

func RTGetLogFileDev

func RTGetLogFileDev(ctx *Context)

RTGetLogFileDev get file dev

func RTGetVersion

func RTGetVersion(ctx *Context)

RTGetVersion xx

func RTSetLogLevelDev

func RTSetLogLevelDev(ctx *Context)

RTSetLogLevelDev xx

func Sessioner

func Sessioner(options session.Options) macaron.Handler

Sessioner session handler

func SetConfDir

func SetConfDir(dir string)

SetConfDir et dir for logs

func SetLogDir

func SetLogDir(dir string)

SetLogDir et dir for logs

func SetLogger

func SetLogger(l *logrus.Logger)

SetLogger set output log

func UpdateDeviceCfg

func UpdateDeviceCfg(ctx *Context, dev config.DeviceCfg)

UpdateDeviceCfg --pending--

func UpdateHMCServerServer

func UpdateHMCServerServer(ctx *Context, dev config.HMCCfg)

UpdateHMCServerServer --pending--

func UpdateInfluxServer

func UpdateInfluxServer(ctx *Context, dev config.InfluxCfg)

UpdateInfluxServer --pending--

func WebServer

func WebServer(publicPath string, httpPort int, cfg *config.HTTPConfig, id string)

WebServer the main process

Types

type Context

type Context struct {
	*macaron.Context
	SignedInUser string
	Session      SessionStore
	IsSignedIn   bool
}

Context for macaron sessions on resitor

func (*Context) RawAsJSON

func (ctx *Context) RawAsJSON(status int, json []byte)

RawAsJSON Get Context in JSON format

type ImportCheck

type ImportCheck struct {
	IsOk    bool
	Message string
	Data    *impexp.ExportData
}

ImportCheck import check struct

type SessionStore

type SessionStore interface {
	// Set sets value to given key in session.
	Set(interface{}, interface{}) error
	// Get gets value by given key in session.
	Get(interface{}) interface{}
	// ID returns current session ID.
	ID() string
	// Release releases session resource and save data to provider.
	Release() error
	// Destory deletes a session.
	Destory(*Context) error
	// init
	Start(*Context) error
}

SessionStore where to store sessions

func GetSession

func GetSession() SessionStore

GetSession get Session

type SessionWrapper

type SessionWrapper struct {
	// contains filtered or unexported fields
}

SessionWrapper wrapper for session handlers

func (*SessionWrapper) Destory

func (s *SessionWrapper) Destory(c *Context) error

Destory destory

func (*SessionWrapper) Get

func (s *SessionWrapper) Get(k interface{}) interface{}

Get Session getter

func (*SessionWrapper) ID

func (s *SessionWrapper) ID() string

ID get Session ID

func (*SessionWrapper) Release

func (s *SessionWrapper) Release() error

Release release session

func (*SessionWrapper) Set

func (s *SessionWrapper) Set(k interface{}, v interface{}) error

Set session setter

func (*SessionWrapper) Start

func (s *SessionWrapper) Start(c *Context) error

Start start

type UploadForm

type UploadForm struct {
	AutoRename bool
	OverWrite  bool
	ExportFile *multipart.FileHeader
}

UploadForm form struct

type UserLogin

type UserLogin struct {
	UserName string `form:"username" binding:"Required"`
	Password string `form:"password" binding:"Required"`
}

UserLogin for login purposes

Jump to

Keyboard shortcuts

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