add initial application structure with configuration, logging, and health check endpoints
This commit is contained in:
@@ -49,10 +49,10 @@ type EpicHeroInfo struct {
|
||||
Remark string `json:"remark,omitempty"`
|
||||
// RawJSON holds the value of the "raw_json" field.
|
||||
RawJSON string `json:"raw_json,omitempty"`
|
||||
// SetContentJSON holds the value of the "set_content_json" field.
|
||||
SetContentJSON string `json:"set_content_json,omitempty"`
|
||||
// SetUpdateTime holds the value of the "set_update_time" field.
|
||||
SetUpdateTime *time.Time `json:"set_update_time,omitempty"`
|
||||
// ContentJSONSet holds the value of the "content_json_set" field.
|
||||
ContentJSONSet string `json:"content_json_set,omitempty"`
|
||||
// UpdateTimeSet holds the value of the "update_time_set" field.
|
||||
UpdateTimeSet *time.Time `json:"update_time_set,omitempty"`
|
||||
selectValues sql.SelectValues
|
||||
}
|
||||
|
||||
@@ -65,9 +65,9 @@ func (*EpicHeroInfo) scanValues(columns []string) ([]any, error) {
|
||||
values[i] = new(sql.NullBool)
|
||||
case epicheroinfo.FieldID:
|
||||
values[i] = new(sql.NullInt64)
|
||||
case epicheroinfo.FieldHeroName, epicheroinfo.FieldHeroCode, epicheroinfo.FieldHeroAttrLv60, epicheroinfo.FieldCreator, epicheroinfo.FieldUpdater, epicheroinfo.FieldNickName, epicheroinfo.FieldRarity, epicheroinfo.FieldRole, epicheroinfo.FieldZodiac, epicheroinfo.FieldHeadImgURL, epicheroinfo.FieldAttribute, epicheroinfo.FieldRemark, epicheroinfo.FieldRawJSON, epicheroinfo.FieldSetContentJSON:
|
||||
case epicheroinfo.FieldHeroName, epicheroinfo.FieldHeroCode, epicheroinfo.FieldHeroAttrLv60, epicheroinfo.FieldCreator, epicheroinfo.FieldUpdater, epicheroinfo.FieldNickName, epicheroinfo.FieldRarity, epicheroinfo.FieldRole, epicheroinfo.FieldZodiac, epicheroinfo.FieldHeadImgURL, epicheroinfo.FieldAttribute, epicheroinfo.FieldRemark, epicheroinfo.FieldRawJSON, epicheroinfo.FieldContentJSONSet:
|
||||
values[i] = new(sql.NullString)
|
||||
case epicheroinfo.FieldCreateTime, epicheroinfo.FieldUpdateTime, epicheroinfo.FieldSetUpdateTime:
|
||||
case epicheroinfo.FieldCreateTime, epicheroinfo.FieldUpdateTime, epicheroinfo.FieldUpdateTimeSet:
|
||||
values[i] = new(sql.NullTime)
|
||||
default:
|
||||
values[i] = new(sql.UnknownType)
|
||||
@@ -188,18 +188,18 @@ func (_m *EpicHeroInfo) assignValues(columns []string, values []any) error {
|
||||
} else if value.Valid {
|
||||
_m.RawJSON = value.String
|
||||
}
|
||||
case epicheroinfo.FieldSetContentJSON:
|
||||
case epicheroinfo.FieldContentJSONSet:
|
||||
if value, ok := values[i].(*sql.NullString); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field set_content_json", values[i])
|
||||
return fmt.Errorf("unexpected type %T for field content_json_set", values[i])
|
||||
} else if value.Valid {
|
||||
_m.SetContentJSON = value.String
|
||||
_m.ContentJSONSet = value.String
|
||||
}
|
||||
case epicheroinfo.FieldSetUpdateTime:
|
||||
case epicheroinfo.FieldUpdateTimeSet:
|
||||
if value, ok := values[i].(*sql.NullTime); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field set_update_time", values[i])
|
||||
return fmt.Errorf("unexpected type %T for field update_time_set", values[i])
|
||||
} else if value.Valid {
|
||||
_m.SetUpdateTime = new(time.Time)
|
||||
*_m.SetUpdateTime = value.Time
|
||||
_m.UpdateTimeSet = new(time.Time)
|
||||
*_m.UpdateTimeSet = value.Time
|
||||
}
|
||||
default:
|
||||
_m.selectValues.Set(columns[i], values[i])
|
||||
@@ -289,11 +289,11 @@ func (_m *EpicHeroInfo) String() string {
|
||||
builder.WriteString("raw_json=")
|
||||
builder.WriteString(_m.RawJSON)
|
||||
builder.WriteString(", ")
|
||||
builder.WriteString("set_content_json=")
|
||||
builder.WriteString(_m.SetContentJSON)
|
||||
builder.WriteString("content_json_set=")
|
||||
builder.WriteString(_m.ContentJSONSet)
|
||||
builder.WriteString(", ")
|
||||
if v := _m.SetUpdateTime; v != nil {
|
||||
builder.WriteString("set_update_time=")
|
||||
if v := _m.UpdateTimeSet; v != nil {
|
||||
builder.WriteString("update_time_set=")
|
||||
builder.WriteString(v.Format(time.ANSIC))
|
||||
}
|
||||
builder.WriteByte(')')
|
||||
|
||||
Reference in New Issue
Block a user