app

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Addr

type Addr struct {
	IP   string
	Port int
}

func (*Addr) String

func (a *Addr) String() string

type App

type App struct {
	// contains filtered or unexported fields
}

func New

func New(options ...AppOption) *App

func (*App) DELETE

func (a *App) DELETE(path string, h http.HandlerFunc)

func (*App) GET

func (a *App) GET(path string, h http.HandlerFunc)

func (*App) HEAD

func (a *App) HEAD(path string, h http.HandlerFunc)

func (*App) POST

func (a *App) POST(path string, h http.HandlerFunc)

func (*App) PUT

func (a *App) PUT(path string, h http.HandlerFunc)

func (*App) RegisteGrpcService

func (a *App) RegisteGrpcService(desc *grpc.ServiceDesc, s any)

func (*App) Run

func (a *App) Run()

type AppOption

type AppOption func(aos *AppOptions)

func WihtGrpcWeb

func WihtGrpcWeb(open bool) AppOption

func WithAddr

func WithAddr(ip string, p int) AppOption

func WithCorsOptions

func WithCorsOptions(opt *cors.Options) AppOption

func WithPromAddr

func WithPromAddr(ip string, p int) AppOption

func WithSlogConfig

func WithSlogConfig(l *SLogConfig) AppOption

func WithTLSConfig

func WithTLSConfig(c *TLSConfig) AppOption

type AppOptions

type AppOptions struct {
	// contains filtered or unexported fields
}

type SLogConfig

type SLogConfig struct {
	Level      slog.Level
	JSONOutPut bool
	AddSource  bool
}

type TLSConfig

type TLSConfig struct {
	Addr
	KeyPath  string
	CertPath string
}

Jump to

Keyboard shortcuts

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