Documentation ¶
Overview ¶
* Cryptexly - Copyleft of Xavier D. Johnson. * me at xavierdjohnson dot com * http://www.xavierdjohnson.net/ * * See LICENSE.
* Cryptexly - Copyleft of Xavier D. Johnson. * me at xavierdjohnson dot com * http://www.xavierdjohnson.net/ * * See LICENSE.
Index ¶
Constants ¶
View Source
const ( APP_NAME = "cryptexlyd" APP_VERSION = "1.2.0" )
Variables ¶
View Source
var Conf = Configuration{ Address: defAddress, Port: defPort, MaxReqSize: defMaxReqSize, Certificate: defCertificate, Key: defKey, Database: defDatabaseName, Secret: defSecret, Username: defUsername, Password: defPassword, TokenDuration: defTokenDuration, Compression: defCompression, Backups: BackupsConfig{ Enabled: defBackupsEnabled, }, Scheduler: SchedulerConfig{ Enabled: true, Period: defSchedulerPeriod, Reports: ReportsConfig{ Enabled: false, RateLimit: defRateLimit, }, }, }
Functions ¶
Types ¶
type BackupsConfig ¶
type BackupsConfig struct { Enabled bool `json:"enabled"` Period int `json:"period"` Folder string `json:"folder"` Run string `json:"run"` }
Backups configuration.
type Configuration ¶
type Configuration struct { Address string `json:"address"` Port int `json:"port"` MaxReqSize int64 `json:"max_req_size"` Certificate string `json:"certificate"` Key string `json:"key"` Database string `json:"database"` Secret string `json:"secret"` Username string `json:"username"` Password string `json:"password"` TokenDuration int `json:"token_duration"` Compression bool `json:"compression"` CheckExpired int `json:"check_expired"` Scheduler SchedulerConfig `json:"scheduler"` Backups BackupsConfig `json:"backups"` }
Cryptexly server configuration. swagger:response
func (Configuration) Auth ¶
func (c Configuration) Auth(username, password string) bool
Auth function return true if the provided username and password are valid and false if not.
func (Configuration) HashPassword ¶
func (c Configuration) HashPassword(password string, cost int) string
HashPassword function return hashed string from a given password and cost
type ReportsConfig ¶
type ReportsConfig struct { Enabled bool `json:"enabled"` RateLimit int `json:"rate_limit"` Filter []string `json:"filter"` To string `json:"to"` PGP PGPConfig `json:"pgp"` SMTP SMTPConfig `json:"smtp"` }
Reports configuration.
type SMTPConfig ¶
type SMTPConfig struct { Address string `json:"address"` Port int `json:"port"` Username string `json:"username"` Password string `json:"password"` }
SMTP configuration.
type SchedulerConfig ¶
type SchedulerConfig struct { Enabled bool `json:"enabled"` Period int `json:"period"` Reports ReportsConfig `json:"reports"` }
Scheduler configuration.
Click to show internal directories.
Click to hide internal directories.