api

package
v0.0.0-...-04092ee Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(router *mux.Router, switcher Switcher)

func GetData

func GetData(r *http.Request, v interface{}) error

func GetQueryOne

func GetQueryOne(req *http.Request, name string) string

func NewWorkerSchema

func NewWorkerSchema(s Switcher) schema.Worker

func ResponseJson

func ResponseJson(w http.ResponseWriter, v interface{})

func ResponseMsg

func ResponseMsg(w http.ResponseWriter, code int, message string)

func ResponseYaml

func ResponseYaml(w http.ResponseWriter, v interface{})

Types

type Config

type Config struct {
	Switcher Switcher
}

func (Config) List

func (c Config) List(w http.ResponseWriter, r *http.Request)

func (Config) Reload

func (c Config) Reload(w http.ResponseWriter, r *http.Request)

func (Config) Router

func (c Config) Router(router *mux.Router)

func (Config) Save

func (c Config) Save(w http.ResponseWriter, r *http.Request)

type Device

type Device struct {
}

func (Device) Get

func (h Device) Get(w http.ResponseWriter, r *http.Request)

func (Device) List

func (h Device) List(w http.ResponseWriter, r *http.Request)

func (Device) Router

func (h Device) Router(router *mux.Router)

type Esp

type Esp struct {
	Switcher Switcher
}

func (Esp) List

func (l Esp) List(w http.ResponseWriter, r *http.Request)

func (Esp) Router

func (l Esp) Router(router *mux.Router)

type EspPolicy

type EspPolicy struct {
	Switcher Switcher
}

func (EspPolicy) List

func (l EspPolicy) List(w http.ResponseWriter, r *http.Request)

func (EspPolicy) Router

func (l EspPolicy) Router(router *mux.Router)

type EspState

type EspState struct {
	Switcher Switcher
}

func (EspState) List

func (l EspState) List(w http.ResponseWriter, r *http.Request)

func (EspState) Router

func (l EspState) Router(router *mux.Router)

type Lease

type Lease struct {
}

func (Lease) List

func (l Lease) List(w http.ResponseWriter, r *http.Request)

func (Lease) Router

func (l Lease) Router(router *mux.Router)
type Link struct {
	Switcher Switcher
}

func (Link) Get

func (h Link) Get(w http.ResponseWriter, r *http.Request)

func (Link) List

func (h Link) List(w http.ResponseWriter, r *http.Request)

func (Link) Router

func (h Link) Router(router *mux.Router)

type Log

type Log struct {
}

func (Log) Add

func (l Log) Add(w http.ResponseWriter, r *http.Request)

func (Log) List

func (l Log) List(w http.ResponseWriter, r *http.Request)

func (Log) Router

func (l Log) Router(router *mux.Router)

type Neighbor

type Neighbor struct {
}

func (Neighbor) List

func (h Neighbor) List(w http.ResponseWriter, r *http.Request)

func (Neighbor) Router

func (h Neighbor) Router(router *mux.Router)

type Network

type Network struct {
}

func (Network) Get

func (h Network) Get(w http.ResponseWriter, r *http.Request)

func (Network) List

func (h Network) List(w http.ResponseWriter, r *http.Request)

func (Network) Profile

func (h Network) Profile(w http.ResponseWriter, r *http.Request)

func (Network) Router

func (h Network) Router(router *mux.Router)

type OnLine

type OnLine struct {
}

func (OnLine) List

func (h OnLine) List(w http.ResponseWriter, r *http.Request)

func (OnLine) Router

func (h OnLine) Router(router *mux.Router)

type PProf

type PProf struct {
}

func (PProf) Add

func (h PProf) Add(w http.ResponseWriter, r *http.Request)

func (PProf) Get

func (h PProf) Get(w http.ResponseWriter, r *http.Request)

func (PProf) Router

func (h PProf) Router(router *mux.Router)

type Point

type Point struct {
}

func (Point) Get

func (h Point) Get(w http.ResponseWriter, r *http.Request)

func (Point) List

func (h Point) List(w http.ResponseWriter, r *http.Request)

func (Point) Router

func (h Point) Router(router *mux.Router)

type Server

type Server struct {
	Switcher Switcher
}

func (Server) List

func (l Server) List(w http.ResponseWriter, r *http.Request)

func (Server) Router

func (l Server) Router(router *mux.Router)

type Switcher

type Switcher interface {
	UUID() string
	UpTime() int64
	Alias() string
	Config() *config.Switch
	Server() libol.SocketServer
	Reload()
	Save()
}

type User

type User struct {
}

func (User) Add

func (h User) Add(w http.ResponseWriter, r *http.Request)

func (User) Check

func (h User) Check(w http.ResponseWriter, r *http.Request)

func (User) Del

func (h User) Del(w http.ResponseWriter, r *http.Request)

func (User) Get

func (h User) Get(w http.ResponseWriter, r *http.Request)

func (User) List

func (h User) List(w http.ResponseWriter, r *http.Request)

func (User) Router

func (h User) Router(router *mux.Router)

type VPNClient

type VPNClient struct {
}

func (VPNClient) List

func (h VPNClient) List(w http.ResponseWriter, r *http.Request)

func (VPNClient) Router

func (h VPNClient) Router(router *mux.Router)

type Version

type Version struct {
}

func (Version) List

func (l Version) List(w http.ResponseWriter, r *http.Request)

func (Version) Router

func (l Version) Router(router *mux.Router)

type VxLAN

type VxLAN struct {
	Switcher Switcher
}

func (VxLAN) List

func (l VxLAN) List(w http.ResponseWriter, r *http.Request)

func (VxLAN) Router

func (l VxLAN) Router(router *mux.Router)

Jump to

Keyboard shortcuts

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