Versions in this module Expand all Collapse all v0 v0.2.0 May 25, 2024 Changes in this version + type Api struct + func New(opts ...Option) *Api + func (api *Api) Finish() error + func (api *Api) Options() Options + func (api *Api) PrefixRouter() Router + func (api *Api) RootRouter() Router + func (api *Api) Start() error + type Context struct + func (c *Context) GetFileHeaderBytes(fileHeader *multipart.FileHeader) (string, []byte, error) + type Handler func(c *Context) + type Option func(options *Options) + func WithPort(port string) Option + func WithUrlPrefix(urlPrefix string) Option + type Options struct + func (options Options) GetPort() string + func (options Options) GetUrlPrefix() string + type PrefixRouter struct + func (r *PrefixRouter) AddMiddlewares(middlewares ...Handler) Router + func (r *PrefixRouter) AddRoute(method string, relativePath string, middlewares ...Handler) Router + func (r *PrefixRouter) BasePath() string + func (r *PrefixRouter) RegisterVersionedRouter(version string, middlewares ...Handler) Router + func (r *PrefixRouter) Static(relativePath string, root string) + func (r *PrefixRouter) StaticFile(relativePath string, filepath string) + func (r *PrefixRouter) VersionedRouter(version string) Router + type RootRouter struct + func (r *RootRouter) AddMiddlewares(middlewares ...Handler) Router + func (r *RootRouter) AddRoute(method string, relativePath string, middlewares ...Handler) Router + func (r *RootRouter) BasePath() string + func (r *RootRouter) RegisterVersionedRouter(version string, middlewares ...Handler) Router + func (r *RootRouter) ServerHttp(w http.ResponseWriter, req *http.Request) + func (r *RootRouter) Static(relativePath string, root string) + func (r *RootRouter) StaticFile(relativePath string, filepath string) + func (r *RootRouter) VersionedRouter(version string) Router + type Router interface + AddMiddlewares func(middlewares ...Handler) Router + AddRoute func(method string, relativePath string, middlewares ...Handler) Router + BasePath func() string + RegisterVersionedRouter func(version string, middlewares ...Handler) Router + Static func(relativePath string, root string) + StaticFile func(relativePath string, filepath string) + VersionedRouter func(version string) Router