Versions in this module Expand all Collapse all v0 v0.0.5 Nov 28, 2024 v0.0.4 Nov 28, 2024 v0.0.3 Aug 10, 2024 v0.0.2 Aug 9, 2024 v0.0.1 Aug 8, 2024 Changes in this version + type Config struct + APIRoot string + ApiServers []OpenAPIServer + ApiTitle string + ApiVersion string + EnableCORS bool + GinMode string + HttpPort int + Log bool + StaticRoutes []StaticRoute + func (c *Config) NewServer() *Server + func (g *Config) NewEngine() (*gin.Engine, gin.IRouter) + func (g *Config) NewOpenAPI() *openapi.Openapi + func (g *Config) TryServeFiles(sr StaticRoute) gin.HandlerFunc + type ConfigSection string + const DefaultConfigSection + type Handler struct + Handler func(c *gin.Context) + Request Request + Response Response + type OpenAPIServer struct + Description string + Url string + type Request struct + Description string + Form any + Json any + Query any + Xml any + type Response struct + Description string + Json any + Xml any + type Route struct + Description string + Handler Handler + Method string + Path string + Security Security + Summary string + func (r Route) Use(h Security) Route + type Security interface + Auth func(c *gin.Context) + SecurityScheme func() []map[string][]string + type Server struct + API *openapi.Openapi + APIRouter gin.IRouter + Engine *gin.Engine + Port int + func GetServer(c *ioc.Container) *Server + func GetServerByConfig(configSection ConfigSection, c *ioc.Container) *Server + func (s *Server) Register(services ...*Service) + func (s *Server) Run(ctx context.Context) + func (s *Server) SetSecuritySchemes(schemes openapi.SecuritySchemes) + type Service struct + Description string + Path string + Routes []Route + Tag string + type StaticRoute struct + Dir string + NotFound string + Route string