Documentation
¶
Index ¶
- Variables
- type Attribute
- type Config
- type Counter
- type DB
- type Histogram
- type Logger
- type Meter
- type MeterProvider
- type ObservabilityConfig
- type ObservabilityLogger
- type QueryOption
- type SQLLogEntry
- type SQLLogMode
- type Session
- func (s *Session) Create(model any) error
- func (s *Session) Delete(model any) error
- func (s *Session) Find(dest any, opts ...QueryOption) error
- func (s *Session) FindOne(dest any, opts ...QueryOption) error
- func (s *Session) SoftDelete(model any) error
- func (s *Session) Tx(fn func(*Session) error) error
- func (s *Session) Update(model any) error
- func (s *Session) Upsert(model any) error
- func (s *Session) WithDeleted() *Session
- type Span
- type SpanOption
- type Tracer
- type TracerProvider
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("orm: not found")
Functions ¶
This section is empty.
Types ¶
type MeterProvider ¶
type ObservabilityConfig ¶
type ObservabilityConfig struct {
Tracing bool
Metrics bool
SQLLogging SQLLogMode
SlowQueryThreshold time.Duration
MaskParameters bool
MaskedFields []string
Logger ObservabilityLogger
TracerProvider TracerProvider
MeterProvider MeterProvider
}
func DefaultObservabilityConfig ¶
func DefaultObservabilityConfig() ObservabilityConfig
func (ObservabilityConfig) Enabled ¶
func (c ObservabilityConfig) Enabled() bool
func (ObservabilityConfig) Normalized ¶
func (c ObservabilityConfig) Normalized() ObservabilityConfig
func (ObservabilityConfig) ShouldMask ¶
func (c ObservabilityConfig) ShouldMask(field string) bool
func (ObservabilityConfig) Validate ¶
func (c ObservabilityConfig) Validate() error
type ObservabilityLogger ¶
type QueryOption ¶
type QueryOption func(*queryState)
func Limit ¶
func Limit(n int) QueryOption
func Offset ¶
func Offset(n int) QueryOption
func OrderBy ¶
func OrderBy(expr string) QueryOption
func Where ¶
func Where(expr string, args ...any) QueryOption
type SQLLogEntry ¶
type SQLLogMode ¶
type SQLLogMode string
const ( SQLLogDisabled SQLLogMode = "disabled" SQLLogErrorsOnly SQLLogMode = "errors_only" SQLLogSlow SQLLogMode = "slow_queries" SQLLogDebug SQLLogMode = "debug" SQLLogTrace SQLLogMode = "trace" )
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func (*Session) SoftDelete ¶
func (*Session) WithDeleted ¶
type SpanOption ¶
type SpanOption interface {
// contains filtered or unexported methods
}
type TracerProvider ¶
Click to show internal directories.
Click to hide internal directories.