dal

package
v0.0.0-...-9f5b622 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSubscriber

func CreateSubscriber(filterExp string, url string, topic string) bool

CreateSubscriber creates a new subscriber and returns the status of the creation as bool

func DeleteAllSubscribers

func DeleteAllSubscribers() bool

DeleteAllSubscribers deletes all subscribers' records from database

func GroupSubscribersByTopic

func GroupSubscribersByTopic() map[string][]Subscriber

GroupSubscribersByTopic returns a map of topics each key holding an array of associated subscribers

Types

type Subscriber

type Subscriber struct {
	gorm.Model
	FilterExpression string
	TargetURL        string
	Topic            string
}

Subscriber the struct holding info about each topic subscriber

func FetchAllSubscribers

func FetchAllSubscribers() []Subscriber

FetchAllSubscribers lists all subscribers in the subcribers table

Jump to

Keyboard shortcuts

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