Versions in this module Expand all Collapse all v0 v0.2.2098 Aug 12, 2025 Changes in this version type Dependency + HealthCheck func(ctx context.Context) *DependencyStats + type DependencyStats struct + Additional any + PINGLatencyHuman string + PINGLatencyMillis int64 + PINGResponse any + UptimeHuman string + UptimeSeconds float64 v0.1.0 Aug 4, 2025 Changes in this version + const CONFIG_USED_KEY + const CTX_TRACE_ID + const HTTP_CONTEXT_AUTH + const HTTP_CONTEXT_TRACE_ID + const HTTP_HEADER_TRACE_ID + var ErrHttpValidatorNotRegistered = errors.New("validator not registered") + func ContextFromHttp(c HttpContext) (ctx context.Context) + func ContextGetTraceID(ctx context.Context) string + func HttpHanlderChain(h HttpHandlerable) *httpHandlerChainImpl[HttpRequestPayload] + func HttpHanlderChainWithPayload[T HttpRequestPayload](h HttpHandlerableWithPayload[T]) *httpHandlerChainImpl[T] + func SliceRemoveItems[T comparable](src, target []T) []T + func StringAlphaNumRandom(length uint8) (string, error) + func StringIsFirstCharNonAlphabet(s string) bool + func StringRemoveNonAlphabet(s string) string + func StringToCammelCase(s string) string + func StringToSnakeCase(s string) string + func ValidationIsEmpty[T Validatable](s T) bool + type ApiResponse interface + ClientError func(status HttpResponseClientError, err error) ApiResponse + Error func(err error) ApiResponse + Response func() error + ServerError func(status HttpResponseServerError, err error) ApiResponse + Success func(status HttpResponseSuccess, data ...any) ApiResponse + WithAdditional func(data any) ApiResponse + WithCode func(code any) ApiResponse + WithMessage func(msg string) ApiResponse + type ApiResponseDefault struct + Code string + Data any + Error any + Success bool + type ApiResponseInterface interface + New func(c HttpContext) ApiResponse + type App struct + Config *Config + func New() *App + func (a *App) Logger() *logger + func (app *App) LoadModule(loader ModuleLoader) + func (app *App) SetApiResponseInterface(iApiResponse ApiResponseInterface) + func (app *App) SetHttpMiddleware(middlewares ...HttpMiddleware) + func (app *App) SetHttpRoutes(fn func(router *HttpRouter)) + func (app *App) SetHttpValidator(validator HttpValidator) + func (app *App) Start(supervisor ...Supervisor) + type Config struct + AppContainerized bool + AppName string + AppProduction bool + HTTPAutoTLS bool + HTTPCertPath string + HTTPKeyPath string + HTTPPort int + LogJSON bool + LogLevel LogLevel + LogShowSource bool + ShutdownTimeout int + type Dependency interface + Close func() error + IsReady func() bool + Name func() string + Open func() error + Priority func() int + type HttpContext interface + Api func() ApiResponse + Attachment func(file string, name string) error + Bind func(i any) error + Blob func(code int, contentType string, b []byte) error + Cookie func(name string) (*http.Cookie, error) + Cookies func() []*http.Cookie + Error func(err error) + File func(file string) error + FormFile func(name string) (*multipart.FileHeader, error) + FormParams func() (url.Values, error) + FormValue func(name string) string + Get func(key string) any + HTML func(code int, html string) error + HTMLBlob func(code int, b []byte) error + Inline func(file string, name string) error + IsTLS func() bool + IsWebSocket func() bool + JSON func(code int, i any) error + JSONBlob func(code int, b []byte) error + JSONP func(code int, callback string, i any) error + JSONPBlob func(code int, callback string, b []byte) error + JSONPretty func(code int, i any, indent string) error + Log func() *logger + MultipartForm func() (*multipart.Form, error) + NoContent func(code int) error + Param func(name string) string + ParamNames func() []string + ParamValues func() []string + Path func() string + QueryParam func(name string) string + QueryParams func() url.Values + QueryString func() string + RealIP func() string + Redirect func(code int, url string) error + Render func(code int, name string, data any) error + Request func() *http.Request + Reset func(r *http.Request, w http.ResponseWriter) + Response func() *echo.Response + Scheme func() string + Set func(key string, val any) + SetCookie func(cookie *http.Cookie) + SetParamNames func(names ...string) + SetParamValues func(values ...string) + SetPath func(p string) + SetRequest func(r *http.Request) + SetResponse func(r *echo.Response) + Stream func(code int, contentType string, r io.Reader) error + String func(code int, s string) error + TraceID func() (val string) + Validate func(i any) error + ValidateRequest func(i any) *HttpValidatorErr + XML func(code int, i any) error + XMLBlob func(code int, b []byte) error + XMLPretty func(code int, i any, indent string) error + type HttpHandler func(c HttpContext) error + type HttpHandlerChain interface + HandlerWrapper func(c HttpContext) error + type HttpHandlerable HttpHandler + type HttpHandlerableWithPayload func(c HttpContext, p T) error + type HttpMiddleware func(next HttpHandler) HttpHandler + type HttpRequestPayload interface + Validate func() error + type HttpResponseClientError int + const HttpStatusBadRequest + const HttpStatusConflict + const HttpStatusForbidden + const HttpStatusGone + const HttpStatusMethodNotAllowed + const HttpStatusNotAcceptable + const HttpStatusNotFound + const HttpStatusPaymentRequired + const HttpStatusProxyAuthRequired + const HttpStatusRequestTimeout + const HttpStatusUnauthorized + type HttpResponseRedirect int + const HttpStatusFound + const HttpStatusMovedPermanently + const HttpStatusNotModified + type HttpResponseServerError int + const HttpStatusBadGateway + const HttpStatusGatewayTimeout + const HttpStatusInternalServerError + const HttpStatusNotImplemented + const HttpStatusServiceUnavailable + type HttpResponseSuccess int + const HttpStatusAccepted + const HttpStatusCreated + const HttpStatusNoContent + const HttpStatusNonAuthoritativeInfo + const HttpStatusOK + const HttpStatusPartialContent + const HttpStatusResetContent + type HttpRouter struct + func (r *HttpRouter) Connect(path string, handler HttpHandlerChain[HttpRequestPayload], ...) + func (r *HttpRouter) Delete(path string, handler HttpHandlerChain[HttpRequestPayload], ...) + func (r *HttpRouter) Get(path string, handler HttpHandlerChain[HttpRequestPayload], ...) + func (r *HttpRouter) Group(prefix string, fn func(group *HttpRouter), middlewares ...HttpMiddleware) + func (r *HttpRouter) Head(path string, handler HttpHandlerChain[HttpRequestPayload], ...) + func (r *HttpRouter) Options(path string, handler HttpHandlerChain[HttpRequestPayload], ...) + func (r *HttpRouter) Patch(path string, handler HttpHandlerChain[HttpRequestPayload], ...) + func (r *HttpRouter) Post(path string, handler HttpHandlerChain[HttpRequestPayload], ...) + func (r *HttpRouter) Put(path string, handler HttpHandlerChain[HttpRequestPayload], ...) + func (r *HttpRouter) Trace(path string, handler HttpHandlerChain[HttpRequestPayload], ...) + type HttpValidator interface + Validate func(a any) *HttpValidatorErr + type HttpValidatorErr struct + ErrFormat error + ErrMandatory error + func (e *HttpValidatorErr) Close() + func (e *HttpValidatorErr) Error() string + type LogLevel string + const LOG_DEBUG + const LOG_ERROR + const LOG_INFO + const LOG_WARN + type Module interface + HttpRoutes func(app *App) + type ModuleLoader interface + Load func() []Module + type Numeric interface + type Responder interface + Encode func() + type Supervisor interface + ListenSignals func() []os.Signal + Run func(app *App) + type SupervisorGraceful struct + BinaryFilePath string + GracefulInterval int + GracefulRestartSignal os.Signal + HookStart func() + HookStop func() + Signals []os.Signal + func (s *SupervisorGraceful) ListenSignals() []os.Signal + func (s *SupervisorGraceful) Run(app *App) + type SupervisorNon struct + HookStart func() + HookStop func() + Signals []os.Signal + func (s *SupervisorNon) ListenSignals() []os.Signal + func (s *SupervisorNon) Run(app *App) + type Validatable interface