1
0
mirror of https://github.com/nikoksr/notify.git synced 2024-11-24 08:22:18 +02:00
Commit Graph

16 Commits

Author SHA1 Message Date
Niko Köser
bfafa2acb7
feat(notify): Add NewWithServices() constructor function
AddNewWithServices() accepts a variadic list of services and returns a
new, by New() created, Notify instance with the list of services set as
its notifiers.

If no services are given it's the functionally identical to just calling
New().

Calling NewWithServices() with a list of services is functionally equal
to calling New() and then UseServices().
2022-04-25 23:53:28 +02:00
Niko Köser
20ec590e87
feat(notify): add notifier options
Introducing Option functions. Options are meant to provide an extendable
way of instanciating a Notifier with a set of options. Currently, only
Enable()/Disable() are supported.

WithOptions() alters an already instanciated Notifier and
NewWithOptions() returns a new Notifier instance that was initialized
with the given options.

Options are passed in as a variadic list, thus, they're "optional".. no
pun intended. Calling New() results in an internal call to
NewWithOptions() without options passed, which again results in a
default Notifier being returned.
2022-04-22 20:29:22 +02:00
Niko Köser
ed8c8250f3
chore(build): check if Notify satisfies Notifier interface 2022-04-22 19:02:37 +02:00
Niko Köser
f7144f6107
feat(lib): add package-level functions (#208) 2022-02-09 14:10:08 +01:00
Niko Köser
51ca3c3df5
chore(generate): remove go generate directives for installing deps 2021-05-27 12:45:07 +02:00
Niko Köser
4ffb7c09cf
chore(comment): add punctuation to function comment 2021-02-10 14:49:25 +01:00
Niko Köser
c2e2e5e40d
build(make): Add make file and go-generate directives 2021-01-31 14:56:06 +01:00
KrishanBhalla
b07e71dade Requested Changes 2021-01-31 12:14:48 +00:00
KrishanBhalla
742d127319 Merge branch 'main' into Remove_Pseudo 2021-01-31 12:12:54 +00:00
KrishanBhalla
3d7cc206e1 Updated Notifier interface, altered telegram AddRecievers 2021-01-30 21:20:02 +00:00
KrishanBhalla
2a22a49e44 Merge branch 'main' into Remove_Pseudo 2021-01-30 21:07:31 +00:00
KrishanBhalla
80fca4a617 Updating the Notifier Interface 2021-01-30 21:07:06 +00:00
KrishanBhalla
472ffde83c Removed pseudo 2021-01-30 20:39:07 +00:00
Niko Köser
94e2bf0c5c
chore(lint): apply changes suggested by golangci-lint 2021-01-29 19:53:31 +01:00
Niko Köser
b9c0efe21f
refactor(lib): comment and clean up code 2021-01-25 05:05:28 +01:00
Niko Köser
911b879574
feat: init project 2021-01-25 00:14:21 +01:00