Documentation
¶
Index ¶
- func APIGroupParam(f any) any
- func AsAPI(f any) any
- func AsService(f any) any
- type API
- type APIContextType
- type EndpointAudit
- type Params
- type RouteRegister
- func (r *RouteRegister) DELETE(router gin.IRouter, relativePath string, handler gin.HandlerFunc, ...)
- func (r *RouteRegister) GET(router gin.IRouter, relativePath string, handler gin.HandlerFunc, ...)
- func (r *RouteRegister) PATCH(router gin.IRouter, relativePath string, handler gin.HandlerFunc, ...)
- func (r *RouteRegister) POST(router gin.IRouter, relativePath string, handler gin.HandlerFunc, ...)
- func (r *RouteRegister) PUT(router gin.IRouter, relativePath string, handler gin.HandlerFunc, ...)
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APIGroupParam ¶
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
func NewAdminDashboardAPI ¶
func NewAuthAPI ¶
func NewInternalAPI ¶
func NewPublicAPI ¶
func NewRunnerAPI ¶
type APIContextType ¶
type APIContextType string
const ( APIContextTypePublic APIContextType = "public" APIContextTypeRunner APIContextType = "runner" APIContextTypeInternal APIContextType = "internal" )
func (APIContextType) String ¶
func (a APIContextType) String() string
type EndpointAudit ¶
type EndpointAudit struct {
// map to hold deprecated endpoints
// format: method_name_path (e.g., GET_public_/v1/old-endpoint)
Routes map[string]struct{}
}
func NewEndpointAudit ¶
func NewEndpointAudit() *EndpointAudit
func (*EndpointAudit) Add ¶
func (d *EndpointAudit) Add(method, name, path string)
func (*EndpointAudit) IsDeprecated ¶
func (d *EndpointAudit) IsDeprecated(method, name, path string) bool
type Params ¶
type Params struct {
fx.In
LC fx.Lifecycle
Shutdowner fx.Shutdowner
Services []Service `group:"services"`
Middlewares []middlewares.Middleware `group:"middlewares"`
L *zap.Logger
Cfg *internal.Config
DB *gorm.DB `name:"psql"`
EndpointAudit *EndpointAudit
}
type RouteRegister ¶
type RouteRegister struct {
EndpointAudit *EndpointAudit
}
func (*RouteRegister) DELETE ¶
func (r *RouteRegister) DELETE(router gin.IRouter, relativePath string, handler gin.HandlerFunc, context APIContextType, deprecated bool)
func (*RouteRegister) GET ¶
func (r *RouteRegister) GET(router gin.IRouter, relativePath string, handler gin.HandlerFunc, context APIContextType, deprecated bool)
func (*RouteRegister) PATCH ¶
func (r *RouteRegister) PATCH(router gin.IRouter, relativePath string, handler gin.HandlerFunc, context APIContextType, deprecated bool)
func (*RouteRegister) POST ¶
func (r *RouteRegister) POST(router gin.IRouter, relativePath string, handler gin.HandlerFunc, context APIContextType, deprecated bool)
func (*RouteRegister) PUT ¶
func (r *RouteRegister) PUT(router gin.IRouter, relativePath string, handler gin.HandlerFunc, context APIContextType, deprecated bool)
Click to show internal directories.
Click to hide internal directories.