Documentation
¶
Index ¶
- Constants
- func HashAspNetHash(password string, iterations int) (string, error)
- func MustResolveValue(val interface{}, scope *engine.Scope, name string) (interface{}, error)
- func RegisterAspNetSlots(eng *engine.Engine, dbMgr *dbmanager.DBManager)
- func RegisterAuthSlots(eng *engine.Engine, dbMgr *dbmanager.DBManager)
- func RegisterCacheSlots(eng *engine.Engine, rdb interface{})
- func RegisterCaptchaSlots(eng *engine.Engine, r *chi.Mux)
- func RegisterCollectionSlots(eng *engine.Engine)
- func RegisterContainerBridgeSlots(eng *engine.Engine, r chi.Router)
- func RegisterDBHookSlots(eng *engine.Engine)
- func RegisterDBSlots(eng *engine.Engine, dbMgr *dbmanager.DBManager)
- func RegisterFileSystemSlots(eng *engine.Engine)
- func RegisterFunctionSlots(eng *engine.Engine)
- func RegisterHTTPClientSlots(eng *engine.Engine)
- func RegisterHTTPServerSlots(eng *engine.Engine)
- func RegisterIPSecuritySlots(eng *engine.Engine)
- func RegisterImageSlots(eng *engine.Engine)
- func RegisterInertiaSlots(eng *engine.Engine)
- func RegisterJSONSlots(eng *engine.Engine)
- func RegisterJobSlots(eng *engine.Engine, queue worker.JobQueue, setConfig func([]string))
- func RegisterMailSlots(eng *engine.Engine)
- func RegisterMathSlots(eng *engine.Engine)
- func RegisterMetaSlots(eng *engine.Engine)
- func RegisterNetworkSlots(eng *engine.Engine)
- func RegisterORMSlots(eng *engine.Engine, dbMgr *dbmanager.DBManager)
- func RegisterRawDBSlots(eng *engine.Engine, dbMgr *dbmanager.DBManager)
- func RegisterRouterSlots(eng *engine.Engine, rootRouter *chi.Mux)
- func RegisterSSESlots(eng *engine.Engine)
- func RegisterSchemaSlots(eng *engine.Engine, dbMgr *dbmanager.DBManager)
- func RegisterSecuritySlots(eng *engine.Engine)
- func RegisterSessionSlots(eng *engine.Engine)
- func RegisterStorageSlots(eng *engine.Engine)
- func RegisterTestSlots(eng *engine.Engine)
- func RegisterTimeSlots(eng *engine.Engine)
- func RegisterTransactionSlots(eng *engine.Engine, dbMgr *dbmanager.DBManager)
- func RegisterUploadSlots(eng *engine.Engine)
- func RegisterUtilSlots(eng *engine.Engine)
- func RegisterValidatorSlots(eng *engine.Engine, dbMgr *dbmanager.DBManager)
- func VerifyAspNetHash(hashedPassword, providedPassword string) bool
- func WithTestStats(ctx context.Context, stats *TestStats) context.Context
- type ColumnDef
- type ForeignKeyDef
- type HookEvent
- type JoinDef
- type LocalStorageDriver
- func (l *LocalStorageDriver) Delete(ctx context.Context, path string) error
- func (l *LocalStorageDriver) Exists(ctx context.Context, path string) (bool, error)
- func (l *LocalStorageDriver) Put(ctx context.Context, path string, content []byte) error
- func (l *LocalStorageDriver) PutFromFile(ctx context.Context, path string, srcPath string) error
- type QueryState
- type S3StorageDriver
- func (s *S3StorageDriver) Delete(ctx context.Context, path string) error
- func (s *S3StorageDriver) Exists(ctx context.Context, path string) (bool, error)
- func (s *S3StorageDriver) Put(ctx context.Context, path string, content []byte) error
- func (s *S3StorageDriver) PutFromFile(ctx context.Context, path string, srcPath string) error
- type SQLExecutor
- type SchemaState
- type StorageDriver
- type TestStats
- type WhereCond
Constants ¶
const FlashSessionKeyPrefix = "_flash_"
FlashSessionKeyPrefix is the prefix for flash cookies
Variables ¶
This section is empty.
Functions ¶
func HashAspNetHash ¶
HashAspNetHash generates ASP.NET Identity V3 password hashes Format: 0x01 (1 byte) | Prf (4 bytes, SHA256=1) | IterCount (4 bytes) | SaltLen (4 bytes) | Salt | Subkey
func MustResolveValue ¶
MustResolveValue returns an error if the value is nil or not found. Useful for strict validation in slots.
func RegisterAspNetSlots ¶
RegisterAspNetSlots registers slots for ASP.NET Identity migration
func RegisterCacheSlots ¶
func RegisterCaptchaSlots ¶
RegisterCaptchaSlots mendaftarkan slot-slot captcha ke engine. Slot yang tersedia:
- captcha.new : Buat captcha baru dan simpan ID ke scope
- captcha.verify : Verifikasi jawaban user
- captcha.image : Tulis PNG captcha ke http.ResponseWriter
- captcha.serve : Daftarkan route handler bawaan captcha ke router
func RegisterCollectionSlots ¶
func RegisterContainerBridgeSlots ¶
RegisterContainerBridgeSlots mendaftarkan slot khusus untuk memanggil Container lain
func RegisterDBHookSlots ¶
RegisterDBHookSlots registers the db.hook slot
func RegisterFileSystemSlots ¶
func RegisterFunctionSlots ¶
RegisterFunctionSlots mendaftarkan slot 'fn' dan 'call' Mekanisme: 'fn' menyimpan *Node ke GLOBAL REGISTRY, 'call' mengeksekusinya.
func RegisterHTTPClientSlots ¶
func RegisterHTTPServerSlots ¶
func RegisterIPSecuritySlots ¶
func RegisterImageSlots ¶
func RegisterInertiaSlots ¶
RegisterInertiaSlots registers Inertia.js related slots
func RegisterJSONSlots ¶
func RegisterJobSlots ¶
func RegisterMailSlots ¶
func RegisterMathSlots ¶
func RegisterMetaSlots ¶
func RegisterNetworkSlots ¶
func RegisterSSESlots ¶
RegisterSSESlots registers Server-Sent Events slots
func RegisterSecuritySlots ¶
func RegisterSessionSlots ¶
RegisterSessionSlots registers session related slots
func RegisterStorageSlots ¶
func RegisterTestSlots ¶
func RegisterTimeSlots ¶
func RegisterUploadSlots ¶
func RegisterUtilSlots ¶
func RegisterValidatorSlots ¶
func VerifyAspNetHash ¶
VerifyAspNetHash verifies ASP.NET Identity V3 password hashes Format: 0x01 (1 byte) | Prf (1 byte) | IterCount (4 bytes) | SaltLen (4 bytes) | Salt | Subkey
Types ¶
type ForeignKeyDef ¶
type HookEvent ¶
type HookEvent string
const ( HookBeforeInsert HookEvent = "before_insert" HookAfterInsert HookEvent = "after_insert" HookBeforeUpdate HookEvent = "before_update" HookAfterUpdate HookEvent = "after_update" HookBeforeDelete HookEvent = "before_delete" HookAfterDelete HookEvent = "after_delete" HookBeforeSave HookEvent = "before_save" // insert + update HookAfterSave HookEvent = "after_save" // insert + update )
type LocalStorageDriver ¶
type LocalStorageDriver struct {
// contains filtered or unexported fields
}
LocalStorageDriver handles storage on the local filesystem.
func NewLocalStorageDriver ¶
func NewLocalStorageDriver() *LocalStorageDriver
func (*LocalStorageDriver) Delete ¶
func (l *LocalStorageDriver) Delete(ctx context.Context, path string) error
func (*LocalStorageDriver) PutFromFile ¶
type QueryState ¶
type QueryState struct {
Table string
Columns []string
Joins []JoinDef
Where []WhereCond
GroupBy []string
Having []WhereCond
Args []interface{}
Limit int
Offset int
OrderBy string
DBName string
Dialect dbmanager.Dialect
}
func (*QueryState) BuildSQL ¶
func (qs *QueryState) BuildSQL(queryType string) (string, []interface{})
func (*QueryState) Quote ¶
func (qs *QueryState) Quote(name string) string
type S3StorageDriver ¶
type S3StorageDriver struct {
// contains filtered or unexported fields
}
S3StorageDriver handles storage on AWS S3 or S3-compatible cloud storage (MinIO, R2, Spaces).
func NewS3StorageDriver ¶
func NewS3StorageDriver() (*S3StorageDriver, error)
func (*S3StorageDriver) Delete ¶
func (s *S3StorageDriver) Delete(ctx context.Context, path string) error
func (*S3StorageDriver) PutFromFile ¶
type SQLExecutor ¶
type SQLExecutor interface {
ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row
}
SQLExecutor interface
type SchemaState ¶
type SchemaState struct {
Table string
Columns []ColumnDef
ForeignKeys []ForeignKeyDef
DBName string
Dialect dbmanager.Dialect
}
func (*SchemaState) BuildSQL ¶
func (s *SchemaState) BuildSQL() (string, error)
type StorageDriver ¶
type StorageDriver interface {
Put(ctx context.Context, path string, content []byte) error
PutFromFile(ctx context.Context, path string, srcPath string) error
Exists(ctx context.Context, path string) (bool, error)
Delete(ctx context.Context, path string) error
}
StorageDriver defines the contract for all file storage drivers.
Source Files
¶
- aspnet.go
- auth.go
- cache.go
- captcha.go
- collections.go
- container_bridge.go
- database.go
- db_hooks.go
- filesystem.go
- functions.go
- http.go
- http_client.go
- image.go
- inertia.go
- job.go
- json.go
- mail.go
- math.go
- meta.go
- network.go
- orm.go
- query_builder.go
- router.go
- schema_builder.go
- security.go
- security_ip.go
- session.go
- sse.go
- storage.go
- test.go
- time.go
- transaction.go
- upload.go
- utils.go
- validator.go