Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadConfigurations ¶
LoadConfigurations load configurations from json file
Types ¶
type Configuration ¶
type Configuration struct { Runtime *Runtime SmsGateway *SmsGateway PDUConfigs *PDUConfigs Database *Database WebServer *WebServer SMSSenderAuth *SMSSenderAuth }
Configuration store all configuration
func GetConfigurations ¶
func GetConfigurations() *Configuration
GetConfigurations get current system configuration
type Database ¶
type Database struct { Driver string DSN string MaxIdleConn int MaxOpenConn int ConnMaxLifetimeInMinute int }
Database ...
type PDUConfigs ¶
type PDUConfigs struct { SourceAddr *PDUAddr DestinationAddr *PDUAddr AddRange byte SubmitRespRadix byte DeliverReportRadix byte ProtocolID byte RegisteredDelivery byte ReplaceIfPresentFlag byte EsmClass byte }
PDUConfigs pdu configurations
type SMSSenderAuth ¶
SMSSenderAuth basic auth of sms sender
type Secure ¶
type Secure struct { // EnableTLS or not EnableTLS bool // CertFile where server certificate file is CertFile string // KeyFile where server key file is KeyFile string // SipHashSum0 SipHashSum0 uint64 // SipHashSum1 SipHashSum1 uint64 }
Secure config
type SmsGateway ¶
type SmsGateway struct { Addr string Port int SystemID string Password string SystemType string // Alias default alias Alias string MaxSmsLength int SendSMSIntervalInMiliSec int EnquiryIntervalInSec int SeqMod uint SeqSeed uint IsDebugMode bool ShowHeartBeat bool CacheDurForProcessStatusInSec int NumConcurrentHandler int SendSMSExpiredInMinute int }
SmsGateway configuration
type WebServer ¶
type WebServer struct { // BodyLimit The body limit is determined based on both Content-Length request header and actual content read, which makes it super secure. // Limit can be specified as 4x or 4xB, where x is one of the multiple from K, M, G, T or P. Example: 2M = 2 Megabyte BodyLimit string // Port Which port WebServer would listen Port int // Secure Secure Secure }
WebServer hold configurations for WebServer
Click to show internal directories.
Click to hide internal directories.