Documentation
¶
Index ¶
- Variables
- type Application
- type ApplicationServices
- type AuthGuard
- type AuthGuardConstructor
- type AuthService
- type CryptService
- type DatabaseService
- type Event
- type EventListener
- type EventListenerConstructor
- type EventService
- type Middleware
- type MiddlewareConstructor
- type MiddlewareService
- type Module
- type ModuleEntrypoint
- type ModuleService
- type ScriptCommand
- 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 Application ¶
type ApplicationServices ¶
type ApplicationServices struct {
Auth AuthService
Crypt CryptService
Database DatabaseService
Event EventService
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 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 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 ¶
type SessionStorage interface {
Get(ctx context.Context, id string) (SessionData, error)
Save(ctx context.Context, data SessionData) error
}
Click to show internal directories.
Click to hide internal directories.