Documentation ¶
Index ¶
- Variables
- func DefaultEnqueue(ctx context.Context, mq models.MessageQueue, task *models.Task) (*models.Task, error)
- func ToEnvName(envtype, name string) string
- type AppCreateListener
- type AppDeleteListener
- type AppUpdateListener
- type Handle
- type HandlerContext
- type Param
- type Params
- type RunnerListener
- type Server
- func (s *Server) AddAppCreateListener(listener AppCreateListener)
- func (s *Server) AddAppDeleteListener(listener AppDeleteListener)
- func (s *Server) AddAppUpdateListener(listener AppUpdateListener)
- func (s *Server) AddRunnerListener(listener RunnerListener)
- func (s *Server) AddSpecialHandler(handler SpecialHandler)
- func (s *Server) FireAfterAppCreate(ctx context.Context, app *models.App) error
- func (s *Server) FireAfterAppDelete(ctx context.Context, app *models.App) error
- func (s *Server) FireAfterAppUpdate(ctx context.Context, app *models.App) error
- func (s *Server) FireAfterDispatch(ctx context.Context, route *models.Route) error
- func (s *Server) FireBeforeAppCreate(ctx context.Context, app *models.App) error
- func (s *Server) FireBeforeAppDelete(ctx context.Context, app *models.App) error
- func (s *Server) FireBeforeAppUpdate(ctx context.Context, app *models.App) error
- func (s *Server) FireBeforeDispatch(ctx context.Context, route *models.Route) error
- func (s *Server) Run()
- func (s *Server) UseSpecialHandlers(ginC *gin.Context) error
- type SpecialHandler
- type SpecialHandlerContext
- func (c *SpecialHandlerContext) Context() context.Context
- func (c *SpecialHandlerContext) Datastore() models.Datastore
- func (c *SpecialHandlerContext) Get(key string) (value interface{}, exists bool)
- func (c *SpecialHandlerContext) Request() *http.Request
- func (c *SpecialHandlerContext) Set(key string, value interface{})
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInternalServerError = errors.New("Something unexpected happened on the server")
View Source
var Version = "0.1.77"
Version of IronFunctions
Functions ¶
func DefaultEnqueue ¶
Types ¶
type AppCreateListener ¶
type AppDeleteListener ¶
type AppUpdateListener ¶
type HandlerContext ¶
type HandlerContext interface { // Context return the context object Context() context.Context // Request returns the underlying http.Request object Request() *http.Request // Datastore returns the models.Datastore object. Not that this has arbitrary key value store methods that can be used to store extra data Datastore() models.Datastore // Set and Get values on the context, this can be useful to change behavior for the rest of the request Set(key string, value interface{}) Get(key string) (value interface{}, exists bool) }
Each handler can modify the context here so when it gets passed along, it will use the new info. Not using Gin's Context so we don't lock ourselves into Gin, this is a subset of the Gin context.
type RunnerListener ¶
type Server ¶
type Server struct { Datastore models.Datastore Runner *runner.Runner Router *gin.Engine MQ models.MessageQueue Enqueue models.Enqueue // contains filtered or unexported fields }
func (*Server) AddAppCreateListener ¶
func (s *Server) AddAppCreateListener(listener AppCreateListener)
AddAppCreateListener adds a listener that will be notified on App created.
func (*Server) AddAppDeleteListener ¶
func (s *Server) AddAppDeleteListener(listener AppDeleteListener)
AddAppDeleteListener adds a listener that will be notified on App deleted.
func (*Server) AddAppUpdateListener ¶
func (s *Server) AddAppUpdateListener(listener AppUpdateListener)
AddAppUpdateListener adds a listener that will be notified on App updated.
func (*Server) AddRunnerListener ¶
func (s *Server) AddRunnerListener(listener RunnerListener)
AddRunListeners adds a listener that will be fired before and after a function run.
func (*Server) AddSpecialHandler ¶
func (s *Server) AddSpecialHandler(handler SpecialHandler)
func (*Server) FireAfterAppCreate ¶
func (*Server) FireAfterAppDelete ¶
func (*Server) FireAfterAppUpdate ¶
func (*Server) FireAfterDispatch ¶
func (*Server) FireBeforeAppCreate ¶
func (*Server) FireBeforeAppDelete ¶
func (*Server) FireBeforeAppUpdate ¶
func (*Server) FireBeforeDispatch ¶
type SpecialHandler ¶
type SpecialHandler interface {
Handle(c HandlerContext) error
}
type SpecialHandlerContext ¶
type SpecialHandlerContext struct {
// contains filtered or unexported fields
}
func (*SpecialHandlerContext) Context ¶
func (c *SpecialHandlerContext) Context() context.Context
func (*SpecialHandlerContext) Datastore ¶
func (c *SpecialHandlerContext) Datastore() models.Datastore
func (*SpecialHandlerContext) Get ¶
func (c *SpecialHandlerContext) Get(key string) (value interface{}, exists bool)
func (*SpecialHandlerContext) Request ¶
func (c *SpecialHandlerContext) Request() *http.Request
func (*SpecialHandlerContext) Set ¶
func (c *SpecialHandlerContext) Set(key string, value interface{})
Source Files ¶
Click to show internal directories.
Click to hide internal directories.