Documentation
¶
Overview ¶
Package nock is a flags.Store backed by a SQL database through github.com/fletchhq/fletch/nock. It works on SQLite and Postgres.
Index ¶
- Constants
- func Migrate(ctx context.Context, db fnock.Executor) error
- type Store
- func (s *Store) Delete(ctx context.Context, flag, scope string) error
- func (s *Store) Get(ctx context.Context, flag, scope string) ([]byte, bool, error)
- func (s *Store) List(ctx context.Context, flag string) ([]flags.Entry, error)
- func (s *Store) Purge(ctx context.Context, names ...string) error
- func (s *Store) Set(ctx context.Context, flag, scope string, value []byte) error
Constants ¶
const Schema = `` /* 152-byte string literal not displayed */
Schema is the DDL for the Store's table. It is valid on SQLite and Postgres; copy it into an application migration or run Migrate.
const TableName = "feature_flags"
TableName is the table the Store uses.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store implements flags.Store on a nock database.
func New ¶
New returns a Store that runs on db, a *nock.Database or *nock.Transaction. The table must exist; see Migrate.