pusher

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2020 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package pusher is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_pusher_proto protoreflect.FileDescriptor

Functions

func RegisterPushMessagingHandler

func RegisterPushMessagingHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterPushMessagingHandler registers the http handlers for service PushMessaging to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterPushMessagingHandlerClient

func RegisterPushMessagingHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PushMessagingClient) error

RegisterPushMessagingHandlerClient registers the http handlers for service PushMessaging to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PushMessagingClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PushMessagingClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "PushMessagingClient" to call the correct interceptors.

func RegisterPushMessagingHandlerFromEndpoint

func RegisterPushMessagingHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterPushMessagingHandlerFromEndpoint is same as RegisterPushMessagingHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterPushMessagingHandlerServer

func RegisterPushMessagingHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PushMessagingServer) error

RegisterPushMessagingHandlerServer registers the http handlers for service PushMessaging to "mux". UnaryRPC :call PushMessagingServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.

func RegisterPushMessagingServer

func RegisterPushMessagingServer(s *grpc.Server, srv PushMessagingServer)

Types

type PushMessage

type PushMessage struct {
	DeviceTokens []string          `protobuf:"bytes,2,rep,name=device_tokens,json=deviceTokens,proto3" json:"device_tokens,omitempty"`
	Title        string            `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	Message      string            `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	Details      map[string]string `` /* 155-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*PushMessage) Descriptor deprecated

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

Deprecated: Use PushMessage.ProtoReflect.Descriptor instead.

func (*PushMessage) GetDetails

func (x *PushMessage) GetDetails() map[string]string

func (*PushMessage) GetDeviceTokens

func (x *PushMessage) GetDeviceTokens() []string

func (*PushMessage) GetMessage

func (x *PushMessage) GetMessage() string

func (*PushMessage) GetTitle

func (x *PushMessage) GetTitle() string

func (*PushMessage) ProtoMessage

func (*PushMessage) ProtoMessage()

func (*PushMessage) ProtoReflect

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

func (*PushMessage) Reset

func (x *PushMessage) Reset()

func (*PushMessage) String

func (x *PushMessage) String() string

type PushMessagingClient

type PushMessagingClient interface {
	// Sends push message
	SendPushMessage(ctx context.Context, in *PushMessage, opts ...grpc.CallOption) (*empty.Empty, error)
}

PushMessagingClient is the client API for PushMessaging service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type PushMessagingServer

type PushMessagingServer interface {
	// Sends push message
	SendPushMessage(context.Context, *PushMessage) (*empty.Empty, error)
}

PushMessagingServer is the server API for PushMessaging service.

type UnimplementedPushMessagingServer

type UnimplementedPushMessagingServer struct {
}

UnimplementedPushMessagingServer can be embedded to have forward compatible implementations.

func (*UnimplementedPushMessagingServer) SendPushMessage

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL