Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //TimeZone of the application TimeZone string //DefaultLanguage is the default language of the page DefaultLanguage string //Languages holds all languages supported by the application Languages []string //LdapHost is the host of the LDAP server LdapHost string //LdapPort is the port of the LDAP server LdapPort int //PathErrorLog is the path to the error log file PathErrorLog string //Server holds all server connection data Server ServerConn )
general config variables
View Source
var ( //AppVersion revel app version (ldflags) AppVersion string //BuildTime revel app build-time (ldflags) BuildTime string )
View Source
var HeaderFilter = func(c *revel.Controller, fc []revel.Filter) {
c.Response.Out.Header().Add("X-Frame-Options", "SAMEORIGIN")
c.Response.Out.Header().Add("X-XSS-Protection", "1; mode=block")
c.Response.Out.Header().Add("X-Content-Type-Options", "nosniff")
c.Response.Out.Header().Add("Referrer-Policy", "strict-origin-when-cross-origin")
fc[0](c, fc[1:])
}
HeaderFilter adds common security headers There is a full implementation of a CSRF filter in https://github.com/revel/modules/tree/master/csrf
Functions ¶
func HTMLToMimeFormat ¶
HTMLToMimeFormat takes a HTML string and doubles it into a e-mail body that contains the HTML and a plaintext (divided by a string sequence). This format of sending a HTML or plaintext e-mail is called MIME format.
func SendErrorNote ¶
func SendErrorNote()
SendErrorNote sends an error notification e-mail to the mailer.
Types ¶
type DB ¶
DB is an abstraction to the actual database connection.
var ( //Db is the database object representing the DB connections Db *DB )
type MailerConn ¶
MailerConn contains all Mailer connection fields.
var ( //EMailQueue holds all currently queued e-mails EMailQueue chan EMail //Mailer holds all mailer connection data Mailer MailerConn )
Directories ¶
Path | Synopsis |
---|---|
Package auth comprises all logic concerning the authentication against the LDAP server.
|
Package auth comprises all logic concerning the authentication against the LDAP server. |
Package models contains all database tables as structs and their validation functions.
|
Package models contains all database tables as structs and their validation functions. |
Click to show internal directories.
Click to hide internal directories.