notification

package
v1.33.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSecretKeyArn

func GetSecretKeyArn(accountId, region, service, stage string) string

func GetSecretKeyName

func GetSecretKeyName(service, stage string) string

Types

type NotificationClient

type NotificationClient interface {
	Dial(host, port string, opts ...grpc.DialOption) error
	DialWithContext(ctx context.Context, host, port string, opts ...grpc.DialOption) (err error)
	DialUsingCredentials(sess *session.Session, host, port, secretKey string, opts ...grpc.DialOption) error
	DialUsingCredentialsWithContext(ctx context.Context, sess *session.Session, host, port, secretKey string, opts ...grpc.DialOption) error
	Close() error
	SetRequestTimeout(d time.Duration)

	DeepPing() error
	DeepPingWithContext(ctx context.Context) error

	SetNotificationType(notificationType proto.NotificationType) error
	SetNotificationTypeWithContext(ctx context.Context, notificationType proto.NotificationType) error

	GetNotificationType(name string) (proto.NotificationType, error)
	GetNotificationTypeWithContext(ctx context.Context, name string) (proto.NotificationType, error)

	RemoveNotificationType(name string) error
	RemoveNotificationTypeWithContext(ctx context.Context, name string) error

	InitiateNotification(notificationType proto.NotificationType, resource common.Origin, header, body, createdBy string) (string, error)
	InitiateNotificationWithContext(ctx context.Context, notificationType proto.NotificationType, resource common.Origin, header, body, createdBy string) (string, error)

	GetInitiatedNotification(externalId string) (proto.InitiatedNotification, error)
	GetInitiatedNotificationWithContext(ctx context.Context, externalId string) (proto.InitiatedNotification, error)

	RemoveInitiatedNotification(externalId string) error
	RemoveInitiatedNotificationWithContext(ctx context.Context, externalId string) error

	SetUserPreferences(prefs []proto.UserPreference) error
	SetUserPreferencesWithContext(ctx context.Context, prefs []proto.UserPreference) error

	GetUserPreferences(userID string) ([]proto.UserPreference, error)
	GetUserPreferencesWithContext(ctx context.Context, userID string) ([]proto.UserPreference, error)

	RemoveUserPreferences(userID string, notificationTypeExtId string) error
	RemoveUserPreferencesWithContext(ctx context.Context, userID string, notificationTypeExtId string) error

	GetUserNotifications(userID string, limit int32) ([]proto.UserNotification, error)
	GetUserNotificationsWithContext(ctx context.Context, userID string, limit int32) ([]proto.UserNotification, error)

	RemoveUserNotifications(userID string, initatedNotificationExtId string) error
	RemoveUserNotificationsWithContext(ctx context.Context, userID string, initatedNotificationExtId string) error
}

func CreateClient

func CreateClient() NotificationClient

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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