Documentation
¶
Index ¶
- Constants
- Variables
- func CopyBean(src interface{}) interface{}
- func DeepCopy(dst, src interface{}) error
- func GetFieldName(bean interface{}) []string
- func GetIDValue(bean interface{}) int64
- func GetTagName(bean interface{}) []string
- func NewBean(bean interface{}) interface{}
- func ObjectName(obj interface{}) string
- func SetTimeZone() error
- type JSONTime
- func (p JSONTime) Addr() *JSONTime
- func (p *JSONTime) Convert2Time() time.Time
- func (p *JSONTime) Date() *JSONTime
- func (p *JSONTime) FromDB(data []byte) error
- func (p *JSONTime) GobDecode(data []byte) error
- func (p *JSONTime) GobEncode() ([]byte, error)
- func (p *JSONTime) MarshalJSON() ([]byte, error)
- func (p *JSONTime) Scan(v interface{}) error
- func (p *JSONTime) SetByTime(timeVal time.Time)
- func (p *JSONTime) String() string
- func (p *JSONTime) StringFormat(layout string) string
- func (p *JSONTime) Time() time.Time
- func (p *JSONTime) ToDB() (b []byte, err error)
- func (p *JSONTime) UnmarshalJSON(data []byte) error
- func (p *JSONTime) Value() (driver.Value, error)
- type MapTool
Constants ¶
View Source
const ( //TimeZone ... TimeZone = "Asia/Shanghai" //Custom ... Custom = "2006-01-02 15:04:05" )
Variables ¶
View Source
var (
MapT = &MapTool{}
)
...
Functions ¶
func GetIDValue ¶
func GetIDValue(bean interface{}) int64
GetIDValue 查询对象的ID,如果不包含ID字段,将会panic 返回ID的值
func ObjectName ¶
func ObjectName(obj interface{}) string
ObjectName gets the type name of the object
Types ¶
type JSONTime ¶
JSONTime ...
func NewJSONTimeOfTime ¶
NewJSONTimeOfTime 时间转换为JSONTime
func (*JSONTime) StringFormat ¶
StringFormat 转换为固定格式字符串
func (*JSONTime) UnmarshalJSON ¶
UnmarshalJSON ...
Click to show internal directories.
Click to hide internal directories.