orm

package
v0.0.0-...-3f66b98 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*xorm.Engine
	// contains filtered or unexported fields
}

func New

func New(opts *Options) *Client

func (*Client) GetOpts

func (c *Client) GetOpts() *Options

func (*Client) Switch

func (c *Client) Switch(opts *Options) *Client

type Options

type Options struct {
	Tenant string
	Driver string
	Dsn    string
	Cb     func(*Client)
}

func (*Options) Sign

func (opt *Options) Sign() string

type OtelHook

type OtelHook struct {
	Tenant string
	// contains filtered or unexported fields
}

func NewOtelHook

func NewOtelHook(tenant string) *OtelHook

func (*OtelHook) AfterProcess

func (oh *OtelHook) AfterProcess(c *contexts.ContextHook) error

func (*OtelHook) BeforeProcess

func (oh *OtelHook) BeforeProcess(c *contexts.ContextHook) (context.Context, error)

Jump to

Keyboard shortcuts

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