server

package
v0.0.0-...-27252fe Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicAuth

type BasicAuth struct {
	Username string
	Password string
}

type Handler

type Handler interface {
	Register(group *gin.RouterGroup) error
}

type HealthCheck

type HealthCheck = func() error

type Server

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

func NewServer

func NewServer(engine *gin.Engine, options []ServerOption) *Server

func (*Server) Register

func (s *Server) Register(path string, handler Handler) error

func (*Server) Start

func (s *Server) Start() error

type ServerOption

type ServerOption func(s *Server) error

func WithBasicAuth

func WithBasicAuth(auth BasicAuth) ServerOption

func WithGZIP

func WithGZIP() ServerOption

func WithLogging

func WithLogging(logger *zap.Logger) ServerOption

func WithPort

func WithPort(port int) ServerOption

func WithProfiling

func WithProfiling() ServerOption

func WithRecovery

func WithRecovery() ServerOption

Directories

Path Synopsis
vulnr
v1

Jump to

Keyboard shortcuts

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