schema

package
v0.0.0-...-5069d0e Latest Latest
Warning

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

Go to latest
Published: May 11, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package schema contains storage-related DTOs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StorageInject

func StorageInject(consumer, provider any) error

StorageInject adds storage to the service.

Types

type QueryExecutor

type QueryExecutor interface {
	sqlx.ExtContext

	GetContext(ctx context.Context, dest any, query string, args ...any) error
	NamedExecContext(ctx context.Context, query string, arg any) (sql.Result, error)
}

QueryExecutor interface describing sqlx.DB or sqlx.Tx in scope of the project.

type RequiresStorage

type RequiresStorage interface {
	UseStorage(executor QueryExecutor)
}

RequiresStorage defines service which can use storage attached.

type WithStorage

type WithStorage interface {
	Storage() QueryExecutor
}

WithStorage defines service or state having storage attached.

Jump to

Keyboard shortcuts

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