kit

package module
v0.4.8-gz2 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: MIT Imports: 6 Imported by: 1

README

env

  1. go version must more than 1.21

kit-logger

  1. zapx

  2. logx with trace id

  3. vipperx

  4. gormx

    • 配置字段具体参数, 可以修改 g.FieldOpts

    • 配置 yaml 表关系: 生成 model 后就不应该修改(否则关联关系会丢失)

    • 为指定对象自定义模版接口:

      info := g.Data[db.NamingStrategy.SchemaName("archived_ups_tag")] // 获取 yaml 表关系生成的model元数据
      g.ApplyInterface(func(upsTagInterface) {}, info.QueryStructMeta)
      

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(path ...string) (v *viper.Viper, l *zap.Logger, d *gorm.DB)

func InitV0

func InitV0(conf any, path ...string)

func InitWithConf added in v0.2.4

func InitWithConf(conf any, path ...string) (v *viper.Viper, l *zap.Logger, d *gorm.DB)

Types

This section is empty.

Jump to

Keyboard shortcuts

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