From f65cffebd783688a68ab4f464f6834d04cacaaa9 Mon Sep 17 00:00:00 2001 From: Israel Miller Date: Tue, 10 Aug 2021 14:46:52 -0400 Subject: [PATCH] adding missing publisher alias --- publisher/alias.go | 73 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 publisher/alias.go diff --git a/publisher/alias.go b/publisher/alias.go new file mode 100644 index 00000000..c8a32da6 --- /dev/null +++ b/publisher/alias.go @@ -0,0 +1,73 @@ +package publisher + +import ( + "context" + "time" + + "github.com/Azure/go-autorest/autorest/adal" + "github.com/Azure/go-shuttle/publisher/topic" +) + +// Deprecated: use topic package +type Publisher = topic.Publisher + +// Deprecated: use topic package +type ManagementOption = topic.ManagementOption + +// Deprecated: use topic package +type Option = topic.Option + +// Deprecated: use topic package +func New(ctx context.Context, topicName string, opts ...ManagementOption) (*Publisher, error) { + return topic.New(ctx, topicName, opts...) +} + +// Deprecated: use topic package +func WithConnectionString(connStr string) ManagementOption { + return topic.WithConnectionString(connStr) +} + +// Deprecated: use topic package +func WithEnvironmentName(environmentName string) ManagementOption { + return topic.WithEnvironmentName(environmentName) +} + +// Deprecated: use topic package +func WithManagedIdentityResourceID(serviceBusNamespaceName, managedIdentityResourceID string) ManagementOption { + return topic.WithManagedIdentityResourceID(serviceBusNamespaceName, managedIdentityResourceID) +} + +// Deprecated: use topic package +func WithManagedIdentityClientID(serviceBusNamespaceName, managedIdentityClientID string) ManagementOption { + return topic.WithManagedIdentityClientID(serviceBusNamespaceName, managedIdentityClientID) +} + +// Deprecated: use topic package +func WithToken(serviceBusNamespaceName string, spt *adal.ServicePrincipalToken) ManagementOption { + return topic.WithToken(serviceBusNamespaceName, spt) +} + +// Deprecated: use topic package +func SetDefaultHeader(headerName, msgKey string) ManagementOption { + return topic.SetDefaultHeader(headerName, msgKey) +} + +// Deprecated: use topic package +func WithDuplicateDetection(window *time.Duration) ManagementOption { + return topic.WithDuplicateDetection(window) +} + +// Deprecated: use topic package +func SetMessageDelay(delay time.Duration) Option { + return topic.SetMessageDelay(delay) +} + +// Deprecated: use topic package +func SetMessageID(messageID string) Option { + return topic.SetMessageID(messageID) +} + +// SetCorrelationID sets the SetCorrelationID of the message. +func SetCorrelationID(correlationID string) Option { + return topic.SetCorrelationID(correlationID) +} \ No newline at end of file