data

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: MIT Imports: 1 Imported by: 8

Documentation

Index

Constants

View Source
const Default = "default"

Variables

This section is empty.

Functions

func FromAutoSetTenantId

func FromAutoSetTenantId(ctx context.Context) bool

func FromMultiTenancyDataFilter

func FromMultiTenancyDataFilter(ctx context.Context) bool

FromMultiTenancyDataFilter resolve where apply multi tenancy data filter, default true

func NewAutoSetTenantId

func NewAutoSetTenantId(ctx context.Context, enable ...bool) context.Context

func NewMultiTenancyDataFilter

func NewMultiTenancyDataFilter(ctx context.Context, enable ...bool) context.Context

Types

type ConnStrResolver

type ConnStrResolver interface {
	// Resolve connection string by user-friendly key
	Resolve(ctx context.Context, key string) (string, error)
}

func ChainConnStrResolver

func ChainConnStrResolver(cs ...ConnStrResolver) ConnStrResolver

type ConnStrResolverFunc

type ConnStrResolverFunc func(ctx context.Context, key string) (string, error)

func (ConnStrResolverFunc) Resolve

func (c ConnStrResolverFunc) Resolve(ctx context.Context, key string) (string, error)

type ConnStrings

type ConnStrings map[string]string

func (ConnStrings) Default

func (c ConnStrings) Default() string

func (ConnStrings) Resolve

func (c ConnStrings) Resolve(_ context.Context, key string) (string, error)

func (ConnStrings) SetDefault

func (c ConnStrings) SetDefault(value string)

Jump to

Keyboard shortcuts

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