Documentation
¶
Index ¶
- type AdminService
- func (a *AdminService) GetAuditLog(ctx context.Context, req *connect.Request[pbflagsv1.GetAuditLogRequest]) (*connect.Response[pbflagsv1.GetAuditLogResponse], error)
- func (a *AdminService) GetFlag(ctx context.Context, req *connect.Request[pbflagsv1.GetFlagRequest]) (*connect.Response[pbflagsv1.GetFlagResponse], error)
- func (a *AdminService) ListFeatures(ctx context.Context, _ *connect.Request[pbflagsv1.ListFeaturesRequest]) (*connect.Response[pbflagsv1.ListFeaturesResponse], error)
- func (a *AdminService) RemoveFlagOverride(_ context.Context, _ *connect.Request[pbflagsv1.RemoveFlagOverrideRequest]) (*connect.Response[pbflagsv1.RemoveFlagOverrideResponse], error)
- func (a *AdminService) SetFlagOverride(_ context.Context, _ *connect.Request[pbflagsv1.SetFlagOverrideRequest]) (*connect.Response[pbflagsv1.SetFlagOverrideResponse], error)
- func (a *AdminService) UpdateFlagState(ctx context.Context, req *connect.Request[pbflagsv1.UpdateFlagStateRequest]) (*connect.Response[pbflagsv1.UpdateFlagStateResponse], error)
- type AuditLogFilter
- type FlagCondition
- type FlagExtra
- type Store
- func (s *Store) GetAuditLog(ctx context.Context, filter AuditLogFilter) ([]*pbflagsv1.AuditLogEntry, error)
- func (s *Store) GetFlag(ctx context.Context, flagID string) (*pbflagsv1.FlagDetail, *FlagExtra, error)
- func (s *Store) GetFlagState(ctx context.Context, flagID string) (*pbflagsv1.GetFlagStateResponse, error)
- func (s *Store) GetKilledFlags(ctx context.Context) (*pbflagsv1.GetKilledFlagsResponse, error)
- func (s *Store) ListFeatures(ctx context.Context) ([]*pbflagsv1.FeatureDetail, map[string]int, error)
- func (s *Store) UpdateFlagState(ctx context.Context, flagID string, state pbflagsv1.State, actor string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminService ¶
type AdminService struct {
// contains filtered or unexported fields
}
AdminService implements the FlagAdminService Connect handler.
func NewAdminService ¶
func NewAdminService(store *Store, logger *slog.Logger) *AdminService
NewAdminService creates a FlagAdminService handler.
func (*AdminService) GetAuditLog ¶
func (a *AdminService) GetAuditLog(ctx context.Context, req *connect.Request[pbflagsv1.GetAuditLogRequest]) (*connect.Response[pbflagsv1.GetAuditLogResponse], error)
func (*AdminService) GetFlag ¶
func (a *AdminService) GetFlag(ctx context.Context, req *connect.Request[pbflagsv1.GetFlagRequest]) (*connect.Response[pbflagsv1.GetFlagResponse], error)
func (*AdminService) ListFeatures ¶
func (a *AdminService) ListFeatures(ctx context.Context, _ *connect.Request[pbflagsv1.ListFeaturesRequest]) (*connect.Response[pbflagsv1.ListFeaturesResponse], error)
func (*AdminService) RemoveFlagOverride ¶
func (a *AdminService) RemoveFlagOverride(_ context.Context, _ *connect.Request[pbflagsv1.RemoveFlagOverrideRequest]) (*connect.Response[pbflagsv1.RemoveFlagOverrideResponse], error)
func (*AdminService) SetFlagOverride ¶
func (a *AdminService) SetFlagOverride(_ context.Context, _ *connect.Request[pbflagsv1.SetFlagOverrideRequest]) (*connect.Response[pbflagsv1.SetFlagOverrideResponse], error)
func (*AdminService) UpdateFlagState ¶
func (a *AdminService) UpdateFlagState(ctx context.Context, req *connect.Request[pbflagsv1.UpdateFlagStateRequest]) (*connect.Response[pbflagsv1.UpdateFlagStateResponse], error)
type AuditLogFilter ¶ added in v0.4.1
AuditLogFilter specifies optional filters for audit log queries.
type FlagCondition ¶ added in v0.16.0
type FlagCondition struct {
CEL string // CEL expression; empty string means "otherwise" (default fallback)
Value string // formatted display value
}
FlagCondition represents a single condition in a flag's condition chain.
type FlagExtra ¶ added in v0.16.0
type FlagExtra struct {
Conditions []FlagCondition
ConditionsError string
SyncSHA string
}
FlagExtra holds non-proto data loaded alongside a FlagDetail.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store provides PostgreSQL persistence for flag state.
func (*Store) GetAuditLog ¶
func (s *Store) GetAuditLog(ctx context.Context, filter AuditLogFilter) ([]*pbflagsv1.AuditLogEntry, error)
GetAuditLog returns audit log entries, optionally filtered by flag ID, action, and actor.
func (*Store) GetFlag ¶
func (s *Store) GetFlag(ctx context.Context, flagID string) (*pbflagsv1.FlagDetail, *FlagExtra, error)
GetFlag returns details for a single flag.
func (*Store) GetFlagState ¶
func (s *Store) GetFlagState(ctx context.Context, flagID string) (*pbflagsv1.GetFlagStateResponse, error)
GetFlagState returns the state and value for a single flag.
func (*Store) GetKilledFlags ¶
GetKilledFlags returns globally killed flag IDs.
func (*Store) ListFeatures ¶
func (s *Store) ListFeatures(ctx context.Context) ([]*pbflagsv1.FeatureDetail, map[string]int, error)
ListFeatures returns all features with their non-archived flags. The second return value maps flag_id → condition count (0 = static/default).