metathings_mosquitto_plugin_service

package
v1.2.7 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	WEBHOOK_HMAC_TIMESTAMP, _    = time.Parse(time.RFC3339, "2019-01-01T00:00:00Z")
	WEBHOOK_HMAC_TIMESTAMP_INT64 = int64(1546300800000000000) // WEBHOOK_HMAC_TIMESTAMP.UnixNano()
	WEBHOOK_HMAC_NONCE           = int64(1024)
)
View Source
var (
	ErrBadRequest = errors.New("bad request")
)

Functions

func ParseMosquittoPluginPassword

func ParseMosquittoPluginPassword(id, secret string) string

Types

type MosquittoPluginService

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

func NewMosquittoPluginService

func NewMosquittoPluginService(
	opt *MosquittoPluginServiceOption,
	logger log.FieldLogger,
	storage storage.Storage,
) (*MosquittoPluginService, error)

func (*MosquittoPluginService) WebhookHandler

func (s *MosquittoPluginService) WebhookHandler(w http.ResponseWriter, r *http.Request)

type MosquittoPluginServiceOption

type MosquittoPluginServiceOption struct {
	Webhook struct {
		Secret string
	}
}

Jump to

Keyboard shortcuts

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