grpc

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeliveryAttemptHandler

type DeliveryAttemptHandler struct {
	// contains filtered or unexported fields
}

DeliveryAttemptHandler implements methods for DeliveryAttempt get/list

func NewDeliveryAttemptHandler

func NewDeliveryAttemptHandler(deliveryAttemptService hammer.DeliveryAttemptService) DeliveryAttemptHandler

NewDeliveryAttemptHandler returns a new DeliveryAttempt

func (DeliveryAttemptHandler) GetDeliveryAttempt

GetDeliveryAttempt gets the DeliveryAttempt

func (DeliveryAttemptHandler) ListDeliveryAttempts

ListDeliveryAttempts get a list of DeliveryAttempts

type DeliveryHandler

type DeliveryHandler struct {
	// contains filtered or unexported fields
}

DeliveryHandler implements methods for Delivery get/list

func NewDeliveryHandler

func NewDeliveryHandler(deliveryService hammer.DeliveryService) DeliveryHandler

NewDeliveryHandler returns a new Delivery

func (DeliveryHandler) GetDelivery

func (d DeliveryHandler) GetDelivery(ctx context.Context, request *pb.GetDeliveryRequest) (*pb.Delivery, error)

GetDelivery gets the Delivery

func (DeliveryHandler) ListDeliveries

ListDeliveries get a list of deliveries

type MessageHandler

type MessageHandler struct {
	// contains filtered or unexported fields
}

MessageHandler implements methods for message create/update

func NewMessageHandler

func NewMessageHandler(messageService hammer.MessageService) MessageHandler

NewMessageHandler returns a new Message

func (MessageHandler) CreateMessage

func (m MessageHandler) CreateMessage(ctx context.Context, request *pb.CreateMessageRequest) (*pb.Message, error)

CreateMessage creates a new Message

func (MessageHandler) DeleteMessage

func (m MessageHandler) DeleteMessage(ctx context.Context, request *pb.DeleteMessageRequest) (*empty.Empty, error)

DeleteMessage delete the message

func (MessageHandler) GetMessage

func (m MessageHandler) GetMessage(ctx context.Context, request *pb.GetMessageRequest) (*pb.Message, error)

GetMessage gets the message

func (MessageHandler) ListMessages

ListMessages get a list of messages

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server implements grpc server

func NewServer

func NewServer(topicHandler TopicHandler, subscriptionHandler SubscriptionHandler, messageHandler MessageHandler, deliveryHandler DeliveryHandler, deliveryAttemptHandler DeliveryAttemptHandler) Server

NewServer returns a new server

func (Server) CreateMessage

func (s Server) CreateMessage(ctx context.Context, request *pb.CreateMessageRequest) (*pb.Message, error)

CreateMessage creates a new message

func (Server) CreateSubscription

func (s Server) CreateSubscription(ctx context.Context, request *pb.CreateSubscriptionRequest) (*pb.Subscription, error)

CreateSubscription creates a new subscription

func (Server) CreateTopic

func (s Server) CreateTopic(ctx context.Context, request *pb.CreateTopicRequest) (*pb.Topic, error)

CreateTopic creates a new topic

func (Server) DeleteMessage

func (s Server) DeleteMessage(ctx context.Context, request *pb.DeleteMessageRequest) (*empty.Empty, error)

DeleteMessage delete the message

func (Server) DeleteSubscription

func (s Server) DeleteSubscription(ctx context.Context, request *pb.DeleteSubscriptionRequest) (*empty.Empty, error)

DeleteSubscription delete the subscription

func (Server) DeleteTopic

func (s Server) DeleteTopic(ctx context.Context, request *pb.DeleteTopicRequest) (*empty.Empty, error)

DeleteTopic delete the topic

func (Server) GetDelivery

func (s Server) GetDelivery(ctx context.Context, request *pb.GetDeliveryRequest) (*pb.Delivery, error)

GetDelivery gets the delivery

func (Server) GetDeliveryAttempt

func (s Server) GetDeliveryAttempt(ctx context.Context, request *pb.GetDeliveryAttemptRequest) (*pb.DeliveryAttempt, error)

GetDeliveryAttempt gets the delivery attempt

func (Server) GetMessage

func (s Server) GetMessage(ctx context.Context, request *pb.GetMessageRequest) (*pb.Message, error)

GetMessage gets the message

func (Server) GetSubscription

func (s Server) GetSubscription(ctx context.Context, request *pb.GetSubscriptionRequest) (*pb.Subscription, error)

