crudstore

package
v0.38.7 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package crudstore defines the crudstore plugin interface shared between Porter and its plugin.

Index

Constants

View Source
const PluginInterface = "storage"

PluginInterface for the data storage. This first part of the three-part plugin key is only seen/used by the plugins when the host is communicating with the plugin and is not exposed to users.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func (*Client) Count added in v0.28.0

func (g *Client) Count(itemType string, group string) (int, error)

func (*Client) Delete

func (g *Client) Delete(itemType string, name string) error

func (*Client) List

func (g *Client) List(itemType string, group string) ([]string, error)

func (*Client) Read

func (g *Client) Read(itemType string, name string) ([]byte, error)

func (*Client) Save

func (g *Client) Save(itemType string, group string, name string, data []byte) error

type Plugin

type Plugin struct {
	Impl crud.Store
}

Plugin is a generic type of plugin for working with any implementation of a crud store.

func (Plugin) Client

func (Plugin) Client(b *plugin.MuxBroker, c *rpc.Client) (interface{}, error)

func (*Plugin) Server

func (p *Plugin) Server(*plugin.MuxBroker) (interface{}, error)

type Server

type Server struct {
	Impl crud.Store
}

func (*Server) Count added in v0.28.0

func (s *Server) Count(args map[string]interface{}, resp *int) error

func (*Server) Delete

func (s *Server) Delete(args map[string]interface{}, resp *interface{}) error

func (*Server) List

func (s *Server) List(args map[string]interface{}, resp *[]string) error

func (*Server) Read

func (s *Server) Read(args map[string]interface{}, resp *[]byte) error

func (*Server) Save

func (s *Server) Save(args map[string]interface{}, resp *interface{}) error

Jump to

Keyboard shortcuts

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