server

package
v0.0.0-...-7abf5e3 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package server contains the server functions

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrCertFileMissing is returned when https is enabled but no cert file is provided
	ErrCertFileMissing = errors.New("no cert file found")

	// ErrKeyFileMissing is returned when https is enabled but no key file is provided
	ErrKeyFileMissing = errors.New("no key file found")
)

Functions

func GetCertFiles

func GetCertFiles(certFile, keyFile string) (string, string, error)

GetCertFiles for https enabled echo server and ensure the values are set

Types

type Server

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

func NewServer

func NewServer(c config.Config, l *zap.SugaredLogger) *Server

NewServer returns a new Server configuration

func (*Server) AddHandler

func (s *Server) AddHandler(r handler)

AddHandler provides the ability to add additional HTTP handlers that process requests. The handler that is provided should have a Routes(*echo.Group) function, which allows the routes to be added to the server.

func (*Server) GetFuncs

func (s *Server) GetFuncs(routes echo.Routes)

func (*Server) StartEchoServer

func (s *Server) StartEchoServer(ctx context.Context) error

StartEchoServer creates and starts the echo server with configured middleware and handlers

Jump to

Keyboard shortcuts

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