entities

package
v0.0.1-beta2 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Doc

type Doc struct {
	Name    string `json:"id"`
	Content string `json:"raw"`
}

func NewDoc

func NewDoc(name, content string) Doc

func (Doc) Hash

func (d Doc) Hash() HashKey

func (Doc) Id

func (d Doc) Id() string

func (Doc) Raw

func (d Doc) Raw() string

type DocRequest

type DocRequest struct {
	Name    string
	Content string

	MimeType MimeType
	// contains filtered or unexported fields
}

func NewDocRequest

func NewDocRequest(name, content string) DocRequest

func NewDocRequestWith

func NewDocRequestWith(name, content, statement string) DocRequest

func NewDocRequestWithMime

func NewDocRequestWithMime(name, content string, mime MimeType) DocRequest

func (DocRequest) ID

func (d DocRequest) ID() string

func (DocRequest) Mime

func (d DocRequest) Mime() MimeType

func (DocRequest) Raw

func (d DocRequest) Raw() string

func (DocRequest) Statement

func (d DocRequest) Statement() string

type HashKey

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

type Hashable

type Hashable interface {
	Hash() HashKey
}

type Iterator

type Iterator interface {
	Pos() int
	Iterable() Result
	Next() (Row, bool)
	Chain(Iterator) Iterator
}

type LengthWise

type LengthWise interface {
	Len() int
}

type MimeType

type MimeType byte
const (
	MimeText MimeType = iota + 1
	MimeJSON
)

type Result

type Result interface {
	Len() int
	Get(index int) Row
}

type Row

type Row interface {
	Doc() Doc
	Ser(serializer Serializer) []byte
}

type Serializer

type Serializer interface {
	Serialize(item Row) []byte
}

Jump to

Keyboard shortcuts

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