var File_google_firebase_fcm_connection_v1alpha1_connection_api_proto protoreflect.FileDescriptor
func RegisterConnectionApiServer(s *grpc.Server, srv ConnectionApiServer)
Acknowledgement to indicate a client successfully received an FCM message.
If a message is not acked, FCM will continously resend the message until it expires. Duplicate delivery in this case is working as intended.
type Ack struct { // Id of message being acknowledged MessageId string `protobuf:"bytes,1,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"` // contains filtered or unexported fields }
func (*Ack) Descriptor() ([]byte, []int)
Deprecated: Use Ack.ProtoReflect.Descriptor instead.
func (x *Ack) GetMessageId() string
func (*Ack) ProtoMessage()
func (x *Ack) ProtoReflect() protoreflect.Message
func (x *Ack) Reset()
func (x *Ack) String() string
ConnectionApiClient is the client API for ConnectionApi service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type ConnectionApiClient interface { // Creates a streaming connection with FCM to send messages and their // respective ACKs. // // The client credentials need to be passed in the [gRPC // Metadata](https://grpc.io/docs/guides/concepts.html#metadata). The Format // of the header is: // // Key: "authorization" // Value: "Checkin [client_id:secret]" // // The project's API key also needs to be sent to authorize the project. // That can be set in the X-Goog-Api-Key Metadata header. Connect(ctx context.Context, opts ...grpc.CallOption) (ConnectionApi_ConnectClient, error) }
func NewConnectionApiClient(cc grpc.ClientConnInterface) ConnectionApiClient
ConnectionApiServer is the server API for ConnectionApi service.
type ConnectionApiServer interface { // Creates a streaming connection with FCM to send messages and their // respective ACKs. // // The client credentials need to be passed in the [gRPC // Metadata](https://grpc.io/docs/guides/concepts.html#metadata). The Format // of the header is: // // Key: "authorization" // Value: "Checkin [client_id:secret]" // // The project's API key also needs to be sent to authorize the project. // That can be set in the X-Goog-Api-Key Metadata header. Connect(ConnectionApi_ConnectServer) error }
type ConnectionApi_ConnectClient interface { Send(*UpstreamRequest) error Recv() (*DownstreamResponse, error) grpc.ClientStream }
type ConnectionApi_ConnectServer interface { Send(*DownstreamResponse) error Recv() (*UpstreamRequest, error) grpc.ServerStream }
Response sent to the connected client from FCM.
type DownstreamResponse struct { // The type of response FCM is sending to the client. // // Types that are assignable to ResponseType: // // *DownstreamResponse_Message ResponseType isDownstreamResponse_ResponseType `protobuf_oneof:"response_type"` // contains filtered or unexported fields }
func (*DownstreamResponse) Descriptor() ([]byte, []int)
Deprecated: Use DownstreamResponse.ProtoReflect.Descriptor instead.
func (x *DownstreamResponse) GetMessage() *Message
func (m *DownstreamResponse) GetResponseType() isDownstreamResponse_ResponseType
func (*DownstreamResponse) ProtoMessage()
func (x *DownstreamResponse) ProtoReflect() protoreflect.Message
func (x *DownstreamResponse) Reset()
func (x *DownstreamResponse) String() string
type DownstreamResponse_Message struct { // Message sent to FCM via the [Send // API](https://firebase.google.com/docs/cloud-messaging/send-message) // targeting this client. Message *Message `protobuf:"bytes,1,opt,name=message,proto3,oneof"` }
Message created through the [Send API](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#resource-message).
type Message struct { // The identifier of the message. Used to ack the message. MessageId string `protobuf:"bytes,1,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"` // Time the message was received in FCM. CreateTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` // Expiry time of the message. Currently it is always 4 weeks. ExpireTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expire_time,json=expireTime,proto3" json:"expire_time,omitempty"` // The arbitrary payload set in the [Send // API](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#resource-message). Data map[string]string `protobuf:"bytes,4,rep,name=data,proto3" json:"data,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // contains filtered or unexported fields }
func (*Message) Descriptor() ([]byte, []int)
Deprecated: Use Message.ProtoReflect.Descriptor instead.
func (x *Message) GetCreateTime() *timestamppb.Timestamp
func (x *Message) GetData() map[string]string
func (x *Message) GetExpireTime() *timestamppb.Timestamp
func (x *Message) GetMessageId() string
func (*Message) ProtoMessage()
func (x *Message) ProtoReflect() protoreflect.Message
func (x *Message) Reset()
func (x *Message) String() string
UnimplementedConnectionApiServer can be embedded to have forward compatible implementations.
type UnimplementedConnectionApiServer struct { }
func (*UnimplementedConnectionApiServer) Connect(ConnectionApi_ConnectServer) error
Request sent to FCM from the connected client.
type UpstreamRequest struct { // The type of request the client is making to FCM. // // Types that are assignable to RequestType: // // *UpstreamRequest_Ack RequestType isUpstreamRequest_RequestType `protobuf_oneof:"request_type"` // contains filtered or unexported fields }
func (*UpstreamRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpstreamRequest.ProtoReflect.Descriptor instead.
func (x *UpstreamRequest) GetAck() *Ack
func (m *UpstreamRequest) GetRequestType() isUpstreamRequest_RequestType
func (*UpstreamRequest) ProtoMessage()
func (x *UpstreamRequest) ProtoReflect() protoreflect.Message
func (x *UpstreamRequest) Reset()
func (x *UpstreamRequest) String() string
type UpstreamRequest_Ack struct { // Message acknowledgement. Ack *Ack `protobuf:"bytes,1,opt,name=ack,proto3,oneof"` }