web

package
v3.19.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2023 License: Apache-2.0 Imports: 16 Imported by: 1

README

Micro Web

A web dashboard for Micro

Usage

Specify the API Address (Defaults to localhost:8080)

MICRO_API_ADDRESS=https://api.m3o.com

Run the dashboard

micro web

Go to localhost:8082

Documentation

Overview

Package web is a web dashboard

Index

Constants

This section is empty.

Variables

View Source
var (
	Name      = "web"
	API       = "http://localhost:8080"
	Address   = ":8082"
	Namespace = "micro"
	LoginURL  = "/login"
	// Host name the web dashboard is served on
	Host, _ = os.Hostname()
	// Token cookie name
	TokenCookieName = "micro-token"
)

Meta Fields of micro web

View Source
var (
	Flags = []cli.Flag{
		&cli.StringFlag{
			Name:    "api_address",
			Usage:   "Set the api address to call e.g http://localhost:8080",
			EnvVars: []string{"MICRO_API_ADDRESS"},
		},
		&cli.StringFlag{
			Name:    "web_address",
			Usage:   "Set the web UI address e.g 0.0.0.0:8082",
			EnvVars: []string{"MICRO_WEB_ADDRESS"},
		},
		&cli.StringFlag{
			Name:    "namespace",
			Usage:   "Set the namespace used by the Web proxy e.g. com.example.web",
			EnvVars: []string{"MICRO_WEB_NAMESPACE"},
		},
		&cli.StringFlag{
			Name:    "login_url",
			EnvVars: []string{"MICRO_WEB_LOGIN_URL"},
			Usage:   "The relative URL where a user can login",
		},
	}
)

Functions

func Run

func Run(ctx *cli.Context) error

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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