postgres

package
v0.7.11 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2023 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 Open

func Open(conStr string, refreshInterval, extendInterval time.Duration) (*Store, error)

Open returns store instance backed by PostgresQL.

func (*Store) Close

func (st *Store) Close() error

func (*Store) Create

func (st *Store) Create(ctx context.Context, r resource.Resource, hooks ...resource.MutationHook) error

func (*Store) CreateModule

func (st *Store) CreateModule(ctx context.Context, m module.Module) error

func (*Store) Delete

func (st *Store) Delete(ctx context.Context, urn string, hooks ...resource.MutationHook) error

func (*Store) DeleteModule

func (st *Store) DeleteModule(ctx context.Context, urn string) error

func (*Store) GetByURN

func (st *Store) GetByURN(ctx context.Context, urn string) (*resource.Resource, error)

func (*Store) GetModule

func (st *Store) GetModule(ctx context.Context, urn string) (*module.Module, error)

func (*Store) List

func (st *Store) List(ctx context.Context, filter resource.Filter) ([]resource.Resource, error)

func (*Store) ListModules

func (st *Store) ListModules(ctx context.Context, project string) ([]module.Module, error)

func (*Store) Migrate

func (st *Store) Migrate(ctx context.Context) error

func (*Store) Revisions

func (st *Store) Revisions(ctx context.Context, selector resource.RevisionsSelector) ([]resource.Revision, error)

func (*Store) SyncOne

func (st *Store) SyncOne(ctx context.Context, syncFn resource.SyncFn) error

func (*Store) Update

func (st *Store) Update(ctx context.Context, r resource.Resource, saveRevision bool, reason string, hooks ...resource.MutationHook) error

func (*Store) UpdateModule

func (st *Store) UpdateModule(ctx context.Context, m module.Module) error

type TxFunc

type TxFunc func(ctx context.Context, tx *sqlx.Tx) error

Jump to

Keyboard shortcuts

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