Documentation ¶
Index ¶
- Constants
- func FindConfigFile(fileName string) string
- func GetIpAddress(r *http.Request) string
- func LoadConfig(fileName string)
- func Log(level string, msg string)
- func LogCritical(msg string)
- func LogError(msg string)
- func LogInfo(msg string)
- func Start()
- func Stop()
- type ConfigPushProxy
- type PushNotification
Constants ¶
View Source
const ( PUSH_NOTIFY_APPLE = "apple" PUSH_NOTIFY_ANDROID = "android" )
View Source
const ( HEADER_FORWARDED = "X-Forwarded-For" HEADER_REAL_IP = "X-Real-IP" )
Variables ¶
This section is empty.
Functions ¶
func FindConfigFile ¶
func GetIpAddress ¶
func LoadConfig ¶
func LoadConfig(fileName string)
func LogCritical ¶
func LogCritical(msg string)
Types ¶
type ConfigPushProxy ¶
type ConfigPushProxy struct { ListenAddress string ApplePushServer string ApplePushCertPublic string ApplePushCertPrivate string AndroidApiKey string ThrottlePerSec int ThrottleMemoryStoreSize int ThrottleVaryByHeader string }
var CfgPP *ConfigPushProxy = &ConfigPushProxy{}
type PushNotification ¶
type PushNotification struct { Platform string `json:"platform"` ServerId string `json:"server_id"` DeviceId string `json:"device_id"` Category string `json:"category"` Sound string `json:"sound"` Message string `json:"message"` Badge int `json:"badge"` ContentAvailable int `json:"cont_ava"` ChannelId string `json:"channel_id"` ChannelName string `json:"channel_name"` }
func PushNotificationFromJson ¶
func PushNotificationFromJson(data io.Reader) *PushNotification
func (*PushNotification) ToJson ¶
func (me *PushNotification) ToJson() string
Click to show internal directories.
Click to hide internal directories.