storage

package
v0.5.8 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArangodbConfigFields

func ArangodbConfigFields() []*service.ConfigField

func CopyMeta

func CopyMeta(src, dst *service.Message)

func ElasticsearchConfigFields

func ElasticsearchConfigFields() []*service.ConfigField

func IsArangodbConfigured

func IsArangodbConfigured(conf *service.ParsedConfig) bool

func IsElasticsearchConfigured

func IsElasticsearchConfigured(conf *service.ParsedConfig) bool

Types

type ArangodbClient

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

func (ArangodbClient) Add

func (c ArangodbClient) Add(ctx context.Context, collection string, key string, value map[string]any) error

func (ArangodbClient) Close

func (c ArangodbClient) Close() error

func (ArangodbClient) Delete

func (c ArangodbClient) Delete(ctx context.Context, collection string, key string) error

func (ArangodbClient) Get

func (c ArangodbClient) Get(ctx context.Context, collection string, key string) (map[string]any, error)

func (ArangodbClient) List

func (c ArangodbClient) List(ctx context.Context, collection string, q any, pitEnabled bool, paging *PagingOpts) (Cursor, error)

func (ArangodbClient) Merge

func (c ArangodbClient) Merge(ctx context.Context, collection string, key string, value map[string]any) (map[string]any, error)

func (ArangodbClient) ParseQuery

func (c ArangodbClient) ParseQuery(config string) (any, error)

func (ArangodbClient) Set

func (c ArangodbClient) Set(ctx context.Context, collection string, key string, value map[string]any) error

type Client

type Client interface {
	ParseQuery(config string) (any, error)
	List(ctx context.Context, collection string, q any, pitEnabled bool, paging *PagingOpts) (Cursor, error)
	Get(ctx context.Context, collection string, key string) (map[string]any, error)
	Set(ctx context.Context, collection string, key string, value map[string]any) error
	Merge(ctx context.Context, collection string, key string, value map[string]any) (map[string]any, error)
	Add(ctx context.Context, collection string, key string, value map[string]any) error
	Delete(ctx context.Context, collection string, key string) error
	Close() error
}

func NewArangodbClientFromConfig

func NewArangodbClientFromConfig(conf *service.ParsedConfig, mgr *service.Resources) (Client, error)

func NewElasticsearchClientFromConfig

func NewElasticsearchClientFromConfig(conf *service.ParsedConfig, mgr *service.Resources) (Client, error)

type Cursor

type Cursor interface {
	HasNext() bool
	Read() (map[string]any, error)
	Close() error
}

type ElasticsearchClient

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

func (*ElasticsearchClient) Add

func (c *ElasticsearchClient) Add(ctx context.Context, collection string, key string, value map[string]any) error

func (*ElasticsearchClient) Close

func (c *ElasticsearchClient) Close() error

func (*ElasticsearchClient) Delete

func (c *ElasticsearchClient) Delete(ctx context.Context, collection string, key string) error

func (*ElasticsearchClient) Get

func (c *ElasticsearchClient) Get(ctx context.Context, collection string, key string) (map[string]any, error)

func (*ElasticsearchClient) List

func (c *ElasticsearchClient) List(ctx context.Context, collection string, q any, pitEnabled bool, paging *PagingOpts) (Cursor, error)

func (*ElasticsearchClient) Merge

func (c *ElasticsearchClient) Merge(ctx context.Context, collection string, key string, value map[string]any) (map[string]any, error)

func (*ElasticsearchClient) ParseQuery

func (c *ElasticsearchClient) ParseQuery(config string) (any, error)

func (*ElasticsearchClient) Set

func (c *ElasticsearchClient) Set(ctx context.Context, collection string, key string, value map[string]any) error

type PagingOpts

type PagingOpts struct {
	Offset int64
	Size   int64
}

type Query

type Query interface {
	Parse(config string) error
}

Jump to

Keyboard shortcuts

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