Documentation ¶
Index ¶
- type Client
- func (c *Client) CreateReserve(ctx context.Context, userIDs []string, msg *Message, reservedAt int64, ...) (*Reserve, error)
- func (c *Client) Entry(ctx context.Context, userID string, pf Platform, deviceID string, token string) error
- func (c *Client) GetReserve(ctx context.Context, reserveID string) (*Reserve, error)
- func (c *Client) Leave(ctx context.Context, userID string, pf Platform, deviceID string) error
- func (c *Client) ListReserve(ctx context.Context, limit int, cursor string) ([]*Reserve, string, error)
- func (c *Client) SendByAllUsers(ctx context.Context, pushID string, msg *Message) error
- func (c *Client) SendByUsers(ctx context.Context, userIDs []string, pushID string, msg *Message) error
- func (c *Client) UpdateReserve(ctx context.Context, reserveID string, userIDs []string, msg *Message, ...) (*Reserve, error)
- type Message
- type MessageAndroid
- type MessageIOS
- type MessageWeb
- type Platform
- type Reserve
- type ReserveStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client ... プッシュ通知のクライアント
func (*Client) CreateReserve ¶
func (c *Client) CreateReserve(ctx context.Context, userIDs []string, msg *Message, reservedAt int64, unmanaged bool) (*Reserve, error)
CreateReserve ... 予約を作成する
func (*Client) Entry ¶
func (c *Client) Entry(ctx context.Context, userID string, pf Platform, deviceID string, token string) error
Entry ... 登録する
func (*Client) GetReserve ¶
GetReserve ... 予約を取得する
func (*Client) ListReserve ¶
func (c *Client) ListReserve(ctx context.Context, limit int, cursor string) ([]*Reserve, string, error)
ListReserve ... 予約リストを取得する
func (*Client) SendByAllUsers ¶
SendByAllUsers ... 全員に送信する
type Message ¶
type Message struct { Title string `json:"title"` Body string `json:"body"` Data map[string]string `json:"data"` IOS *MessageIOS `json:"ios"` Android *MessageAndroid `json:"android"` Web *MessageWeb `json:"web"` }
Message ... プッシュ通知メッセージ
type MessageAndroid ¶
type MessageAndroid struct { ClickAction string `json:"click_action,omitempty"` Sound string `json:"sound,omitempty"` Tag string `json:"badge,omitempty"` }
MessageAndroid ... プッシュ通知メッセージ(Android独自部分)
type MessageIOS ¶
MessageIOS ... プッシュ通知メッセージ(iOS独自部分)
type MessageWeb ¶
type MessageWeb struct {
Icon string `json:"icon,omitempty"`
}
MessageWeb ... プッシュ通知メッセージ(Web独自部分)
type Reserve ¶
type Reserve struct { ID string `json:"id"` UserIDs []string `json:"user_ids"` Message *Message `json:"message"` ReservedAt int64 `json:"reserved_at"` Status ReserveStatus `json:"status"` Unmanaged bool `json:"unmanaged"` CreatedAt int64 `json:"created_at"` UpdatedAt int64 `json:"updated_at"` }
Reserve ... 予約
type ReserveStatus ¶
type ReserveStatus string
ReserveStatus ... 予約ステータス
const ( // ReserveStatusReserved ... 予約ステータス: 予約中 ReserveStatusReserved ReserveStatus = "reserved" // ReserveStatusCanceled ... 予約ステータス: キャンセル ReserveStatusCanceled ReserveStatus = "canceled" // ReserveStatusProcessing ... 予約ステータス: 処理中 ReserveStatusProcessing ReserveStatus = "processing" // ReserveStatusFailure ... 予約ステータス: 送信失敗 ReserveStatusFailure ReserveStatus = "failure" // ReserveStatusSuccess ... 予約ステータス: 送信成功 ReserveStatusSuccess ReserveStatus = "success" )
Click to show internal directories.
Click to hide internal directories.