http

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2025 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HttpServerMaintenanceType = logTypes.NewLogType("HTTP_SERVER_MAINTENANCE")
)

Functions

func GetManager

func GetManager() *manager

GetManager - This function returns singleton instance of Logger Manager

func NewAddGroupToNilServerErr

func NewAddGroupToNilServerErr(name string) error

NewAddGroupToNilServerErr - return a new instance of AddGroupToNilServerErr

func NewAddRouteToNilServerErr

func NewAddRouteToNilServerErr(route string) error

NewAddRouteToNilServerErr - return a new instance of AddRouteToNilServerErr

func NewAttachErrorHandlerToNilServerErr

func NewAttachErrorHandlerToNilServerErr(serverNames ...string) error

NewAttachErrorHandlerToNilServerErr - return a new instance of AttachErrorHandlerToNilServerErr

func NewCreateServerErr

func NewCreateServerErr(err error) error

NewCreateServerErr - return a new instance of CreateServerErr

func NewFromMultipleServerErr

func NewFromMultipleServerErr() error

NewFromMultipleServerErr - return a new instance of FromMultipleServerErr

func NewFromNilServerErr

func NewFromNilServerErr() error

NewFromNilServerErr - return a new instance of FromNilServerErr

func NewGetRouteByNameErr

func NewGetRouteByNameErr(name string) error

NewGetRouteByNameErr - return a new instance of GetRouteByNameErr

func NewGroupRouteNotExistErr

func NewGroupRouteNotExistErr(name string) error

NewGroupRouteNotExistErr - return a new instance of GroupRouteNotExistErr

func NewNotImplementedErr

func NewNotImplementedErr() error

NewNotImplementedErr - return a new instance of NotImplementedErr

func NewNotSupportedHttpMethodErr

func NewNotSupportedHttpMethodErr(method string) error

NewNotSupportedHttpMethodErr - return a new instance of NotSupportedHttpMethodErr

func NewShutdownServerErr

func NewShutdownServerErr(err error) error

NewShutdownServerErr - return a new instance of StartServerErr

func NewStartServerErr

func NewStartServerErr(addr string, err error) error

NewStartServerErr - return a new instance of StartServerErr

func NewUpdateServerConfigErr

func NewUpdateServerConfigErr(err error) error

NewUpdateServerConfigErr - return a new instance of UpdateServerConfigErr

Types

type AddGroupToNilServerErr

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

AddGroupToNilServerErr Error

func (*AddGroupToNilServerErr) Error

func (err *AddGroupToNilServerErr) Error() string

Error method - satisfying error interface

type AddRouteToNilServerErr

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

AddRouteToNilServerErr Error

func (*AddRouteToNilServerErr) Error

func (err *AddRouteToNilServerErr) Error() string

Error method - satisfying error interface

type AttachErrorHandlerToNilServerErr

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

AttachErrorHandlerToNilServerErr Error

func (*AttachErrorHandlerToNilServerErr) Error

Error method - satisfying error interface

type CreateServerErr

type CreateServerErr struct {
	Err error
}

CreateServerErr Error

func (*CreateServerErr) Error

func (err *CreateServerErr) Error() string

Error method - satisfying error interface

type FromMultipleServerErr

type FromMultipleServerErr struct {
}

FromMultipleServerErr Error

func (*FromMultipleServerErr) Error

func (err *FromMultipleServerErr) Error() string

Error method - satisfying error interface

type FromNilServerErr

type FromNilServerErr struct {
}

FromNilServerErr Error

func (*FromNilServerErr) Error

func (err *FromNilServerErr) Error() string

Error method - satisfying error interface

type GetRouteByNameErr

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

GetRouteByNameErr Error

func (*GetRouteByNameErr) Error

func (err *GetRouteByNameErr) Error() string

Error method - satisfying error interface

type GinServer

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

GinServer struct

func NewGinServer

func NewGinServer(name string, config types.GinServerConfig, rawConfig map[string]interface{}) (*GinServer, error)

NewGinServer - create a new instance of Server and return it

func (*GinServer) AddGroup

func (s *GinServer) AddGroup(groupName string, f gin.HandlerFunc, groups ...string) error

func (*GinServer) AddRoute

func (s *GinServer) AddRoute(method string, path string, f func(c *gin.Context), routeName string, versions []string, groups []string) error

func (*GinServer) AddRouteWithMultiHandlers

func (s *GinServer) AddRouteWithMultiHandlers(method string, path string, f []func(c *gin.Context), routeName string, versions []string, groups []string) error

AddRouteWithMultiHandlers - add a route to the server

func (*GinServer) AttachErrorHandler

func (s *GinServer) AttachErrorHandler(f func(ctx *gin.Context, err any))

AttachErrorHandler - attach a custom error handler to the server

func (*GinServer) GetAllRoutes

func (s *GinServer) GetAllRoutes() gin.RoutesInfo

GetAllRoutes - Get all Routes

func (*GinServer) Start

func (s *GinServer) Start() error

Start - start the server and listen to provided address

func (*GinServer) Stop

func (s *GinServer) Stop() error

Stop - stop the server

func (*GinServer) UpdateConfigs

func (s *GinServer) UpdateConfigs(config types.GinServerConfig, rawConfig map[string]interface{}) error

type GroupRouteNotExistErr

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

GroupRouteNotExistErr Error

func (*GroupRouteNotExistErr) Error

func (err *GroupRouteNotExistErr) Error() string

Error method - satisfying error interface

type NotImplementedErr

type NotImplementedErr struct {
}

NotImplementedErr Error

func (*NotImplementedErr) Error

func (err *NotImplementedErr) Error() string

Error method - satisfying error interface

type NotSupportedHttpMethodErr

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

NotSupportedHttpMethodErr Error

func (*NotSupportedHttpMethodErr) Error

func (err *NotSupportedHttpMethodErr) Error() string

Error method - satisfying error interface

type ShutdownServerErr

type ShutdownServerErr struct {
	Err error
}

ShutdownServerErr Error

func (*ShutdownServerErr) Error

func (err *ShutdownServerErr) Error() string

Error method - satisfying error interface

type StartServerErr

type StartServerErr struct {
	Err           error
	ListenAddress string
}

StartServerErr Error

func (*StartServerErr) Error

func (err *StartServerErr) Error() string

Error method - satisfying error interface

type UpdateServerConfigErr

type UpdateServerConfigErr struct {
	Err error
}

UpdateServerConfigErr Error

func (*UpdateServerConfigErr) Error

func (err *UpdateServerConfigErr) Error() string

Error method - satisfying error interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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