notificationsrv

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2019 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const MSGPROOFCLAIMV01 = "iden3.proofclaim.v0_1"
View Source
const MSGTXT = "iden3.txt.v0_1"

Variables

This section is empty.

Functions

func NewHttpError

func NewHttpError(response *http.Response) (error, error)

Types

type HttpError

type HttpError struct {
	Response   *http.Response
	StatusCode int
	Body       string
}

func (*HttpError) Error

func (e *HttpError) Error() string

type Notification

type Notification struct {
	Type string      `json:"type" binding:"required"`
	Data interface{} `json:"data" binding:"required"`
}

Notification defines the fields to be sent to the server

func NewMsgProofClaim

func NewMsgProofClaim(proofClaim *core.ProofClaim) Notification

func NewMsgTxt

func NewMsgTxt(txt string) Notification

type Service

type Service struct {
	URL   string
	Token string
	// contains filtered or unexported fields
}

Service defines fields to notification service

func New

func New(urlService string, signedPacketSigner *signedpacketsrv.SignedPacketSigner) *Service

New creates new notification service

func (*Service) SendNotification

func (ns *Service) SendNotification(notif Notification, id core.ID) error

SendNotification send notification to service

Jump to

Keyboard shortcuts

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