appapi

package
v0.3.8 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2025 License: MIT Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleFront added in v0.3.8

func HandleFront(mux *http.ServeMux)

func HandleFunc added in v0.3.8

func HandleFunc(mux *http.ServeMux, auth *Auth, path string, b func(http.ResponseWriter, *http.Request) error)

func RegisterHTTP added in v0.3.8

func RegisterHTTP(mux *http.ServeMux)

Types

type Auth added in v0.3.8

type Auth struct {
	Username [32]byte
	Password [32]byte
}

func NewAuth added in v0.3.8

func NewAuth(username, password string) *Auth

func (*Auth) Auth added in v0.3.8

func (a *Auth) Auth(password, username string) bool

func (*Auth) GrpcAuth added in v0.3.8

func (a *Auth) GrpcAuth() grpc.UnaryServerInterceptor

type Components

type Components struct {
	Mux *http.ServeMux
	*Start
	HttpListener net.Listener
	DB           *bbolt.DB

	Node           gn.NodeServer
	Tools          gt.ToolsServer
	Subscribe      gn.SubscribeServer
	Connections    gs.ConnectionsServer
	Inbound        gc.InboundServer
	Resolver       gc.ResolverServer
	RuleController gc.BypassServer
	Tag            gn.TagServer
}

func (*Components) Close

func (a *Components) Close() error

func (*Components) RegisterServer added in v0.3.8

func (app *Components) RegisterServer()

type Start

type Start struct {
	ConfigPath     string
	Host           string
	Auth           *Auth
	BypassConfig   pc.DB
	ResolverConfig pc.DB
	Setting        config.Setting

	ProcessDumper netapi.ProcessDumper
	GRPCServer    *grpc.Server
	// contains filtered or unexported fields
}

func (*Start) AddCloser

func (a *Start) AddCloser(name string, z io.Closer)

Jump to

Keyboard shortcuts

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