model

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Document

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

func NewDocument

func NewDocument() *Document

func (*Document) Contents

func (d *Document) Contents() ([]byte, bool)

func (*Document) SetDocument

func (d *Document) SetDocument(doc *data.Document)

func (*Document) SetRenderer

func (d *Document) SetRenderer(r Renderer)

type DocumentIndex

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

func (*DocumentIndex) Add

func (i *DocumentIndex) Add(d *data.Document)

func (*DocumentIndex) Current

func (i *DocumentIndex) Current() (int, *data.Document)

func (*DocumentIndex) Follow

func (i *DocumentIndex) Follow(enabled bool)

func (*DocumentIndex) Len

func (i *DocumentIndex) Len() int

func (*DocumentIndex) MoveToFirst

func (i *DocumentIndex) MoveToFirst()

func (*DocumentIndex) MoveToLast

func (i *DocumentIndex) MoveToLast()

func (*DocumentIndex) Next

func (i *DocumentIndex) Next() (int, *data.Document)

func (*DocumentIndex) Prev

func (i *DocumentIndex) Prev() (int, *data.Document)

type DocumentStore

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

func NewDocumentStore

func NewDocumentStore() *DocumentStore

func (*DocumentStore) Current

func (s *DocumentStore) Current() (string, *DocumentIndex)

func (*DocumentStore) DocumentCount

func (s *DocumentStore) DocumentCount() int

func (*DocumentStore) Follow

func (s *DocumentStore) Follow(enabled bool)

func (*DocumentStore) Len

func (s *DocumentStore) Len() int

func (*DocumentStore) MoveToFirst

func (s *DocumentStore) MoveToFirst()

func (*DocumentStore) MoveToLast

func (s *DocumentStore) MoveToLast()

func (*DocumentStore) Next

func (s *DocumentStore) Next() (int, *data.Document)

func (*DocumentStore) Prev

func (s *DocumentStore) Prev() (int, *data.Document)

func (*DocumentStore) SetCurrent

func (s *DocumentStore) SetCurrent(name string)

func (*DocumentStore) Store

func (s *DocumentStore) Store(t string, d *data.Document)

func (*DocumentStore) Topics

func (s *DocumentStore) Topics() []string

type HexRenderer

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

func NewHexRenderer

func NewHexRenderer() *HexRenderer

func (*HexRenderer) Name

func (r *HexRenderer) Name() string

func (*HexRenderer) Render

func (r *HexRenderer) Render(data []byte) ([]byte, bool)

type JsonFlatRenderer added in v0.0.3

type JsonFlatRenderer struct{}

func NewJsonFlatRenderer added in v0.0.3

func NewJsonFlatRenderer() *JsonFlatRenderer

func (*JsonFlatRenderer) Name added in v0.0.3

func (r *JsonFlatRenderer) Name() string

func (*JsonFlatRenderer) Render added in v0.0.3

func (r *JsonFlatRenderer) Render(data []byte) ([]byte, bool)

type JsonRenderer

type JsonRenderer struct{}

func NewJsonRenderer

func NewJsonRenderer() *JsonRenderer

func (*JsonRenderer) Name

func (r *JsonRenderer) Name() string

func (*JsonRenderer) Render

func (r *JsonRenderer) Render(data []byte) ([]byte, bool)

type RawRenderer

type RawRenderer struct{}

func NewRawRenderer

func NewRawRenderer() *RawRenderer

func (*RawRenderer) Name

func (r *RawRenderer) Name() string

func (*RawRenderer) Render

func (r *RawRenderer) Render(data []byte) ([]byte, bool)

type Renderer

type Renderer interface {
	Name() string
	Render(data []byte) ([]byte, bool)
}

type SubscriptionFilter

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

func NewSubscriptionFilter

func NewSubscriptionFilter(filter string, qos network.Qos) *SubscriptionFilter

func (*SubscriptionFilter) Name

func (f *SubscriptionFilter) Name() string

func (*SubscriptionFilter) Qos

func (f *SubscriptionFilter) Qos() network.Qos

type SubscriptionFilters

type SubscriptionFilters []*SubscriptionFilter

func NewSubscriptionFilters

func NewSubscriptionFilters() *SubscriptionFilters

func (*SubscriptionFilters) Add

func (f *SubscriptionFilters) Add(filter *SubscriptionFilter)

func (*SubscriptionFilters) Contains

func (f *SubscriptionFilters) Contains(name string) bool

func (*SubscriptionFilters) Filters

func (f *SubscriptionFilters) Filters() []*SubscriptionFilter

func (*SubscriptionFilters) Remove

func (f *SubscriptionFilters) Remove(name string)

Jump to

Keyboard shortcuts

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