iriscontrol

package
v3.0.0-rc.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2016 License: Apache-2.0 Imports: 8 Imported by: 0

README

Package information

Iris control is a plugin which gives you a little control over your Iris station.

iris.Plugins.Add(iriscontrol.New(PORT, AUTHENTICATED_USERS))
package main

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

func main() {

	iris.Plugins.Add(iriscontrol.New(9090, map[string]string{
		"1":             "1",
		"irisusername2": "irispassowrd2",
	}))

	iris.Get("/", func(ctx *iris.Context) {
		ctx.Write("Root path from  server")
	})

	iris.Get("/something", func(ctx *iris.Context) {
		ctx.Write("Something path from server")
	})

  // Iris control will listen on mydomain.com:9090
	iris.Listen("mydomain.com:8080")
}

Iris control show case

Documentation

Index

Constants

View Source
const Name = "Iris Control"

Name "Iris Control"

Variables

This section is empty.

Functions

This section is empty.

Types

type IrisControl

type IrisControl interface{}

IrisControl is the interface which the iriscontrol should implements it's empty for now because no need any public API

func New

func New(port int, users map[string]string) IrisControl

New creates & returns a new iris control plugin receives two parameters first is the authenticated users which should be able to access the control panel second is the PORT which the iris control panel should be listened & served to

Jump to

Keyboard shortcuts

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