fflag

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager interface {
	Add(ctx context.Context, record Record) error
	AddMultiple(ctx context.Context, records []Record) error
	ExecWhenEnabled(ctx context.Context, feature string, f func())
	IsEnabled(ctx context.Context, feature string) bool

	Init() error
	MustInit() Manager
}

func New

func New(dbm db.Manager) Manager

type Record

type Record struct {
	Id            int64      `db:"id"`
	Feature       string     `db:"feature"`
	Enabled       bool       `db:"enabled"`
	LastChangedBy string     `db:"last_changed_by"`
	CreatedAt     time.Time  `db:"created_at"`
	UpdatedAt     *time.Time `db:"updated_at"`
}

Jump to

Keyboard shortcuts

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