storages

package
v0.0.0-...-4e1183a Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2021 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const ErrNewFromErrNotPossible frameless.Error = `` /* 221-byte string literal not displayed */
View Source
const ErrRDSEngineNotSet frameless.Error = `` /* 141-byte string literal not displayed */

Variables

This section is empty.

Functions

func EnsureID

func EnsureID(ptr interface{}) error

func New

func New(connstr string) (toggler.Storage, error)

func NewFromEnv

func NewFromEnv() (toggler.Storage, error)

Types

type InMemory

type InMemory struct {
	EventLog  *inmemory.EventLog
	Namespace string
	// contains filtered or unexported fields
}

func NewInMemory

func NewInMemory() *InMemory

func (*InMemory) BeginTx

func (s *InMemory) BeginTx(ctx context.Context) (context.Context, error)

func (*InMemory) Close

func (s *InMemory) Close() error

func (*InMemory) CommitTx

func (s *InMemory) CommitTx(ctx context.Context) error

func (*InMemory) ReleaseEnvironment

func (s *InMemory) ReleaseEnvironment(ctx context.Context) release.EnvironmentStorage

func (*InMemory) ReleaseFlag

func (s *InMemory) ReleaseFlag(ctx context.Context) release.FlagStorage

func (*InMemory) ReleasePilot

func (s *InMemory) ReleasePilot(ctx context.Context) release.PilotStorage

func (*InMemory) ReleaseRollout

func (s *InMemory) ReleaseRollout(ctx context.Context) release.RolloutStorage

func (*InMemory) RollbackTx

func (s *InMemory) RollbackTx(ctx context.Context) error

func (*InMemory) SecurityToken

func (s *InMemory) SecurityToken(ctx context.Context) security.TokenStorage

type MemoryReleaseEnvironmentStorage

type MemoryReleaseEnvironmentStorage struct {
	*inmemory.EventLogStorage
}

func (*MemoryReleaseEnvironmentStorage) FindByAlias

func (s *MemoryReleaseEnvironmentStorage) FindByAlias(ctx context.Context, idOrName string, env *release.Environment) (bool, error)

type MemoryReleaseFlagStorage

type MemoryReleaseFlagStorage struct {
	*inmemory.EventLogStorage
}

func (*MemoryReleaseFlagStorage) FindByName

func (s *MemoryReleaseFlagStorage) FindByName(ctx context.Context, name string) (*release.Flag, error)

func (*MemoryReleaseFlagStorage) FindByNames

func (s *MemoryReleaseFlagStorage) FindByNames(ctx context.Context, names ...string) release.FlagEntries

type MemoryReleasePilotStorage

type MemoryReleasePilotStorage struct {
	*inmemory.EventLogStorage
}

func (*MemoryReleasePilotStorage) FindByFlag

func (*MemoryReleasePilotStorage) FindByFlagEnvPublicID

func (s *MemoryReleasePilotStorage) FindByFlagEnvPublicID(ctx context.Context, flagID, envID interface{}, pilotExtID string) (*release.Pilot, error)

func (*MemoryReleasePilotStorage) FindByPublicID

func (s *MemoryReleasePilotStorage) FindByPublicID(ctx context.Context, pilotPublicID string) release.PilotEntries

type MemoryReleaseRolloutStorage

type MemoryReleaseRolloutStorage struct {
	*inmemory.EventLogStorage
}

func (*MemoryReleaseRolloutStorage) FindByFlagEnvironment

func (s *MemoryReleaseRolloutStorage) FindByFlagEnvironment(ctx context.Context, flag release.Flag, env release.Environment, ptr *release.Rollout) (bool, error)

type MemorySecurityTokenStorage

type MemorySecurityTokenStorage struct {
	*inmemory.EventLogStorage
}

func (*MemorySecurityTokenStorage) FindTokenBySHA512Hex

func (s *MemorySecurityTokenStorage) FindTokenBySHA512Hex(ctx context.Context, tokenAsText string) (*security.Token, error)

type Postgres

type Postgres struct {
	DSN string
	postgresql.ConnectionManager
	// contains filtered or unexported fields
}

func NewPostgres

func NewPostgres(dsn string) (*Postgres, error)

func (*Postgres) Close

func (p *Postgres) Close() error

func (*Postgres) Init

func (p *Postgres) Init() (rErr error)

func (*Postgres) ReleaseEnvironment

func (p *Postgres) ReleaseEnvironment(ctx context.Context) release.EnvironmentStorage

func (*Postgres) ReleaseFlag

func (p *Postgres) ReleaseFlag(ctx context.Context) release.FlagStorage

func (*Postgres) ReleasePilot

func (p *Postgres) ReleasePilot(ctx context.Context) release.PilotStorage

func (*Postgres) ReleaseRollout

func (p *Postgres) ReleaseRollout(ctx context.Context) release.RolloutStorage

func (*Postgres) SecurityToken

func (p *Postgres) SecurityToken(ctx context.Context) security.TokenStorage

type ReleaseEnvironmentPgStorage

type ReleaseEnvironmentPgStorage struct {
	*postgresql.Storage
}

func (ReleaseEnvironmentPgStorage) FindByAlias

func (s ReleaseEnvironmentPgStorage) FindByAlias(ctx context.Context, idOrName string, env *release.Environment) (bool, error)

type ReleaseFlagPgStorage

type ReleaseFlagPgStorage struct {
	*postgresql.Storage
}

func (ReleaseFlagPgStorage) FindByName

func (s ReleaseFlagPgStorage) FindByName(ctx context.Context, name string) (*release.Flag, error)

func (ReleaseFlagPgStorage) FindByNames

func (s ReleaseFlagPgStorage) FindByNames(ctx context.Context, names ...string) release.FlagEntries

type ReleasePilotPgStorage

type ReleasePilotPgStorage struct {
	*postgresql.Storage
}

func (ReleasePilotPgStorage) FindByFlag

func (ReleasePilotPgStorage) FindByFlagEnvPublicID

func (s ReleasePilotPgStorage) FindByFlagEnvPublicID(ctx context.Context, flagID, envID interface{}, pilotExtID string) (*release.Pilot, error)

func (ReleasePilotPgStorage) FindByPublicID

func (s ReleasePilotPgStorage) FindByPublicID(ctx context.Context, externalID string) release.PilotEntries

type ReleaseRolloutPgStorage

type ReleaseRolloutPgStorage struct {
	*postgresql.Storage
}

func (ReleaseRolloutPgStorage) FindByFlagEnvironment

func (s ReleaseRolloutPgStorage) FindByFlagEnvironment(ctx context.Context, flag release.Flag, env release.Environment, rollout *release.Rollout) (bool, error)

type SecurityTokenPgStorage

type SecurityTokenPgStorage struct {
	*postgresql.Storage
}

func (SecurityTokenPgStorage) FindTokenBySHA512Hex

func (s SecurityTokenPgStorage) FindTokenBySHA512Hex(ctx context.Context, sha512hex string) (*security.Token, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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