Documentation ¶
Index ¶
- Variables
- func ActionLoad(c *server.Context)
- func ActionRun(c *server.Context)
- func AssetsBackendCSS(c *server.Context)
- func AssetsCommonCSS(c *server.Context)
- func AssetsFrontendCSS(c *server.Context)
- func BootstrapTranslations(c *server.Context)
- func CSSList(c *server.Context)
- func CallButton(c *server.Context)
- func CallKW(c *server.Context)
- func ChangePassword(c *server.Context)
- func CompanyLogo(c *server.Context)
- func Execute(uid int64, params CallParams) (res interface{}, rError error)
- func GetSessionInfo(c *server.Context)
- func Image(c *server.Context)
- func JSList(c *server.Context)
- func Load(c *server.Context)
- func LoadLocale(c *server.Context)
- func LoginGet(c *server.Context)
- func LoginPost(c *server.Context)
- func LoginRequired(c *server.Context)
- func Logout(c *server.Context)
- func MenuLoadNeedaction(c *server.Context)
- func Modules(c *server.Context)
- func QWeb(c *server.Context)
- func SearchRead(c *server.Context)
- func SessionInfo(sess sessions.Session) gin.H
- func VersionInfo(c *server.Context)
- func WebClient(c *server.Context)
- type CallParams
- type ChangePasswordData
- type Menu
Constants ¶
This section is empty.
Variables ¶
var ( // CommonLess is the list of Less assets to import by the web client // that are common to the frontend and the backend. All less assets are // cat'ed together in the given order before being compiled. CommonLess []string // CommonCSS is the list of CSS files to include without compilation both // for the frontend and the backend. CommonCSS []string // CommonJS is the list of JavaScript assets to import by the web client // that are common to the frontend and the backend CommonJS []string // BackendLess is the list of Less assets to import by the web client // that are specific to the backend. All less assets are // cat'ed together in the given order before being compiled. BackendLess []string // BackendCSS is the list of CSS files to include without compilation for // the backend. BackendCSS []string // BackendJS is the list of JavaScript assets to import by the web client // that are specific to the backend. BackendJS []string // FrontendLess is the list of Less assets to import by the web client // that are specific to the frontend. All less assets are // cat'ed together in the given order before being compiled. FrontendLess []string // FrontendCSS is the list of CSS files to include without compilation for // the frontend. FrontendCSS []string // FrontendJS is the list of JavaScript assets to import by the web client // that are specific to the frontend. FrontendJS []string // LessHelpers are less files that must be imported for compiling any assets LessHelpers []string )
var MethodAdapters = map[string]methodAdapter{
"Create": createAdapter,
"Write": writeAdapter,
"Onchange": onchangeAdapter,
"Read": readAdapter,
"SearchRead": searchReadAdapter,
"FieldsGet": fieldsGetAdapter,
}
MethodAdapters is a map giving the adapter to call for each method
Functions ¶
func ActionLoad ¶
ActionLoad returns the action with the given id
func AssetsBackendCSS ¶
AssetsBackendCSS returns the compiled CSS for the backend assets
func AssetsCommonCSS ¶
AssetsCommonCSS returns the compiled CSS for the common assets
func AssetsFrontendCSS ¶
AssetsFrontendCSS returns the compiled CSS for the frontend assets
func BootstrapTranslations ¶
BootstrapTranslations returns data about the current language
func CallButton ¶
CallButton executes the given method of the given model and returns the result only if it is an action
func ChangePassword ¶
ChangePassword is called by the client to change the current user password
func Execute ¶
func Execute(uid int64, params CallParams) (res interface{}, rError error)
Execute executes a method on an object
func GetSessionInfo ¶
GetSessionInfo returns the information fo the current session to the client
func Image ¶
Image serves the image stored in the database (base64 encoded) in the given model and given field
func LoginRequired ¶
LoginRequired is a middleware that redirects to login page non logged in users.
func MenuLoadNeedaction ¶
MenuLoadNeedaction serves the number of objects that need an action in the given menu IDs
func SessionInfo ¶
SessionInfo returns a map with information about the given session
func VersionInfo ¶
VersionInfo returns server version information to the client
Types ¶
type CallParams ¶
type CallParams struct { Model string `json:"model"` Method string `json:"method"` Args []json.RawMessage `json:"args"` KWArgs map[string]json.RawMessage `json:"kwargs"` }
CallParams is the arguments' struct for the Execute function. It defines a method to call on a model with the given args and keyword args.
type ChangePasswordData ¶
type ChangePasswordData struct { Fields []struct { Name string `json:"name"` Value string `json:"value"` } `json:"fields"` }
ChangePasswordData is the params format passed to ChangePassword controller