iriscontrol

package
v3.0.0-beta+incompatible Latest Latest
Warning

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

Go to latest
Published: May 30, 2016 License: Apache-2.0 Imports: 10 Imported by: 0

README

Iris Control

THIS IS NOT READY YET

This plugin will give you remotely ( and local ) access to your iris server's information via a web interface

Assets

No assets here because this is go -getable folder I don't want to messup with the folder size, in order to solve this I created a downloader manager inside this package which downloads the first time the assets and unzip them to the kataras/iris/plugin/iris-control/iris-control-assets/ .

The assets files are inside this repository

How to use


package main

import (
	"github.com/kataras/iris"
	"github.com/kataras/iris/plugin/iriscontrol"
    "fmt"
)

func main() {

	iris.Plugins().Add(iriscontrol.Web(9090, map[string]string{
		"irisusername1": "irispassword1",
		"irisusername2": "irispassowrd2",
	}))

	iris.Get("/", func(ctx *iris.Context) {
	})

	iris.Post("/something", func(ctx *iris.Context) {
	})

	fmt.Printf("Iris is listening on :%d", 8080)
	iris.Listen(":8080")
}



Documentation

Index

Constants

View Source
const Name = "Iris Control"

Name the name(string) of this plugin which is Iris Control

Variables

This section is empty.

Functions

func New

func New(cfg ...config.IrisControl) iris.IPlugin

New returns the plugin which is ready-to-use inside iris.Plugin method receives config.IrisControl

func Web

func Web(port int, users map[string]string) iris.IPlugin

Web set the options for the plugin and return the plugin which is ready-to-use inside iris.Plugin method first parameter is port second parameter is map of users (username:password)

Types

type DashboardPage

type DashboardPage struct {
	ServerIsRunning bool
	Routes          []routesinfo.RouteInfo
	Plugins         []PluginInfo
}

DashboardPage is the main data struct for the index contains a boolean if server is running, the routes and the plugins

type PluginInfo

type PluginInfo struct {
	Name        string
	Description string
}

PluginInfo holds the Name and the description of the registed plugins

Jump to

Keyboard shortcuts

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