feature

package
v1.0.21 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2025 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Feature

type Feature struct {
	ID            string            `json:"id"`
	Name          string            `json:"name"`
	LookupKey     string            `json:"lookup_key"`
	Description   string            `json:"description"`
	MeterID       string            `json:"meter_id"`
	Metadata      types.Metadata    `json:"metadata"`
	Type          types.FeatureType `json:"type"`
	UnitSingular  string            `json:"unit_singular"`
	UnitPlural    string            `json:"unit_plural"`
	EnvironmentID string            `json:"environment_id"`
	types.BaseModel
}

func FromEnt

func FromEnt(f *ent.Feature) *Feature

FromEnt converts ent.Feature to domain Feature

func FromEntList

func FromEntList(features []*ent.Feature) []*Feature

FromEntList converts []*ent.Feature to []*Feature

type Repository

type Repository interface {
	Create(ctx context.Context, feature *Feature) error
	Get(ctx context.Context, id string) (*Feature, error)
	List(ctx context.Context, filter *types.FeatureFilter) ([]*Feature, error)
	ListAll(ctx context.Context, filter *types.FeatureFilter) ([]*Feature, error)
	Count(ctx context.Context, filter *types.FeatureFilter) (int, error)
	Update(ctx context.Context, feature *Feature) error
	Delete(ctx context.Context, id string) error
	ListByIDs(ctx context.Context, featureIDs []string) ([]*Feature, error)
}

Repository defines the interface for feature storage operations

Jump to

Keyboard shortcuts

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