gosse: github.com/mlavergn/gosse Index | Files | Directories

package gosse

import "github.com/mlavergn/gosse"

Index

Package Files

sse.go

Constants

const Version = "0.3.2"

Version export

type SSEPayload Uses

type SSEPayload struct {
    Type        string                 `json:"type"`
    Data        map[string]interface{} `json:"data"`
    Origin      string                 `json:"origin"`
    LastEventID string                 `json:"lastEventId"`
    Source      string                 `json:"source"`
}

SSEPayload type

func NewSSEPayload Uses

func NewSSEPayload(data map[string]interface{}, origin string) *SSEPayload

NewSSEPayload init

func NewSSEPayloadFromMap Uses

func NewSSEPayloadFromMap(dict map[string]interface{}) *SSEPayload

NewSSEPayloadFromMap init

func NewSSEPayloadFromRaw Uses

func NewSSEPayloadFromRaw(lines [][]byte) *SSEPayload

NewSSEPayloadFromRaw init

func (*SSEPayload) JSON Uses

func (id *SSEPayload) JSON() string

JSON provides a string JSON representation of the struct

func (*SSEPayload) SSE Uses

func (id *SSEPayload) SSE() []byte

SSE provides a []byte representation of the struct in SSE format

func (*SSEPayload) String Uses

func (id *SSEPayload) String() string

String provides a string representation of the struct suitable for logging

Directories

PathSynopsis
cmd

Package gosse imports 5 packages (graph) and is imported by 1 packages. Updated 2020-08-13. Refresh now. Tools for package owners.