postgres

package
v0.2.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

func NewStore

func NewStore(pool *pgxpool.Pool) *Store

func (*Store) Close

func (s *Store) Close(ctx context.Context) error

func (*Store) CreateAPIKey

func (s *Store) CreateAPIKey(ctx context.Context, id, name, description, prefix, secretHash, environmentID string) (*core.APIKey, error)

func (*Store) CreateContext

func (s *Store) CreateContext(ctx context.Context, c *core.ContextSchema) error

func (*Store) CreateEnvironment

func (s *Store) CreateEnvironment(ctx context.Context, env *core.Environment) error

func (*Store) CreateRule

func (s *Store) CreateRule(ctx context.Context, environmentID, flagKey string, rule core.Rule) error

func (*Store) CreateSession

func (s *Store) CreateSession(ctx context.Context, id, userID, tokenHash string, expiresAt time.Time) error

func (*Store) DeleteContext

func (s *Store) DeleteContext(ctx context.Context, id string) error

func (*Store) DeleteEnvironment

func (s *Store) DeleteEnvironment(ctx context.Context, id string) error

func (*Store) DeleteExpiredSessions

func (s *Store) DeleteExpiredSessions(ctx context.Context) error

func (*Store) DeleteFlag

func (s *Store) DeleteFlag(ctx context.Context, environmentID, key string) error

func (*Store) DeleteRule

func (s *Store) DeleteRule(ctx context.Context, environmentID, flagKey, ruleID string) error

func (*Store) DeleteSessionByHash

func (s *Store) DeleteSessionByHash(ctx context.Context, tokenHash string) error

func (*Store) GetAPIKeyByHash

func (s *Store) GetAPIKeyByHash(ctx context.Context, secretHash string) (*core.APIKey, error)

func (*Store) GetContext

func (s *Store) GetContext(ctx context.Context, id string) (*core.ContextSchema, error)

func (*Store) GetEnvironment

func (s *Store) GetEnvironment(ctx context.Context, id string) (*core.Environment, error)

func (*Store) GetEnvironmentByKey

func (s *Store) GetEnvironmentByKey(ctx context.Context, key string) (*core.Environment, error)

func (*Store) GetFlag

func (s *Store) GetFlag(ctx context.Context, environmentID, key string) (*core.FlagConfig, error)

func (*Store) GetRule

func (s *Store) GetRule(ctx context.Context, environmentID, flagKey, ruleID string) (*core.Rule, error)

func (*Store) GetUserByEmail

func (s *Store) GetUserByEmail(ctx context.Context, email string) (*core.User, string, error)

func (*Store) GetUserBySessionHash

func (s *Store) GetUserBySessionHash(ctx context.Context, tokenHash string) (*core.User, error)

func (*Store) ListAPIKeys

func (s *Store) ListAPIKeys(ctx context.Context) ([]*core.APIKey, error)

func (*Store) ListContextReferences

func (s *Store) ListContextReferences(ctx context.Context) ([]core.ContextReference, error)

func (*Store) ListContexts

func (s *Store) ListContexts(ctx context.Context) ([]*core.ContextSchema, error)

func (*Store) ListEnvironmentUsageBuckets

func (s *Store) ListEnvironmentUsageBuckets(ctx context.Context, query core.FlagUsageQuery) ([]*core.FlagUsageBucket, error)

func (*Store) ListEnvironmentUsageLatencyBuckets

func (s *Store) ListEnvironmentUsageLatencyBuckets(ctx context.Context, query core.FlagUsageQuery) ([]*core.FlagUsageLatencyBucket, error)

func (*Store) ListEnvironments

func (s *Store) ListEnvironments(ctx context.Context) ([]*core.Environment, error)

func (*Store) ListFlagAuditLog

func (s *Store) ListFlagAuditLog(ctx context.Context, environmentID, flagKey string) ([]*core.AuditEntry, error)

func (*Store) ListFlagEvaluationEvents

func (s *Store) ListFlagEvaluationEvents(ctx context.Context, query core.FlagUsageQuery) ([]*core.FlagUsageEvent, error)

func (*Store) ListFlagUsageBuckets

func (s *Store) ListFlagUsageBuckets(ctx context.Context, query core.FlagUsageQuery) ([]*core.FlagUsageBucket, error)

func (*Store) ListFlagUsageLatencyBuckets

func (s *Store) ListFlagUsageLatencyBuckets(ctx context.Context, query core.FlagUsageQuery) ([]*core.FlagUsageLatencyBucket, error)

func (*Store) ListFlags

func (s *Store) ListFlags(ctx context.Context, environmentID string) ([]*core.FlagConfig, error)

func (*Store) ListenAPIKeyCacheInvalidations

func (s *Store) ListenAPIKeyCacheInvalidations(ctx context.Context, handle func(payload string)) error

func (*Store) NotifyAPIKeyCacheInvalidated

func (s *Store) NotifyAPIKeyCacheInvalidated(ctx context.Context, payload string) error

func (*Store) Ping

func (s *Store) Ping(ctx context.Context) error

func (*Store) RecordFlagUsage

func (s *Store) RecordFlagUsage(ctx context.Context, event core.FlagUsageEvent) error

func (*Store) ReorderRules

func (s *Store) ReorderRules(ctx context.Context, environmentID, flagKey string, ruleIDs []string) error

func (*Store) RevokeAPIKey

func (s *Store) RevokeAPIKey(ctx context.Context, id string) error

func (*Store) SaveFlag

func (s *Store) SaveFlag(ctx context.Context, environmentID string, flag *core.FlagConfig) error

func (*Store) TouchAPIKey

func (s *Store) TouchAPIKey(ctx context.Context, id string) error

func (*Store) UpdateContext

func (s *Store) UpdateContext(ctx context.Context, c *core.ContextSchema) error

func (*Store) UpdateEnvironment

func (s *Store) UpdateEnvironment(ctx context.Context, env *core.Environment) error

func (*Store) UpdateRule

func (s *Store) UpdateRule(ctx context.Context, environmentID, flagKey string, rule core.Rule) error

func (*Store) UpsertLocalAdmin

func (s *Store) UpsertLocalAdmin(ctx context.Context, user *core.User, passwordHash string) (*core.User, error)

func (*Store) UpsertUserByOIDC

func (s *Store) UpsertUserByOIDC(ctx context.Context, user *core.User) (*core.User, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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