content

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContentData

type ContentData struct {
	Host   string
	Uri    string
	Method string
}

type ContentEvent

type ContentEvent struct {
	Type ContentEventType
	Data ContentData
}

type ContentEventType

type ContentEventType int
const (
	Created ContentEventType = iota
	Updated
	Removed
)

func (ContentEventType) String

func (c ContentEventType) String() string

type ContentService

type ContentService interface {
	GetContent(host, uri, method, uuid string) (*[]byte, error)
	SetContent(host, uri, method, uuid string, data *[]byte) error
	DeleteContent(host, uri, method, uuid string) error
	ListContents(uuid string) (*[]ContentData, error)
	Subscribe(subscriberId string, eventTypes ...ContentEventType) <-chan ContentEvent
	Unsubscribe(subscriberId string)
}

func GetContentService

func GetContentService() ContentService

Jump to

Keyboard shortcuts

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