Versions in this module Expand all Collapse all v0 v0.3.1 Mar 15, 2025 v0.3.0 Mar 15, 2025 Changes in this version type Config + func (c *Config) GetAddr() string + func (c *Config) GetEndpoint() string v0.2.3 Mar 14, 2025 v0.2.2 Mar 14, 2025 v0.2.1 Mar 14, 2025 Changes in this version type Config + Auth auth.Config + func (s *Config) WithAuth(v auth.Config) *Config v0.2.0 Mar 7, 2025 v0.1.1 Mar 7, 2025 v0.1.0 Feb 14, 2025 Changes in this version + func AuthMw(apikeys ...string) func(*gin.Context) + func CaptchaCheck(uuid, code string) bool + func CaptchaHandler(c *gin.Context) + func ErrCodeHandler(c *gin.Context) + func FlagSet(defaultPort int) *pflag.FlagSet + func LogMw(c *gin.Context) + func LogoutHandler(c *gin.Context) + func New(conf *Config, routers Routers, mwBefore, mwAfter []gin.HandlerFunc) (*http.Server, error) + type Config struct + Addr string + Debug bool + Endpoint string + Headers []string + Metrics bool + Origins []string + Port int + Pprof bool + Prefix string + RequestID bool + Store StoreConfig + System string + func (s *Config) Commit() string + func (s *Config) Version() string + func (s *Config) WithAddr(v string) *Config + func (s *Config) WithCommit(v string) *Config + func (s *Config) WithDebug(v bool) *Config + func (s *Config) WithEndpoint(v string) *Config + func (s *Config) WithHeaders(v []string) *Config + func (s *Config) WithMetrics(v bool) *Config + func (s *Config) WithOrigins(v []string) *Config + func (s *Config) WithPort(v int) *Config + func (s *Config) WithPprof(v bool) *Config + func (s *Config) WithPrefix(v string) *Config + func (s *Config) WithRequestID(v bool) *Config + func (s *Config) WithStore(v StoreConfig) *Config + func (s *Config) WithSystem(v string) *Config + func (s *Config) WithVersion(v string) *Config + type Controller interface + Authed func(*gin.RouterGroup) + UnAuth func(*gin.RouterGroup) + type RegisterFunc func(*gin.RouterGroup) + type Routers []RegisterFunc + func (rs *Routers) Register(f RegisterFunc) + func (rs Routers) Apply(g *gin.RouterGroup) + type StoreConfig struct + Addr string + DB int + Enabled bool + Pass string + Port int + func (s *StoreConfig) WithAddr(v string) *StoreConfig + func (s *StoreConfig) WithDB(v int) *StoreConfig + func (s *StoreConfig) WithEnabled(v bool) *StoreConfig + func (s *StoreConfig) WithPass(v string) *StoreConfig + func (s *StoreConfig) WithPort(v int) *StoreConfig