context

package
v1.8.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 4 Imported by: 56

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EngineWrapper func(interface{}, string, interface{}, string, string, string) interface{}
View Source
var EngineWrapperString func(interface{}, string, interface{}, string, string, string) string

A wrapper to the code/engine (reentrant code)

parameters:
- engine pointer, (directly passed thought to the wrapper if needed)
- Inner Page to call,
- Parameters,
- Language,
- Version
- Method (GET, POST, PUT, DELETE..)

Functions

This section is empty.

Types

type Context

type Context struct {
	Request             *http.Request             // The request (and all its data available: headers, variables, form, files, etc)
	Writer              http.ResponseWriter       // The request (and all its data available: headers, variables, form, files, etc)
	IsMainPage          bool                      // true it this page is the main page itself, false if any other page or blocks
	Code                int                       // return code
	Language            string                    // default system language by host. can be changed by code
	Version             string                    // default system version by host. can be changed by code
	MainPage            string                    // The original page URL called from outside
	MainPageUsed        string                    // The original real page called from outside (valid page found)
	MainURLparams       []string                  // The original URL params based on main page
	LocalPage           string                    // The local page called (same as Main if called from outside)
	LocalPageUsed       string                    // The local real page to use (valid page found)
	LocalURLparams      []string                  // The local URL params based on local page, if any
	LoggerError         *log.Logger               // The logger to log errors
	Sysparams           *xconfig.XConfig          // mandatory, site system params
	Sessionparams       *xconfig.XConfig          // Optional, for the programer to add any session data he needs.
	MainPageparams      *xconfig.XConfig          // Original page params (real original .page file)
	MainInstanceparams  *xconfig.XConfig          // Original instance params (real original .instance file)
	LocalPageparams     *xconfig.XConfig          // Local real page params (.page file)
	LocalInstanceparams *xconfig.XConfig          // Local real page instance (.instance file)
	LocalEntryparams    interface{}               // Params of local page call (NIL if main original page)
	Plugins             map[string]*plugin.Plugin // Wrapper to all the pre-loaded plugins for the system compiled go code (plugins cannot load plugins)
	IsGZiped            bool                      // set to true if the content of the code returned by a library is already gziped
}

Context structure is needed to be transported between every call from the engine to the different page engines

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL