Documentation ¶
Overview ¶
Package notification provides a system by which it is possible to mock your objects and verify calls are happening as expected.
Example Usage n := notification.NewAWS(
"YOUR AWS Access Key", "YOUR AWS Secret Key", "YOUR AWS Platform Application ARN",
)
ipt := notification.Input{ Title: "Hello", Message: "Message", DeviceToken: "iOS Device Token", }
err := n.Send(ipt)
if err != nil { //handling error }
Index ¶
Constants ¶
const Version = "0.1.0"
The main version number that is being run at the moment.
Variables ¶
var GitCommit string
The git commit that was compiled. This will be filled in by the compiler.
var VersionPrerelease = ""
A pre-release marker for the version. If this is "" (empty string) then it means that it is a final release. Otherwise, this is a pre-release such as "dev" (in development)
Functions ¶
This section is empty.
Types ¶
type AWSPublisher ¶
AWSPublisher is a AWS SNS implementation of the `Service` interface
func NewAWS ¶
func NewAWS( accessKey string, secretKey string, arn string, ) AWSPublisher
NewAWS is a contructor of the `AWSPublisher`
func (AWSPublisher) Send ¶
func (a AWSPublisher) Send(input Input) error
Send a notification by using AWS SNS
type LocalLogger ¶
type LocalLogger struct { }
LocalLogger is a logginng the notification information in console. Thisis an implementation of the `Service` interface
func NewLocal ¶
func NewLocal() LocalLogger
func (LocalLogger) Send ¶
func (l LocalLogger) Send(input Input) error