lsd

package module
v0.0.0-...-84617a3 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2020 License: MIT Imports: 24 Imported by: 0

README

lsd

LSD is a simple notification broker delivery

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectBoltDB

func ConnectBoltDB(path string) (*bolt.DB, error)

Types

type LSD

type LSD struct {
	// contains filtered or unexported fields
}

func NewLSD

func NewLSD(pathDB string, secure bool) (*LSD, error)

func (*LSD) GenerateNewTokenForUser

func (lsd *LSD) GenerateNewTokenForUser(c context.Context, p *proto.NewTokenPayload) (*proto.TokenResult, error)

func (*LSD) GenerateNewTokenForUserHTTP

func (lsd *LSD) GenerateNewTokenForUserHTTP(p *api.NewTokenPayload) (*api.TokenResult, error)

func (*LSD) GetToken

func (lsd *LSD) GetToken(c context.Context, p *proto.TokenPayload) (*proto.TokenResult, error)

func (*LSD) GetTokenHTTP

func (lsd *LSD) GetTokenHTTP(p *api.TokenPayload) (*api.TokenResult, error)

func (*LSD) RunWSService

func (lsd *LSD) RunWSService(wsPort int) error

func (*LSD) SendNotification

func (lsd *LSD) SendNotification(c context.Context, p *proto.NotificationPayload) (*proto.NotificationResult, error)

func (*LSD) SendNotificationHTTP

func (lsd *LSD) SendNotificationHTTP(p *api.NotificationPayload) (*api.NotificationResult, error)

type Markdown

type Markdown string

type Notification

type Notification struct {
	ID          string    `json:"id"`
	To          string    `json:"to"`
	DeliveredAt time.Time `json:"delivered_at"`
	Title       string    `json:"title"`
	Body        Markdown  `json:"body"`
	Options     []string  `json:"options"`
}

Directories

Path Synopsis
example

Jump to

Keyboard shortcuts

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