Documentation
¶
Index ¶
- Variables
- type Activity
- type ActivityLogBuilder
- type ActivityLogService
- type Application
- type ApplicationServices
- type AuthGuard
- type AuthGuardConstructor
- type AuthService
- type CryptService
- type DatabaseService
- type Event
- type EventListener
- type EventListenerConstructor
- type EventService
- type LoggingService
- type Middleware
- type MiddlewareConstructor
- type MiddlewareService
- type Module
- type ModuleEntrypoint
- type ModuleService
- type ScriptCommand
- type SentryConfig
- type SentryService
- type SessionCookieWriter
- type SessionData
- type SessionService
- type SessionStorage
- type StatefulAuthGuard
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidCipherText = fmt.Errorf("invalid cipherText")
Functions ¶
This section is empty.
Types ¶
type ActivityLogBuilder ¶ added in v1.4.0
type ActivityLogBuilder interface {
Causer(user *models.User) ActivityLogBuilder
Build() Activity
}
type ActivityLogService ¶ added in v1.4.0
type Application ¶
type ApplicationServices ¶
type ApplicationServices struct {
Auth AuthService
ActivityLog ActivityLogService
Crypt CryptService
Database DatabaseService
Event EventService
Logging LoggingService
Middleware MiddlewareService
Module ModuleService
Session SessionService
WebEngine *web.Engine
}
type AuthGuardConstructor ¶
type AuthGuardConstructor = func(application Application) (AuthGuard, error)
type AuthService ¶
type CryptService ¶
type DatabaseService ¶
type Event ¶
The minimal interface DomainEvent, implemented by all events, ensures support of an occurredOn() accessor. It enforces a basic contract for all events.
References:
- Implementing Domain-Driven Design, Vaughn Vernon
type EventListener ¶
type EventListenerConstructor ¶
type EventListenerConstructor = func(application Application) (EventListener, error)
type EventService ¶
type EventService interface {
Dispatch(ctx context.Context, payload Event)
Register(name string, listenersConstructor []EventListenerConstructor)
}
type LoggingService ¶ added in v1.4.0
type LoggingService interface {
Debug(ctx context.Context, message string) error
Info(ctx context.Context, message string) error
Notice(ctx context.Context, message string) error
Warning(ctx context.Context, message string) error
Error(ctx context.Context, message string) error
Critical(ctx context.Context, message string) error
Alert(ctx context.Context, message string) error
Emergency(ctx context.Context, message string) error
}
type Middleware ¶
type Middleware interface {
Handle(param interface{}) web.HandlerFunc
}
type MiddlewareConstructor ¶
type MiddlewareConstructor = func(application Application) (Middleware, error)
type MiddlewareService ¶
type MiddlewareService interface {
Use(name string, params interface{}) web.HandlerFunc
Global() []web.HandlerFunc
Register(name string, constructor MiddlewareConstructor) error
}
type Module ¶
type Module interface {
Name() string
App() Application
}
type ModuleEntrypoint ¶
type ModuleEntrypoint = func(mod Module)
type ModuleService ¶
type ModuleService interface {
Register(name string, entrypoint ModuleEntrypoint)
}
type ScriptCommand ¶
type SentryConfig ¶ added in v1.9.6
type SentryConfig struct {
Enabled bool `env:"SENTRY_ENABLED,default=false"`
Debug bool `env:"SENTRY_DEBUG,default=false"`
// sentry config
Dsn string `env:"SENTRY_DSN,required"`
EnableTracing bool `env:"SENTRY_ENABLE_TRACING,default=false"`
TracesSampleRate float64 `env:"SENTRY_TRACES_SAMPLE_RATE,default=0"`
SendDefaultPii bool `env:"SENTRY_SEND_DEFAULT_PII,default=true"`
// sentrygin specific config
GinRepanic bool `env:"SENTRY_GIN_REPANIC,default=true"`
GinWaitForDelivery bool `env:"SENTRY_GIN_WAIT_FOR_DELIVERY, default=false"`
GinTimeout int `env:"SENTRY_GIN_TIMEOUT,default=5"`
}
type SentryService ¶ added in v1.9.6
type SessionCookieWriter ¶
type SessionCookieWriter interface {
Write(ctx *web.Context, sess SessionData)
}
type SessionData ¶
type SessionService ¶
type SessionService interface {
Get(ctx *web.Context, key string) (interface{}, error)
IsTokenMatch(ctx *web.Context, token string) (bool, error)
Put(ctx *web.Context, key string, value interface{}) error
Delete(ctx *web.Context, key string) error
Clear(ctx *web.Context) error
Regenerate(ctx *web.Context) error
Invalidate(ctx *web.Context) error
RegenerateToken(ctx *web.Context) error
Start(ctx *web.Context) error
}
type SessionStorage ¶
Click to show internal directories.
Click to hide internal directories.