postgres

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 License: Apache-2.0 Imports: 13 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) (*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 added in v0.1.3

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 added in v0.1.3

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 added in v0.1.3

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 added in v0.1.3

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 added in v0.1.2

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

func (*Store) Update

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

func (*Store) UpdateModule added in v0.1.3

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