Documentation ¶
Index ¶
- Constants
- func NewHttpClient() *ghttp.Client
- func Register(clientID string, user model.User) error
- func SendTo(user model.User, title, content string)
- type Android
- type Audience
- type Client
- type IOS
- type Notification
- type PushChannel
- type PushMessage
- type PushRequest
- func (request *PushRequest) AddCid(cid string) *PushRequest
- func (request *PushRequest) SetNotification(title, body string) *PushRequest
- func (request *PushRequest) SetSettings(name string, settings interface{}) *PushRequest
- func (request *PushRequest) SetTransmission(title, body, payload string) *PushRequest
- type Response
Constants ¶
View Source
const ( BaseUrl = "https://restapi.getui.com/v2/" IntentStr = "" /* 159-byte string literal not displayed */ )
Variables ¶
This section is empty.
Functions ¶
func NewHttpClient ¶
Types ¶
type Android ¶
type Android struct { UPS struct { Notification *Notification `json:"notification"` } `json:"ups"` }
func NewAndroid ¶
type Client ¶
type Client struct { AppId string AppKey string AppSecret string MasterSecret string BaseUrl string }
func SetAppSecret ¶
func SetMasterSecret ¶
func (*Client) SetAppSecret ¶
func (*Client) SetMasterSecret ¶
type IOS ¶
type Notification ¶
type PushChannel ¶
type PushMessage ¶
type PushMessage struct { Duration string `json:"duration,omitempty"` Notification *Notification `json:"notification,omitempty"` Transmission *string `json:"transmission,omitempty"` }
type PushRequest ¶
type PushRequest struct { ID string `json:"request_id"` Settings map[string]interface{} `json:"settings"` Audience *Audience `json:"audience"` PushMessage *PushMessage `json:"push_message"` PushChannel *PushChannel `json:"push_channel,omitempty"` }
func NewPushRequest ¶
func NewPushRequest() *PushRequest
func (*PushRequest) AddCid ¶
func (request *PushRequest) AddCid(cid string) *PushRequest
func (*PushRequest) SetNotification ¶
func (request *PushRequest) SetNotification(title, body string) *PushRequest
func (*PushRequest) SetSettings ¶
func (request *PushRequest) SetSettings(name string, settings interface{}) *PushRequest
func (*PushRequest) SetTransmission ¶
func (request *PushRequest) SetTransmission(title, body, payload string) *PushRequest
Click to show internal directories.
Click to hide internal directories.