api

package
v0.0.0-...-813d602 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2026 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfSockFile   = "unix:/var/openlan/confd/confd.sock"
	ConfDatabase   = "OpenLAN_Switch"
	AdminTokenFile = "/etc/openlan/switch/token"
)

Variables

View Source
var (
	Version  = "v5"
	Url      = "https://localhost:10000"
	Token    = ""
	Server   = ConfSockFile
	Database = ConfDatabase
	Verbose  = false
)

Functions

func GetEnv

func GetEnv(key, value string) string

func GetUser

func GetUser(name string) string

func Out

func Out(data interface{}, format string, tmpl string) error

func OutJson

func OutJson(data interface{}) error

func OutTable

func OutTable(data interface{}, tmpl string) error

func OutYaml

func OutYaml(data interface{}) error

func SplitName

func SplitName(name string) (string, string)

func SplitSocket

func SplitSocket(value string) (string, string)

Types

type App

type App struct {
	Before func(c *cli.Context) error
	After  func(c *cli.Context) error
	// contains filtered or unexported fields
}

func (*App) Command

func (a *App) Command(cmd *cli.Command)

func (*App) Flags

func (a *App) Flags() []cli.Flag

func (*App) New

func (a *App) New() *cli.App

func (*App) Run

func (a *App) Run(args []string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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