Documentation
¶
Index ¶
- Variables
- func GetManager() *manager
- func NewAddGroupToNilServerErr(name string) error
- func NewAddRouteToNilServerErr(route string) error
- func NewAttachErrorHandlerToNilServerErr(serverNames ...string) error
- func NewCreateServerErr(err error) error
- func NewFromMultipleServerErr() error
- func NewFromNilServerErr() error
- func NewGetRouteByNameErr(name string) error
- func NewGroupRouteNotExistErr(name string) error
- func NewNotImplementedErr() error
- func NewNotSupportedHttpMethodErr(method string) error
- func NewShutdownServerErr(err error) error
- func NewStartServerErr(addr string, err error) error
- func NewUpdateServerConfigErr(err error) error
- type AddGroupToNilServerErr
- type AddRouteToNilServerErr
- type AttachErrorHandlerToNilServerErr
- type CreateServerErr
- type FromMultipleServerErr
- type FromNilServerErr
- type GetRouteByNameErr
- type GinServer
- func (s *GinServer) AddGroup(groupName string, f gin.HandlerFunc, groups ...string) error
- func (s *GinServer) AddRoute(method string, path string, f func(c *gin.Context), routeName string, ...) error
- func (s *GinServer) AddRouteWithMultiHandlers(method string, path string, f []func(c *gin.Context), routeName string, ...) error
- func (s *GinServer) AttachErrorHandler(f func(ctx *gin.Context, err any))
- func (s *GinServer) GetAllRoutes() gin.RoutesInfo
- func (s *GinServer) Start() error
- func (s *GinServer) Stop() error
- func (s *GinServer) UpdateConfigs(config types.GinServerConfig, rawConfig map[string]interface{}) error
- type GroupRouteNotExistErr
- type NotImplementedErr
- type NotSupportedHttpMethodErr
- type ShutdownServerErr
- type StartServerErr
- type UpdateServerConfigErr
Constants ¶
This section is empty.
Variables ¶
var (
HttpServerMaintenanceType = logTypes.NewLogType("HTTP_SERVER_MAINTENANCE")
)
Functions ¶
func GetManager ¶
func GetManager() *manager
GetManager - This function returns singleton instance of Logger Manager
func NewAddGroupToNilServerErr ¶
NewAddGroupToNilServerErr - return a new instance of AddGroupToNilServerErr
func NewAddRouteToNilServerErr ¶
NewAddRouteToNilServerErr - return a new instance of AddRouteToNilServerErr
func NewAttachErrorHandlerToNilServerErr ¶
NewAttachErrorHandlerToNilServerErr - return a new instance of AttachErrorHandlerToNilServerErr
func NewCreateServerErr ¶
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 ¶
NewGetRouteByNameErr - return a new instance of GetRouteByNameErr
func NewGroupRouteNotExistErr ¶
NewGroupRouteNotExistErr - return a new instance of GroupRouteNotExistErr
func NewNotImplementedErr ¶
func NewNotImplementedErr() error
NewNotImplementedErr - return a new instance of NotImplementedErr
func NewNotSupportedHttpMethodErr ¶
NewNotSupportedHttpMethodErr - return a new instance of NotSupportedHttpMethodErr
func NewShutdownServerErr ¶
NewShutdownServerErr - return a new instance of StartServerErr
func NewStartServerErr ¶
NewStartServerErr - return a new instance of StartServerErr
func NewUpdateServerConfigErr ¶
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 ¶
func (err *AttachErrorHandlerToNilServerErr) Error() string
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) 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 ¶
AttachErrorHandler - attach a custom error handler to the server
func (*GinServer) GetAllRoutes ¶
func (s *GinServer) GetAllRoutes() gin.RoutesInfo
GetAllRoutes - Get all Routes
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 ¶
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