timestamp

package module
v0.0.0-...-25bfb18 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: MIT Imports: 10 Imported by: 0

README

gorm-protobuf-timestamp-plugin

Usage

register to gorm

db.Use(&timestamp.TimestampProtobuf{})

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TimestampProtobuf

type TimestampProtobuf struct {
}

func (*TimestampProtobuf) BeforeCreate

func (p *TimestampProtobuf) BeforeCreate(db *gorm.DB)

func (*TimestampProtobuf) BeforeDelete

func (p *TimestampProtobuf) BeforeDelete(db *gorm.DB)

func (*TimestampProtobuf) BeforeQuery

func (p *TimestampProtobuf) BeforeQuery(db *gorm.DB)

func (*TimestampProtobuf) BeforeUpdate

func (p *TimestampProtobuf) BeforeUpdate(db *gorm.DB)

func (*TimestampProtobuf) Initialize

func (p *TimestampProtobuf) Initialize(db *gorm.DB) error

func (*TimestampProtobuf) Name

func (p *TimestampProtobuf) Name() string

func (*TimestampProtobuf) Scan

func (*TimestampProtobuf) Scan(ctx context.Context, field *schema.Field, dst reflect.Value, dbValue any) error

func (*TimestampProtobuf) SetIfNil

func (p *TimestampProtobuf) SetIfNil(db *gorm.DB, value reflect.Value, fields ...string)

func (*TimestampProtobuf) Value

func (*TimestampProtobuf) Value(ctx context.Context, field *schema.Field, dst reflect.Value, fieldValue any) (any, error)

Jump to

Keyboard shortcuts

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