server

package
v0.0.0-...-102e137 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ServerPort            string
	ServerHost            string
	ServerReadTimeout     time.Duration
	ServerWriteTimeout    time.Duration
	IsReleaseMode         bool
	ServerAllowOrigins    []string
	ServerLogPath         string
	ServerShutdownTimeout time.Duration
}

Config is the admin configuration struct.

func NewConfig

func NewConfig() *Config

NewConfig returns the configuration object.

type InfoLogger

type InfoLogger interface {
	Infof(format string, args ...interface{})
}

InfoLogger logs errors.

type Router

type Router interface {
	BindRoutes(e *gin.Engine)
}

Router is the router interface.

type Server

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

Server is the HTTP server structure.

func NewServer

func NewServer(router Router, l InfoLogger, s *session.Session) *Server

NewServer returns a new server object.

func (*Server) Run

func (s *Server) Run(ctx context.Context, _ []string)

Run runs the server.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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