Versions in this module Expand all Collapse all v1 v1.0.0 Aug 25, 2023 Changes in this version + var ErrInternal = errors.New("internal error") + var ErrNotFound = errors.New("not found") + var ErrNotImplemented = errors.New("endpoint not implemented") + var ErrStreamDisconnected = errors.New("SaaS stream disconnected") + var ErrUnauthorised = errors.New("unauthorised") + type CacheHealthFn func(ctx context.Context) error + type Config struct + AuthFn authTokenFn + AuthRepo repository.AuthRepo + CacheHealthFn CacheHealthFn + ClientService clientService + EnvHealthFn EnvHealthFn + FeatureRepo repository.FeatureFlagRepo + Hasher hash.Hasher + Logger log.ContextualLogger + MetricService metricService + Offline bool + SDKClients SDKClients + SegmentRepo repository.SegmentRepo + StreamingEnabled bool + TargetRepo repository.TargetRepo + type EnvHealthFn func() []domain.EnvironmentHealth + type ProxyService interface + Authenticate func(ctx context.Context, req domain.AuthRequest) (domain.AuthResponse, error) + Evaluations func(ctx context.Context, req domain.EvaluationsRequest) ([]clientgen.Evaluation, error) + EvaluationsByFeature func(ctx context.Context, req domain.EvaluationsByFeatureRequest) (clientgen.Evaluation, error) + FeatureConfig func(ctx context.Context, req domain.FeatureConfigRequest) ([]domain.FeatureConfig, error) + FeatureConfigByIdentifier func(ctx context.Context, req domain.FeatureConfigByIdentifierRequest) (domain.FeatureConfig, error) + Health func(ctx context.Context) (domain.HealthResponse, error) + Metrics func(ctx context.Context, req domain.MetricsRequest) error + Stream func(ctx context.Context, req domain.StreamRequest) (domain.StreamResponse, error) + TargetSegments func(ctx context.Context, req domain.TargetSegmentsRequest) ([]domain.Segment, error) + TargetSegmentsByIdentifier func(ctx context.Context, req domain.TargetSegmentsByIdentifierRequest) (domain.Segment, error) + type QueryStore struct + F func(identifier string) (rest.FeatureConfig, error) + L func() ([]rest.FeatureConfig, error) + S func(identifier string) (rest.Segment, error) + func (q QueryStore) GetFlag(identifier string) (rest.FeatureConfig, error) + func (q QueryStore) GetFlags() ([]rest.FeatureConfig, error) + func (q QueryStore) GetSegment(identifier string) (rest.Segment, error) + type SDKClients interface + StreamConnected func(key string) bool + type Service struct + func NewService(c Config) Service + func (s Service) Authenticate(ctx context.Context, req domain.AuthRequest) (domain.AuthResponse, error) + func (s Service) Evaluations(ctx context.Context, req domain.EvaluationsRequest) ([]clientgen.Evaluation, error) + func (s Service) EvaluationsByFeature(ctx context.Context, req domain.EvaluationsByFeatureRequest) (clientgen.Evaluation, error) + func (s Service) FeatureConfig(ctx context.Context, req domain.FeatureConfigRequest) ([]domain.FeatureConfig, error) + func (s Service) FeatureConfigByIdentifier(ctx context.Context, req domain.FeatureConfigByIdentifierRequest) (domain.FeatureConfig, error) + func (s Service) GenerateQueryStore(ctx context.Context, environmentID string) QueryStore + func (s Service) Health(ctx context.Context) (domain.HealthResponse, error) + func (s Service) Metrics(ctx context.Context, req domain.MetricsRequest) error + func (s Service) Stream(ctx context.Context, req domain.StreamRequest) (domain.StreamResponse, error) + func (s Service) TargetSegments(ctx context.Context, req domain.TargetSegmentsRequest) ([]domain.Segment, error) + func (s Service) TargetSegmentsByIdentifier(ctx context.Context, req domain.TargetSegmentsByIdentifierRequest) (domain.Segment, error)