content

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2025 License: MIT Imports: 11 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)
}

type FilesystemContentService added in v1.2.0

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

func NewFilesystemContentService added in v1.2.0

func NewFilesystemContentService(mocksDirConfig *config.MocksDirectoryConfig) *FilesystemContentService

func (*FilesystemContentService) DeleteContent added in v1.2.0

func (f *FilesystemContentService) DeleteContent(host, uri, method, uuid string) error

func (*FilesystemContentService) GetContent added in v1.2.0

func (f *FilesystemContentService) GetContent(host, uri, method, uuid string) (*[]byte, error)

func (*FilesystemContentService) ListContents added in v1.2.0

func (f *FilesystemContentService) ListContents(uuid string) (*[]ContentData, error)

func (*FilesystemContentService) SetContent added in v1.2.0

func (f *FilesystemContentService) SetContent(host, uri, method, uuid string, data *[]byte) error

func (*FilesystemContentService) Subscribe added in v1.2.0

func (f *FilesystemContentService) Subscribe(subscriberId string, eventTypes ...ContentEventType) <-chan ContentEvent

func (*FilesystemContentService) Unsubscribe added in v1.2.0

func (f *FilesystemContentService) Unsubscribe(subscriberId string)

Jump to

Keyboard shortcuts

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