Documentation
¶
Index ¶
- type ApiController
- type App
- type BasePlugin
- type Constants
- type ContextSession
- type ContextUser
- type ContextWithSession
- type ContextWithoutSession
- type Handler
- type HandlerWithSession
- type HandlerWithoutSession
- type JwtPayload
- type PluginBaseConfig
- type RateLimitConfig
- type Route
- type RouteMetaData
- type WebsocketEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiController ¶
type App ¶
type App struct {
Db *sql.DB
Redis *cache.RedisClient
WapiClient *wapi.Client
Logger slog.Logger
Koa *koanf.Koanf
Fs stuffbin.FileSystem
Constants *Constants
CampaignManager *campaign_manager.CampaignManager
AiService *ai_service.AiService
}
type BasePlugin ¶
type Constants ¶
type Constants struct {
SiteName string `koanf:"site_name"`
RootURL string `koanf:"root_url"`
LogoURL string `koanf:"logo_url"`
FaviconURL string `koanf:"favicon_url"`
AdminUsername []byte `koanf:"admin_username"`
AdminPassword []byte `koanf:"admin_password"`
IsDevelopment bool
IsProduction bool
RedisEventChannelName string `koanf:"redis_event_channel_name"`
IsDebugModeEnabled bool
}
type ContextSession ¶
type ContextSession struct {
Token string `json:"token"`
User ContextUser `json:"user"`
}
type ContextUser ¶
type ContextWithSession ¶
type ContextWithSession struct {
echo.Context `json:",inline"`
App App `json:"app,omitempty"`
Session ContextSession `json:"session,omitempty"`
}
type ContextWithoutSession ¶
type HandlerWithSession ¶
type HandlerWithSession func(context ContextWithSession) error
type HandlerWithoutSession ¶
type HandlerWithoutSession func(context ContextWithoutSession) error
type JwtPayload ¶
type JwtPayload struct {
ContextUser `json:",inline"`
jwt.StandardClaims `json:",inline"`
}
type PluginBaseConfig ¶
type RateLimitConfig ¶
type Route ¶
type Route struct {
Path string `json:"path"`
Method string `json:"method"`
Handler Handler
IsAuthorizationRequired bool
MetaData RouteMetaData `json:"metaData"`
}
type RouteMetaData ¶
type RouteMetaData struct {
PermissionRoleLevel api_types.UserPermissionLevelEnum `json:"permissionRoleLevel"`
RequiredPermission []api_types.RolePermissionEnum `json:"requiredPermission"`
RateLimitConfig RateLimitConfig `json:"rateLimitConfig"`
}
type WebsocketEvent ¶
Click to show internal directories.
Click to hide internal directories.