Documentation
¶
Index ¶
- type Boltimore
- type ChangeWatcherContext
- type CronFunctionContext
- type InitFunctionContext
- type Option
- func ChangeWatcher(path string, fn func(cwc *ChangeWatcherContext)) Option
- func CronFunction(schedule string, fn func(cfc *CronFunctionContext)) Option
- func Endpoint(method, path string, fn func(rc *RequestContext) error) Option
- func InitFunction(fn func(ifc *InitFunctionContext) error) Option
- func ZapLogger(l *zap.SugaredLogger) Option
- type RequestContext
- func (r *RequestContext) ParseJSON(v interface{}) error
- func (r *RequestContext) RespondWithError(error string, statusCode int) error
- func (r *RequestContext) RespondWithJSON(v interface{}) error
- func (r *RequestContext) RespondWithStatusCode(statusCode int) error
- func (r *RequestContext) RespondWithStatusCodeAndJSON(statusCode int, v interface{}) error
- func (r *RequestContext) RouteVariable(name string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Boltimore ¶
type Boltimore struct { *mux.Router DB *bolted.Bolted Watcher *watcher.Watcher // contains filtered or unexported fields }
func NewWithExistingDBAndWatcher ¶ added in v0.6.0
type ChangeWatcherContext ¶ added in v0.5.0
type ChangeWatcherContext struct { DB *bolted.Bolted Logger *zap.SugaredLogger }
type CronFunctionContext ¶ added in v0.5.0
type CronFunctionContext struct { DB *bolted.Bolted Logger *zap.SugaredLogger }
type InitFunctionContext ¶ added in v0.5.0
type InitFunctionContext struct { DB *bolted.Bolted Logger *zap.SugaredLogger }
type Option ¶ added in v0.1.0
func ChangeWatcher ¶ added in v0.3.0
func ChangeWatcher(path string, fn func(cwc *ChangeWatcherContext)) Option
func CronFunction ¶ added in v0.1.0
func CronFunction(schedule string, fn func(cfc *CronFunctionContext)) Option
func Endpoint ¶ added in v0.5.0
func Endpoint(method, path string, fn func(rc *RequestContext) error) Option
func InitFunction ¶ added in v0.1.0
func InitFunction(fn func(ifc *InitFunctionContext) error) Option
func ZapLogger ¶ added in v0.5.0
func ZapLogger(l *zap.SugaredLogger) Option
type RequestContext ¶ added in v0.5.0
type RequestContext struct { Request *http.Request ResponseWriter http.ResponseWriter DB *bolted.Bolted Watcher *watcher.Watcher Logger *zap.SugaredLogger // contains filtered or unexported fields }
func (*RequestContext) ParseJSON ¶ added in v0.5.0
func (r *RequestContext) ParseJSON(v interface{}) error
func (*RequestContext) RespondWithError ¶ added in v0.5.1
func (r *RequestContext) RespondWithError(error string, statusCode int) error
func (*RequestContext) RespondWithJSON ¶ added in v0.5.0
func (r *RequestContext) RespondWithJSON(v interface{}) error
func (*RequestContext) RespondWithStatusCode ¶ added in v0.6.0
func (r *RequestContext) RespondWithStatusCode(statusCode int) error
func (*RequestContext) RespondWithStatusCodeAndJSON ¶ added in v0.5.1
func (r *RequestContext) RespondWithStatusCodeAndJSON(statusCode int, v interface{}) error
func (*RequestContext) RouteVariable ¶ added in v0.5.0
func (r *RequestContext) RouteVariable(name string) string
Click to show internal directories.
Click to hide internal directories.