Documentation
¶
Index ¶
Constants ¶
const CBOOL = "bool"
cBOOL !
const CCODE = "code"
cCODE !
const CDATE = "date"
cDATE !
const CEMAIL = "email"
cEMAIL !
const CFILE = "file"
cFILE !
const CFK = "fk"
cFK !
const CGIF = "gif"
cGIF gif
const CHTML = "html"
cHTML !
const CID = "id"
cID true
const CIMAGE = "image"
cIMAGE !
const CJPEG = "jpeg"
cJPEG jpeg
const CJPG = "jpg"
cJPG jpg
const CLINK = "link"
cLINK !
const CLIST = "list"
cLIST !
const CM2M = "m2m"
cM2M !
const CMONEY = "money"
cMONRY !
const CMULTILINGUAL = "multilingual"
cMULTILINGUAL !
const CNUMBER = "number"
cNUMBER !
const CPASSWORD = "password"
cPASSWORD !
const CPNG = "png"
cPNG png
const CPOST = "POST"
cPOST post
const CPROGRESSBAR = "progress_bar"
cPROGRESSBAR !
const CSTRING = "string"
cSTRING !
const CTRUE = "true"
cTRUE true
const Version = "0.6.2"
Version number as per Semantic Versioning 2.0.0 (semver.org)
const VersionCodeName = "Beetle"
VersionCodeName is the cool name we give to versions with significant changes. This name should always be a bug's name starting from A-Z them revolving back. This started at version 0.5.0 (Atlas Moth) 0.6.0 Beetle
Variables ¶
var APIDisabledAdd = false
APIDisabledAdd controls the data API's disabled for add commands.
var APIDisabledDelete = false
APIDisabledDelete controls the data API's disabled for delete commands.
var APIDisabledEdit = false
APIDisabledEdit controls the data API's disabled for edit commands.
var APIDisabledRead = false
APIDisabledRead controls the data API’s disabled for add commands.
var APIDisabledSchema = false
APIDisabledSchema controls the data API's disabled for schema commands.
var APILogAdd = true
APILogAdd controls the data API's logging for add commands.
var APILogDelete = true
APILogDelete controls the data API's logging for delete commands.
var APILogEdit = true
APILogEdit controls the data API's logging for edit commands.
var APILogRead = false
APILogRead controls the data API's logging for read commands.
var APILogSchema = true
APILogSchema controls the data API's logging for schema commands.
var APIPostQueryAdd = false
APIPostQueryAdd controls the data API's post query for add commands.
var APIPostQueryDelete = false
APIPostQueryDelete controls the data API's post query for delete commands.
var APIPostQueryEdit = false
APIPostQueryEdit controls the data API's post query for edit commands.
var APIPostQueryRead = false
APIPostQueryRead controls the data API’s post query for add commands.
var APIPostQuerySchema = false
APIPostQuerySchema controls the data API's post query for schema commands.
var APIPreQueryAdd = false
APIPreQueryAdd controls the data API's pre query for add commands.
var APIPreQueryDelete = false
APIPreQueryDelete controls the data API's pre query for delete commands.
var APIPreQueryEdit = false
APIPreQueryEdit controls the data API's pre query for edit commands.
var APIPreQueryRead = false
APIPreQueryRead controls the data API’s pre query for add commands.
var APIPreQuerySchema = false
APIPreQuerySchema controls the data API's pre query for schema commands.
var APIPublicAdd = false
APIPublicAdd controls the data API's public for add commands.
var APIPublicDelete = false
APIPublicDelete controls the data API's public for delete commands.
var APIPublicEdit = false
APIPublicEdit controls the data API's public for edit commands.
var APIPublicRead = false
APIPublicRead controls the data API’s public for add commands.
var APIPublicSchema = false
APIPublicSchema controls the data API's public for schema commands.
var AllowedHosts = "0.0.0.0,127.0.0.1,localhost,::1"
AllowedHosts is a comma seprated list of allowed hosts for the server to work. The default value if only for development and production domain should be added before deployment
var AllowedIPs = "*"
AllowedIPs is a list of allowed IPs to access uAdmin interfrace in one of the following formats: - "*" = Allow all - "" = Allow none - "192.168.1.1" Only allow this IP - "192.168.1.0/24" Allow all IPs from 192.168.1.1 to 192.168.1.254 You can also create a list of the above formats using comma to separate them. For example: "192.168.1.1,192.168.1.2,192.168.0.0/24"
var BindIP = ""
BindIP is the IP the application listens to.
var BlockedIPs = ""
BlockedIPs is a list of blocked IPs from accessing uAdmin interfrace in one of the following formats: - "*" = Block all - "" = Block none - "192.168.1.1" Only block this IP - "192.168.1.0/24" Block all IPs from 192.168.1.1 to 192.168.1.254 You can also create a list of the above formats using comma to separate them. For example: "192.168.1.1,192.168.1.2,192.168.0.0/24"
var CachePermissions = true
CachePermissions allows uAdmin to store permissions data in memory
var CacheSessions = true
CacheSessions allows uAdmin to store sessions data in memory
var CacheTranslation = false
CacheTranslation allows a translation to store data in a cache memory.
var DebugDB = false
DebugDB prints all SQL statements going to DB.
var DefaultMediaPermission = os.FileMode(0644)
DefaultMediaPermission is the default permission applied to to files uploaded to the system
var DefaultProgressBarColor = "#07c"
var EmailFrom string
EmailFrom identifies where the email is coming from.
var EmailPassword string
EmailPassword sets the password of an email.
var EmailSMTPServer string
EmailSMTPServer sets the name of the SMTP Server in an email.
var EmailSMTPServerPort int
EmailSMTPServerPort sets the port number of an SMTP Server in an email.
var EmailUsername string
EmailUsername sets the username of an email.
var ErrorHandleFunc func(int, string, string)
ErrorHandleFunc is a function that will be called everytime Trail is called. It receives one parameter for error level, one for error message and one for runtime stack trace
var FavIcon = "/static/uadmin/favicon.ico"
FavIcon is the fav icon that shows on uAdmin UI
var HTTPLogFormat = "%a %>s %B %U %D"
HTTPLogFormat is the format used to log HTTP access %a: Client IP address %{remote}p: Client port %A: Server hostname/IP %{local}p: Server port %U: Path %c: All coockies %{NAME}c: Cookie named 'NAME' %{GET}f: GET request parameters %{POST}f: POST request parameters %B: Response length %>s: Response code %D: Time taken in microseconds %T: Time taken in seconds %I: Request length
var HandlersRegistered = false
var LangMapCache = map[string][]byte{}
langMapCache is a computer memory used for storage of frequently or recently used translations.
var LogAdd = true
LogAdd adds a log when a record is added.
var LogDelete = true
LogDelete adds a log when a record is deleted.
var LogEdit = true
LogEdit adds a log when a record is edited.
var LogHTTPRequests = true
LogHTTPRequests logs http requests to syslog
var LogRead = false
LogRead adds a log when a record is read.
var LogTrail = false
LogTrail stores Trail logs to syslog
var Logo = "/static/uadmin/logo.png"
Logo is the main logo that shows on uAdmin UI
var MatchAllCap = regexp.MustCompile("([a-z0-9])([A-Z])")
var MatchFirstCap = regexp.MustCompile("(.)([A-Z][a-z]+)")
Private Global Variables Regex
var MaxImageHeight = 600
MaxImageHeight sets the maximum height of an image.
var MaxImageWidth = 800
MaxImageWidth sets the maximum width of an image.
var MaxUploadFileSize = int64(25 * 1024 * 1024)
MaxUploadFileSize is the maximum upload file size in bytes.
var OTPAlgorithm = "sha1"
OTPAlgorithm is the hashing algorithm of OTP.
var OTPDigits = 6
OTPDigits is the number of digits for the OTP.
var OTPPeriod = uint(30)
OTPPeriod is the number of seconds for the OTP to change.
var OTPSkew = uint(5)
OTPSkew is the number of minutes to search around the OTP.
var OptimizeSQLQuery = false
OptimizeSQLQuery selects columns during rendering a form a list to visible fields. This means during the filtering of a form the select statement will not include any field with `hidden` tag. For list it will not select any field with `list_exclude`
var PageLength = 100
PageLength is the list view max number of records.
var PasswordAttempts = 5
PasswordAttempts is the maximum number of invalid password attempts before the IP address is blocked for some time from usig the system
var PasswordTimeout = 15
PasswordTimeout is the amount of time in minutes the IP will be blocked for after reaching the the maximum invalid password attempts
var PublicMedia = false
PublicMedia allows public access to media handler without authentication.
var RateLimit int64 = 3
RateLimit is the maximum number of requests/second for any unique IP
var RateLimitBurst int64 = 3
RateLimitBurst is the maximum number of requests for an idle user
var Registered = false
var RestrictSessionIP = false
RestrictSessionIP is to block access of a user if their IP changes from their original IP during login
var RetainMediaVersions = true
RetainMediaVersions is to allow the system to keep files uploaded even after they are changed. This allows the system to "Roll Back" to an older version of the file.
var RootURL = "/"
RootURL is where the listener is mapped to.
var SettingsSynched = false
var SiteName = "uAdmin"
SiteName is the name of the website that shows on title and dashboard.
var Theme = "default"
Theme is the name of the theme used in uAdmin.
Functions ¶
This section is empty.