...

Package connection

import "google.golang.org/genproto/googleapis/firebase/fcm/connection/v1alpha1"
Overview
Index

Overview ▾

Index ▾

Variables
func RegisterConnectionApiServer(s *grpc.Server, srv ConnectionApiServer)
type Ack
    func (*Ack) Descriptor() ([]byte, []int)
    func (x *Ack) GetMessageId() string
    func (*Ack) ProtoMessage()
    func (x *Ack) ProtoReflect() protoreflect.Message
    func (x *Ack) Reset()
    func (x *Ack) String() string
type ConnectionApiClient
    func NewConnectionApiClient(cc grpc.ClientConnInterface) ConnectionApiClient
type ConnectionApiServer
type ConnectionApi_ConnectClient
type ConnectionApi_ConnectServer
type DownstreamResponse
    func (*DownstreamResponse) Descriptor() ([]byte, []int)
    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
type Message
    func (*Message) Descriptor() ([]byte, []int)
    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
type UnimplementedConnectionApiServer
    func (*UnimplementedConnectionApiServer) Connect(ConnectionApi_ConnectServer) error
type UpstreamRequest
    func (*UpstreamRequest) Descriptor() ([]byte, []int)
    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

Package files

connection_api.pb.go

Variables

var File_google_firebase_fcm_connection_v1alpha1_connection_api_proto protoreflect.FileDescriptor

func RegisterConnectionApiServer

func RegisterConnectionApiServer(s *grpc.Server, srv ConnectionApiServer)

type Ack

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

func (*Ack) Descriptor() ([]byte, []int)

Deprecated: Use Ack.ProtoReflect.Descriptor instead.

func (*Ack) GetMessageId

func (x *Ack) GetMessageId() string

func (*Ack) ProtoMessage

func (*Ack) ProtoMessage()

func (*Ack) ProtoReflect

func (x *Ack) ProtoReflect() protoreflect.Message

func (*Ack) Reset

func (x *Ack) Reset()

func (*Ack) String

func (x *Ack) String() string

type ConnectionApiClient

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

func NewConnectionApiClient(cc grpc.ClientConnInterface) ConnectionApiClient

type ConnectionApiServer

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

type ConnectionApi_ConnectClient interface {
    Send(*UpstreamRequest) error
    Recv() (*DownstreamResponse, error)
    grpc.ClientStream
}

type ConnectionApi_ConnectServer

type ConnectionApi_ConnectServer interface {
    Send(*DownstreamResponse) error
    Recv() (*UpstreamRequest, error)
    grpc.ServerStream
}

type DownstreamResponse

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

func (*DownstreamResponse) Descriptor() ([]byte, []int)

Deprecated: Use DownstreamResponse.ProtoReflect.Descriptor instead.

func (*DownstreamResponse) GetMessage

func (x *DownstreamResponse) GetMessage() *Message

func (*DownstreamResponse) GetResponseType

func (m *DownstreamResponse) GetResponseType() isDownstreamResponse_ResponseType

func (*DownstreamResponse) ProtoMessage

func (*DownstreamResponse) ProtoMessage()

func (*DownstreamResponse) ProtoReflect

func (x *DownstreamResponse) ProtoReflect() protoreflect.Message

func (*DownstreamResponse) Reset

func (x *DownstreamResponse) Reset()

func (*DownstreamResponse) String

func (x *DownstreamResponse) String() string

type DownstreamResponse_Message

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"`
}

type Message

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

func (*Message) Descriptor() ([]byte, []int)

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetCreateTime

func (x *Message) GetCreateTime() *timestamppb.Timestamp

func (*Message) GetData

func (x *Message) GetData() map[string]string

func (*Message) GetExpireTime

func (x *Message) GetExpireTime() *timestamppb.Timestamp

func (*Message) GetMessageId

func (x *Message) GetMessageId() string

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

func (x *Message) ProtoReflect() protoreflect.Message

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

type UnimplementedConnectionApiServer

UnimplementedConnectionApiServer can be embedded to have forward compatible implementations.

type UnimplementedConnectionApiServer struct {
}

func (*UnimplementedConnectionApiServer) Connect

func (*UnimplementedConnectionApiServer) Connect(ConnectionApi_ConnectServer) error

type UpstreamRequest

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

func (*UpstreamRequest) Descriptor() ([]byte, []int)

Deprecated: Use UpstreamRequest.ProtoReflect.Descriptor instead.

func (*UpstreamRequest) GetAck

func (x *UpstreamRequest) GetAck() *Ack

func (*UpstreamRequest) GetRequestType

func (m *UpstreamRequest) GetRequestType() isUpstreamRequest_RequestType

func (*UpstreamRequest) ProtoMessage

func (*UpstreamRequest) ProtoMessage()

func (*UpstreamRequest) ProtoReflect

func (x *UpstreamRequest) ProtoReflect() protoreflect.Message

func (*UpstreamRequest) Reset

func (x *UpstreamRequest) Reset()

func (*UpstreamRequest) String

func (x *UpstreamRequest) String() string

type UpstreamRequest_Ack

type UpstreamRequest_Ack struct {
    // Message acknowledgement.
    Ack *Ack `protobuf:"bytes,1,opt,name=ack,proto3,oneof"`
}