Documentation ¶
Index ¶
- Constants
- func GenerateJWTFromKey(key *ecdsa.PrivateKey, keyId string, teamId string, issuedAt time.Time, ...) (string, error)
- func GenerateJWTFromKeyFile(keyFile string, keyId string, teamId string, issuedAt time.Time, ...) (string, error)
- func LoadCertificateFromFile(filePath string, password string) (tls.Certificate, error)
- func LoadKeyFromFile(filePath string) (*ecdsa.PrivateKey, error)
- type Client
- type Headers
- type NotificationBuilder
- func (b *NotificationBuilder) Build() (Headers, []byte, error)
- func (b *NotificationBuilder) BuildContent() ([]byte, error)
- func (b *NotificationBuilder) BuildHeaders() (Headers, error)
- func (b *NotificationBuilder) Merge(data map[string]interface{}) *NotificationBuilder
- func (b *NotificationBuilder) SetAlertText(text string) *NotificationBuilder
- func (b *NotificationBuilder) SetBadgeCount(count int) *NotificationBuilder
- func (b *NotificationBuilder) SetContentAvailable(value bool) *NotificationBuilder
- func (b *NotificationBuilder) SetSoundName(name string) *NotificationBuilder
- type SendResult
Constants ¶
View Source
const ( DeviceEndpointFormat = "https://%s/3/device/%s" ProductionEndpoint = "api.push.apple.com" SandboxEndpoint = "api.sandbox.push.apple.com" )
Variables ¶
This section is empty.
Functions ¶
func GenerateJWTFromKey ¶
func GenerateJWTFromKeyFile ¶
func LoadCertificateFromFile ¶
func LoadCertificateFromFile(filePath string, password string) (tls.Certificate, error)
func LoadKeyFromFile ¶
func LoadKeyFromFile(filePath string) (*ecdsa.PrivateKey, error)
Types ¶
type Client ¶
type NotificationBuilder ¶
type NotificationBuilder struct { AppId string // contains filtered or unexported fields }
func NewNotificationBuilder ¶
func NewNotificationBuilder(appId string) *NotificationBuilder
func (*NotificationBuilder) BuildContent ¶
func (b *NotificationBuilder) BuildContent() ([]byte, error)
func (*NotificationBuilder) BuildHeaders ¶
func (b *NotificationBuilder) BuildHeaders() (Headers, error)
func (*NotificationBuilder) Merge ¶
func (b *NotificationBuilder) Merge(data map[string]interface{}) *NotificationBuilder
func (*NotificationBuilder) SetAlertText ¶
func (b *NotificationBuilder) SetAlertText(text string) *NotificationBuilder
func (*NotificationBuilder) SetBadgeCount ¶
func (b *NotificationBuilder) SetBadgeCount(count int) *NotificationBuilder
func (*NotificationBuilder) SetContentAvailable ¶
func (b *NotificationBuilder) SetContentAvailable(value bool) *NotificationBuilder
func (*NotificationBuilder) SetSoundName ¶
func (b *NotificationBuilder) SetSoundName(name string) *NotificationBuilder
type SendResult ¶
type SendResult struct { StatusCode int // contains filtered or unexported fields }
func (*SendResult) ErrorReason ¶
func (r *SendResult) ErrorReason() string
func (*SendResult) Id ¶
func (r *SendResult) Id() string
func (*SendResult) Success ¶
func (r *SendResult) Success() bool
Click to show internal directories.
Click to hide internal directories.