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"`
AlertSettings *types.AlertSettings `json:"alert_settings,omitempty"`
EnvironmentID string `json:"environment_id"`
types.BaseModel
}
func FromEntList ¶
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
Click to show internal directories.
Click to hide internal directories.