FeatureRepository

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2025 License: BSD-2-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	GetFeatureName(c context.Context, id uuid.UUID) (string, error)
	ListFeatures(c context.Context) []*db.Feature

	CreateFeature(c context.Context, name string, description string, value int) (uuid.UUID, error)
	UpdateFeature(c context.Context, id uuid.UUID, name string, description string, value int) error
	DeleteFeature(c context.Context, id uuid.UUID) error
}

type Repository

type Repository struct {
	repository.Mock
	// contains filtered or unexported fields
}

func New

func New(name string) *Repository

func (*Repository) CreateFeature

func (t *Repository) CreateFeature(c context.Context, name string, description string, value int) (uuid.UUID, error)

func (*Repository) DeleteFeature

func (t *Repository) DeleteFeature(c context.Context, id uuid.UUID) error

func (*Repository) GetFeatureName added in v0.4.0

func (t *Repository) GetFeatureName(c context.Context, id uuid.UUID) (string, error)

func (*Repository) Init

func (t *Repository) Init(app interfaces.IEngine, _ map[string]interface{}) error

func (*Repository) ListFeatures

func (t *Repository) ListFeatures(c context.Context) []*db.Feature

func (*Repository) UpdateFeature

func (t *Repository) UpdateFeature(c context.Context, id uuid.UUID, name string, description string, value int) error

Jump to

Keyboard shortcuts

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