Documentation
¶
Index ¶
- func Attach(mux goahttp.Muxer, service *Service)
- func FeatureCacheKey(organizationID string, feature Feature) string
- type Client
- func (c *Client) IsFeatureEnabled(ctx context.Context, organizationID string, feature Feature) (bool, error)
- func (c *Client) PlatformFeatureCheck(ctx context.Context, organizationID string, feature string) bool
- func (c *Client) UpdateFeatureCache(ctx context.Context, organizationID string, feature Feature, enabled bool)
- type Feature
- type FeatureCache
- type OpenRouterKeyRefresher
- type Service
- func (s *Service) APIKeyAuth(ctx context.Context, key string, schema *security.APIKeyScheme) (context.Context, error)
- func (s *Service) GetProductFeatures(ctx context.Context, payload *gen.GetProductFeaturesPayload) (*gen.GetProductFeaturesResult, error)
- func (s *Service) SetProductFeature(ctx context.Context, payload *gen.SetProductFeaturePayload) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FeatureCacheKey ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) IsFeatureEnabled ¶
func (*Client) PlatformFeatureCheck ¶
func (c *Client) PlatformFeatureCheck(ctx context.Context, organizationID string, feature string) bool
PlatformFeatureCheck adapts IsFeatureEnabled to the platformtools.FeatureChecker signature so it can gate platform-tool dispatch. Errors degrade to "disabled" so a transient lookup failure does not silently grant access; the underlying error is logged for ops.
func (*Client) UpdateFeatureCache ¶
func (c *Client) UpdateFeatureCache(ctx context.Context, organizationID string, feature Feature, enabled bool)
UpdateFeatureCache stores the given enabled state for the feature directly into the cache. Call this after writing the feature flag to the database from a code path that bypasses this client, so the cache stays consistent.
type FeatureCache ¶
func (FeatureCache) AdditionalCacheKeys ¶
func (c FeatureCache) AdditionalCacheKeys() []string
func (FeatureCache) CacheKey ¶
func (f FeatureCache) CacheKey() string
func (FeatureCache) TTL ¶
func (f FeatureCache) TTL() time.Duration
type OpenRouterKeyRefresher ¶
type OpenRouterKeyRefresher interface {
ScheduleOpenRouterKeyRefresh(ctx context.Context, orgID string) error
CancelOpenRouterKeyRefreshWorkflow(ctx context.Context, orgID string) error
}
OpenRouterKeyRefresher defines the interface for managing openrouter key refresh workflows
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service implements organization feature management operations.
func NewService ¶
func (*Service) APIKeyAuth ¶
func (*Service) GetProductFeatures ¶
func (s *Service) GetProductFeatures(ctx context.Context, payload *gen.GetProductFeaturesPayload) (*gen.GetProductFeaturesResult, error)
func (*Service) SetProductFeature ¶
Click to show internal directories.
Click to hide internal directories.