global

package
v0.0.0-...-efd9455 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NodId int64
)

Functions

func GetID

func GetID() string

GetID 获取ID 参数: podId 当前机器标识 这里使用 pod ip

func ReplacePodID

func ReplacePodID(podId string)

Types

type BaseModel

type BaseModel struct {
	ID        string         `json:"id" gorm:"primarykey;type:bigint(20);comment:'主键'"`
	CreatedAt ModelTime      `json:"created_at" gorm:"column:created_at;index;comment:'创建时间'"`
	UpdatedAt ModelTime      `json:"-" gorm:"column:updated_at;index;comment:'更新时间'"`
	DeletedAt gorm.DeletedAt `json:"-" gorm:"index;comment:'删除时间'"`
}

func (*BaseModel) AfterFind

func (b *BaseModel) AfterFind(tx *gorm.DB) error

func (*BaseModel) BeforeCreate

func (b *BaseModel) BeforeCreate(tx *gorm.DB) error

func (*BaseModel) DetailExpiredSecond

func (b *BaseModel) DetailExpiredSecond() int

DetailExpiredSecond 缓存默认5分钟过期

func (*BaseModel) GetIdString

func (b *BaseModel) GetIdString() string

func (*BaseModel) RelationExpiredSecond

func (b *BaseModel) RelationExpiredSecond() int

RelationExpiredSecond 缓存默认5分钟过期

type Json

type Json []byte

func (*Json) Scan

func (o *Json) Scan(input interface{}) error

func (Json) Value

func (o Json) Value() (driver.Value, error)

type MapStringBool

type MapStringBool map[string]bool

func (*MapStringBool) Scan

func (o *MapStringBool) Scan(input interface{}) error

func (MapStringBool) Value

func (o MapStringBool) Value() (driver.Value, error)

type ModelDate

type ModelDate time.Time

func (ModelDate) MarshalText

func (myT ModelDate) MarshalText() ([]byte, error)

func (ModelDate) String

func (myT ModelDate) String() string

func (ModelDate) Time

func (myT ModelDate) Time() time.Time

func (*ModelDate) UnmarshalText

func (myT *ModelDate) UnmarshalText(text []byte) (err error)

func (ModelDate) Value

func (myT ModelDate) Value() (driver.Value, error)

type ModelNullTime

type ModelNullTime sql.NullTime

func (ModelNullTime) MarshalText

func (myT ModelNullTime) MarshalText() ([]byte, error)

func (ModelNullTime) NullTime

func (myT ModelNullTime) NullTime() sql.NullTime

func (*ModelNullTime) Scan

func (myT *ModelNullTime) Scan(value interface{}) error

func (ModelNullTime) String

func (myT ModelNullTime) String() string

func (*ModelNullTime) UnmarshalText

func (myT *ModelNullTime) UnmarshalText(text []byte) error

func (ModelNullTime) Value

func (myT ModelNullTime) Value() (driver.Value, error)

type ModelTime

type ModelTime time.Time

func (ModelTime) MarshalText

func (myT ModelTime) MarshalText() ([]byte, error)

func (ModelTime) PageIndex

func (myT ModelTime) PageIndex() int64

func (ModelTime) String

func (myT ModelTime) String() string

func (ModelTime) Time

func (myT ModelTime) Time() time.Time

func (*ModelTime) UnmarshalText

func (myT *ModelTime) UnmarshalText(text []byte) (err error)

func (ModelTime) Value

func (myT ModelTime) Value() (driver.Value, error)

type MysqlConfig

type MysqlConfig struct {
	Addr         string
	MaxIdleConns int
	MaxOpenConns int
	LogLevel     string
}

type SliceString

type SliceString []string

func (*SliceString) Scan

func (o *SliceString) Scan(input interface{}) error

func (SliceString) Value

func (o SliceString) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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