GetSubscription gets the subscription

func (Server) GetTopic

func (s Server) GetTopic(ctx context.Context, request *pb.GetTopicRequest) (*pb.Topic, error)

GetTopic gets the topic

func (Server) ListDeliveries

func (s Server) ListDeliveries(ctx context.Context, request *pb.ListDeliveriesRequest) (*pb.ListDeliveriesResponse, error)

ListDeliveries get a list of deliveries

func (Server) ListDeliveryAttempts

func (s Server) ListDeliveryAttempts(ctx context.Context, request *pb.ListDeliveryAttemptsRequest) (*pb.ListDeliveryAttemptsResponse, error)

ListDeliveryAttempts get a list of delivery attempts

func (Server) ListMessages

func (s Server) ListMessages(ctx context.Context, request *pb.ListMessagesRequest) (*pb.ListMessagesResponse, error)

ListMessages get a list of messages

func (Server) ListSubscriptions

func (s Server) ListSubscriptions(ctx context.Context, request *pb.ListSubscriptionsRequest) (*pb.ListSubscriptionsResponse, error)

ListSubscriptions get a list of subscriptions

func (Server) ListTopics

func (s Server) ListTopics(ctx context.Context, request *pb.ListTopicsRequest) (*pb.ListTopicsResponse, error)

ListTopics get a list of topics

func (Server) UpdateSubscription

func (s Server) UpdateSubscription(ctx context.Context, request *pb.UpdateSubscriptionRequest) (*pb.Subscription, error)

UpdateSubscription update the subscription

func (Server) UpdateTopic

func (s Server) UpdateTopic(ctx context.Context, request *pb.UpdateTopicRequest) (*pb.Topic, error)

UpdateTopic update the topic

type SubscriptionHandler

type SubscriptionHandler struct {
	// contains filtered or unexported fields
}

SubscriptionHandler implements methods for topic create/update

func NewSubscriptionHandler

func NewSubscriptionHandler(subscriptionService hammer.SubscriptionService) SubscriptionHandler

NewSubscriptionHandler returns a new Topic

func (SubscriptionHandler) CreateSubscription

func (s SubscriptionHandler) CreateSubscription(ctx context.Context, request *pb.CreateSubscriptionRequest) (*pb.Subscription, error)

CreateSubscription creates a new subscription

func (SubscriptionHandler) DeleteSubscription

func (s SubscriptionHandler) DeleteSubscription(ctx context.Context, request *pb.DeleteSubscriptionRequest) (*empty.Empty, error)

DeleteSubscription delete the subscription

func (SubscriptionHandler) GetSubscription

func (s SubscriptionHandler) GetSubscription(ctx context.Context, request *pb.GetSubscriptionRequest) (*pb.Subscription, error)

GetSubscription gets the subscription

func (SubscriptionHandler) ListSubscriptions

ListSubscriptions get a list of topics

func (SubscriptionHandler) UpdateSubscription

func (s SubscriptionHandler) UpdateSubscription(ctx context.Context, request *pb.UpdateSubscriptionRequest) (*pb.Subscription, error)

UpdateSubscription update the subscription

type TopicHandler

type TopicHandler struct {
	// contains filtered or unexported fields
}

TopicHandler implements methods for topic create/update

func NewTopicHandler

func NewTopicHandler(topicService hammer.TopicService) TopicHandler

NewTopicHandler returns a new Topic

func (TopicHandler) CreateTopic

func (t TopicHandler) CreateTopic(ctx context.Context, request *pb.CreateTopicRequest) (*pb.Topic, error)

CreateTopic creates a new topic

func (TopicHandler) DeleteTopic

func (t TopicHandler) DeleteTopic(ctx context.Context, request *pb.DeleteTopicRequest) (*empty.Empty, error)

DeleteTopic delete the topic

func (TopicHandler) GetTopic

func (t TopicHandler) GetTopic(ctx context.Context, request *pb.GetTopicRequest) (*pb.Topic, error)

GetTopic gets the topic

func (TopicHandler) ListTopics

func (t TopicHandler) ListTopics(ctx context.Context, request *pb.ListTopicsRequest) (*pb.ListTopicsResponse, error)

ListTopics get a list of topics

func (TopicHandler) UpdateTopic

func (t TopicHandler) UpdateTopic(ctx context.Context, request *pb.UpdateTopicRequest) (*pb.Topic, error)

UpdateTopic update the topic

Jump to

Keyboard shortcuts

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