Documentation ¶
Overview ¶
Package pluginstore is an internal Porter package that implements the plugins.StorageProtocol interface via the hashicorp/go-plugins library.
Index ¶
- func NewStoragePluginConfig() pluggable.PluginTypeConfig
- type Client
- func (g *Client) Aggregate(opts plugins.AggregateOptions) ([]bson.Raw, error)
- func (g *Client) Count(opts plugins.CountOptions) (int64, error)
- func (g *Client) EnsureIndex(opts plugins.EnsureIndexOptions) error
- func (g *Client) Find(opts plugins.FindOptions) ([]bson.Raw, error)
- func (g *Client) Insert(opts plugins.InsertOptions) error
- func (g *Client) Patch(opts plugins.PatchOptions) error
- func (g *Client) Remove(opts plugins.RemoveOptions) error
- func (g *Client) Update(opts plugins.UpdateOptions) error
- type Plugin
- type Server
- func (s *Server) Aggregate(args map[string]interface{}, resp *[]bson.Raw) error
- func (s *Server) Count(args map[string]interface{}, resp *int64) error
- func (s *Server) EnsureIndex(args map[string]interface{}, _ *interface{}) error
- func (s *Server) Find(args map[string]interface{}, resp *[]bson.Raw) error
- func (s *Server) Insert(args map[string]interface{}, _ *interface{}) error
- func (s *Server) Patch(args map[string]interface{}, _ *interface{}) error
- func (s *Server) Remove(args map[string]interface{}, _ *interface{}) error
- func (s *Server) Update(args map[string]interface{}, _ *interface{}) error
- type Store
- func (s *Store) Aggregate(opts plugins.AggregateOptions) ([]bson.Raw, error)
- func (s *Store) Close() error
- func (s *Store) Connect() error
- func (s *Store) Count(opts plugins.CountOptions) (int64, error)
- func (s *Store) EnsureIndex(opts plugins.EnsureIndexOptions) error
- func (s *Store) Find(opts plugins.FindOptions) ([]bson.Raw, error)
- func (s *Store) Insert(opts plugins.InsertOptions) error
- func (s *Store) Patch(opts plugins.PatchOptions) error
- func (s *Store) Remove(opts plugins.RemoveOptions) error
- func (s *Store) Update(opts plugins.UpdateOptions) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewStoragePluginConfig ¶
func NewStoragePluginConfig() pluggable.PluginTypeConfig
NewStoragePluginConfig for porter home storage.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) EnsureIndex ¶
func (g *Client) EnsureIndex(opts plugins.EnsureIndexOptions) error
type Plugin ¶ added in v1.0.1
type Plugin struct {
Impl plugins.StorageProtocol
}
Plugin is a generic type of plugin for working with any implementation of a crud store.
type Server ¶
type Server struct {
Impl plugins.StorageProtocol
}
func (*Server) EnsureIndex ¶
type Store ¶
Store is a plugin-backed source of storage. It resolves the appropriate plugin based on Porter's config and implements the plugins.StorageProtocol interface using the backing plugin.
Connects just-in-time, but you must call Close to release resources.
func (*Store) Count ¶ added in v1.0.1
func (s *Store) Count(opts plugins.CountOptions) (int64, error)
func (*Store) EnsureIndex ¶ added in v1.0.1
func (s *Store) EnsureIndex(opts plugins.EnsureIndexOptions) error
Click to show internal directories.
Click to hide internal directories.