Documentation
¶
Index ¶
- type PostgresPluginStore
- func (s *PostgresPluginStore) Delete(ctx context.Context, id string) error
- func (s *PostgresPluginStore) FindByID(ctx context.Context, id string) (*plugindomain.Plugin, error)
- func (s *PostgresPluginStore) GetSetting(ctx context.Context, key string) (string, error)
- func (s *PostgresPluginStore) ListAll(ctx context.Context) ([]*plugindomain.Plugin, error)
- func (s *PostgresPluginStore) ListByType(ctx context.Context, pluginType string) ([]*plugindomain.Plugin, error)
- func (s *PostgresPluginStore) Save(ctx context.Context, p *plugindomain.Plugin) error
- func (s *PostgresPluginStore) SetSetting(ctx context.Context, key, value string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostgresPluginStore ¶
type PostgresPluginStore struct {
// contains filtered or unexported fields
}
PostgresPluginStore implements ports.PluginStore against the plugins and settings tables (see migrations/003 and 004).
func NewPostgresPluginStore ¶
func NewPostgresPluginStore(db *sql.DB) *PostgresPluginStore
NewPostgresPluginStore creates the store. db may be nil during development; all methods gracefully no-op or return empty results.
func (*PostgresPluginStore) Delete ¶
func (s *PostgresPluginStore) Delete(ctx context.Context, id string) error
func (*PostgresPluginStore) FindByID ¶
func (s *PostgresPluginStore) FindByID(ctx context.Context, id string) (*plugindomain.Plugin, error)
func (*PostgresPluginStore) GetSetting ¶
func (*PostgresPluginStore) ListAll ¶
func (s *PostgresPluginStore) ListAll(ctx context.Context) ([]*plugindomain.Plugin, error)
func (*PostgresPluginStore) ListByType ¶
func (s *PostgresPluginStore) ListByType(ctx context.Context, pluginType string) ([]*plugindomain.Plugin, error)
func (*PostgresPluginStore) Save ¶
func (s *PostgresPluginStore) Save(ctx context.Context, p *plugindomain.Plugin) error
func (*PostgresPluginStore) SetSetting ¶
func (s *PostgresPluginStore) SetSetting(ctx context.Context, key, value string) error
Click to show internal directories.
Click to hide internal directories.