add initial application structure with configuration, logging, and health check endpoints
This commit is contained in:
@@ -3564,8 +3564,8 @@ type EpicHeroInfoMutation struct {
|
||||
attribute *string
|
||||
remark *string
|
||||
raw_json *string
|
||||
set_content_json *string
|
||||
set_update_time *time.Time
|
||||
content_json_set *string
|
||||
update_time_set *time.Time
|
||||
clearedFields map[string]struct{}
|
||||
done bool
|
||||
oldValue func(context.Context) (*EpicHeroInfo, error)
|
||||
@@ -4278,89 +4278,89 @@ func (m *EpicHeroInfoMutation) ResetRawJSON() {
|
||||
m.raw_json = nil
|
||||
}
|
||||
|
||||
// SetSetContentJSON sets the "set_content_json" field.
|
||||
func (m *EpicHeroInfoMutation) SetSetContentJSON(s string) {
|
||||
m.set_content_json = &s
|
||||
// SetContentJSONSet sets the "content_json_set" field.
|
||||
func (m *EpicHeroInfoMutation) SetContentJSONSet(s string) {
|
||||
m.content_json_set = &s
|
||||
}
|
||||
|
||||
// SetContentJSON returns the value of the "set_content_json" field in the mutation.
|
||||
func (m *EpicHeroInfoMutation) SetContentJSON() (r string, exists bool) {
|
||||
v := m.set_content_json
|
||||
// ContentJSONSet returns the value of the "content_json_set" field in the mutation.
|
||||
func (m *EpicHeroInfoMutation) ContentJSONSet() (r string, exists bool) {
|
||||
v := m.content_json_set
|
||||
if v == nil {
|
||||
return
|
||||
}
|
||||
return *v, true
|
||||
}
|
||||
|
||||
// OldSetContentJSON returns the old "set_content_json" field's value of the EpicHeroInfo entity.
|
||||
// OldContentJSONSet returns the old "content_json_set" field's value of the EpicHeroInfo entity.
|
||||
// If the EpicHeroInfo object wasn't provided to the builder, the object is fetched from the database.
|
||||
// An error is returned if the mutation operation is not UpdateOne, or the database query fails.
|
||||
func (m *EpicHeroInfoMutation) OldSetContentJSON(ctx context.Context) (v string, err error) {
|
||||
func (m *EpicHeroInfoMutation) OldContentJSONSet(ctx context.Context) (v string, err error) {
|
||||
if !m.op.Is(OpUpdateOne) {
|
||||
return v, errors.New("OldSetContentJSON is only allowed on UpdateOne operations")
|
||||
return v, errors.New("OldContentJSONSet is only allowed on UpdateOne operations")
|
||||
}
|
||||
if m.id == nil || m.oldValue == nil {
|
||||
return v, errors.New("OldSetContentJSON requires an ID field in the mutation")
|
||||
return v, errors.New("OldContentJSONSet requires an ID field in the mutation")
|
||||
}
|
||||
oldValue, err := m.oldValue(ctx)
|
||||
if err != nil {
|
||||
return v, fmt.Errorf("querying old value for OldSetContentJSON: %w", err)
|
||||
return v, fmt.Errorf("querying old value for OldContentJSONSet: %w", err)
|
||||
}
|
||||
return oldValue.SetContentJSON, nil
|
||||
return oldValue.ContentJSONSet, nil
|
||||
}
|
||||
|
||||
// ResetSetContentJSON resets all changes to the "set_content_json" field.
|
||||
func (m *EpicHeroInfoMutation) ResetSetContentJSON() {
|
||||
m.set_content_json = nil
|
||||
// ResetContentJSONSet resets all changes to the "content_json_set" field.
|
||||
func (m *EpicHeroInfoMutation) ResetContentJSONSet() {
|
||||
m.content_json_set = nil
|
||||
}
|
||||
|
||||
// SetSetUpdateTime sets the "set_update_time" field.
|
||||
func (m *EpicHeroInfoMutation) SetSetUpdateTime(t time.Time) {
|
||||
m.set_update_time = &t
|
||||
// SetUpdateTimeSet sets the "update_time_set" field.
|
||||
func (m *EpicHeroInfoMutation) SetUpdateTimeSet(t time.Time) {
|
||||
m.update_time_set = &t
|
||||
}
|
||||
|
||||
// SetUpdateTime returns the value of the "set_update_time" field in the mutation.
|
||||
func (m *EpicHeroInfoMutation) SetUpdateTime() (r time.Time, exists bool) {
|
||||
v := m.set_update_time
|
||||
// UpdateTimeSet returns the value of the "update_time_set" field in the mutation.
|
||||
func (m *EpicHeroInfoMutation) UpdateTimeSet() (r time.Time, exists bool) {
|
||||
v := m.update_time_set
|
||||
if v == nil {
|
||||
return
|
||||
}
|
||||
return *v, true
|
||||
}
|
||||
|
||||
// OldSetUpdateTime returns the old "set_update_time" field's value of the EpicHeroInfo entity.
|
||||
// OldUpdateTimeSet returns the old "update_time_set" field's value of the EpicHeroInfo entity.
|
||||
// If the EpicHeroInfo object wasn't provided to the builder, the object is fetched from the database.
|
||||
// An error is returned if the mutation operation is not UpdateOne, or the database query fails.
|
||||
func (m *EpicHeroInfoMutation) OldSetUpdateTime(ctx context.Context) (v *time.Time, err error) {
|
||||
func (m *EpicHeroInfoMutation) OldUpdateTimeSet(ctx context.Context) (v *time.Time, err error) {
|
||||
if !m.op.Is(OpUpdateOne) {
|
||||
return v, errors.New("OldSetUpdateTime is only allowed on UpdateOne operations")
|
||||
return v, errors.New("OldUpdateTimeSet is only allowed on UpdateOne operations")
|
||||
}
|
||||
if m.id == nil || m.oldValue == nil {
|
||||
return v, errors.New("OldSetUpdateTime requires an ID field in the mutation")
|
||||
return v, errors.New("OldUpdateTimeSet requires an ID field in the mutation")
|
||||
}
|
||||
oldValue, err := m.oldValue(ctx)
|
||||
if err != nil {
|
||||
return v, fmt.Errorf("querying old value for OldSetUpdateTime: %w", err)
|
||||
return v, fmt.Errorf("querying old value for OldUpdateTimeSet: %w", err)
|
||||
}
|
||||
return oldValue.SetUpdateTime, nil
|
||||
return oldValue.UpdateTimeSet, nil
|
||||
}
|
||||
|
||||
// ClearSetUpdateTime clears the value of the "set_update_time" field.
|
||||
func (m *EpicHeroInfoMutation) ClearSetUpdateTime() {
|
||||
m.set_update_time = nil
|
||||
m.clearedFields[epicheroinfo.FieldSetUpdateTime] = struct{}{}
|
||||
// ClearUpdateTimeSet clears the value of the "update_time_set" field.
|
||||
func (m *EpicHeroInfoMutation) ClearUpdateTimeSet() {
|
||||
m.update_time_set = nil
|
||||
m.clearedFields[epicheroinfo.FieldUpdateTimeSet] = struct{}{}
|
||||
}
|
||||
|
||||
// SetUpdateTimeCleared returns if the "set_update_time" field was cleared in this mutation.
|
||||
func (m *EpicHeroInfoMutation) SetUpdateTimeCleared() bool {
|
||||
_, ok := m.clearedFields[epicheroinfo.FieldSetUpdateTime]
|
||||
// UpdateTimeSetCleared returns if the "update_time_set" field was cleared in this mutation.
|
||||
func (m *EpicHeroInfoMutation) UpdateTimeSetCleared() bool {
|
||||
_, ok := m.clearedFields[epicheroinfo.FieldUpdateTimeSet]
|
||||
return ok
|
||||
}
|
||||
|
||||
// ResetSetUpdateTime resets all changes to the "set_update_time" field.
|
||||
func (m *EpicHeroInfoMutation) ResetSetUpdateTime() {
|
||||
m.set_update_time = nil
|
||||
delete(m.clearedFields, epicheroinfo.FieldSetUpdateTime)
|
||||
// ResetUpdateTimeSet resets all changes to the "update_time_set" field.
|
||||
func (m *EpicHeroInfoMutation) ResetUpdateTimeSet() {
|
||||
m.update_time_set = nil
|
||||
delete(m.clearedFields, epicheroinfo.FieldUpdateTimeSet)
|
||||
}
|
||||
|
||||
// Where appends a list predicates to the EpicHeroInfoMutation builder.
|
||||
@@ -4446,11 +4446,11 @@ func (m *EpicHeroInfoMutation) Fields() []string {
|
||||
if m.raw_json != nil {
|
||||
fields = append(fields, epicheroinfo.FieldRawJSON)
|
||||
}
|
||||
if m.set_content_json != nil {
|
||||
fields = append(fields, epicheroinfo.FieldSetContentJSON)
|
||||
if m.content_json_set != nil {
|
||||
fields = append(fields, epicheroinfo.FieldContentJSONSet)
|
||||
}
|
||||
if m.set_update_time != nil {
|
||||
fields = append(fields, epicheroinfo.FieldSetUpdateTime)
|
||||
if m.update_time_set != nil {
|
||||
fields = append(fields, epicheroinfo.FieldUpdateTimeSet)
|
||||
}
|
||||
return fields
|
||||
}
|
||||
@@ -4492,10 +4492,10 @@ func (m *EpicHeroInfoMutation) Field(name string) (ent.Value, bool) {
|
||||
return m.Remark()
|
||||
case epicheroinfo.FieldRawJSON:
|
||||
return m.RawJSON()
|
||||
case epicheroinfo.FieldSetContentJSON:
|
||||
return m.SetContentJSON()
|
||||
case epicheroinfo.FieldSetUpdateTime:
|
||||
return m.SetUpdateTime()
|
||||
case epicheroinfo.FieldContentJSONSet:
|
||||
return m.ContentJSONSet()
|
||||
case epicheroinfo.FieldUpdateTimeSet:
|
||||
return m.UpdateTimeSet()
|
||||
}
|
||||
return nil, false
|
||||
}
|
||||
@@ -4537,10 +4537,10 @@ func (m *EpicHeroInfoMutation) OldField(ctx context.Context, name string) (ent.V
|
||||
return m.OldRemark(ctx)
|
||||
case epicheroinfo.FieldRawJSON:
|
||||
return m.OldRawJSON(ctx)
|
||||
case epicheroinfo.FieldSetContentJSON:
|
||||
return m.OldSetContentJSON(ctx)
|
||||
case epicheroinfo.FieldSetUpdateTime:
|
||||
return m.OldSetUpdateTime(ctx)
|
||||
case epicheroinfo.FieldContentJSONSet:
|
||||
return m.OldContentJSONSet(ctx)
|
||||
case epicheroinfo.FieldUpdateTimeSet:
|
||||
return m.OldUpdateTimeSet(ctx)
|
||||
}
|
||||
return nil, fmt.Errorf("unknown EpicHeroInfo field %s", name)
|
||||
}
|
||||
@@ -4662,19 +4662,19 @@ func (m *EpicHeroInfoMutation) SetField(name string, value ent.Value) error {
|
||||
}
|
||||
m.SetRawJSON(v)
|
||||
return nil
|
||||
case epicheroinfo.FieldSetContentJSON:
|
||||
case epicheroinfo.FieldContentJSONSet:
|
||||
v, ok := value.(string)
|
||||
if !ok {
|
||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
||||
}
|
||||
m.SetSetContentJSON(v)
|
||||
m.SetContentJSONSet(v)
|
||||
return nil
|
||||
case epicheroinfo.FieldSetUpdateTime:
|
||||
case epicheroinfo.FieldUpdateTimeSet:
|
||||
v, ok := value.(time.Time)
|
||||
if !ok {
|
||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
||||
}
|
||||
m.SetSetUpdateTime(v)
|
||||
m.SetUpdateTimeSet(v)
|
||||
return nil
|
||||
}
|
||||
return fmt.Errorf("unknown EpicHeroInfo field %s", name)
|
||||
@@ -4712,8 +4712,8 @@ func (m *EpicHeroInfoMutation) ClearedFields() []string {
|
||||
if m.FieldCleared(epicheroinfo.FieldUpdateTime) {
|
||||
fields = append(fields, epicheroinfo.FieldUpdateTime)
|
||||
}
|
||||
if m.FieldCleared(epicheroinfo.FieldSetUpdateTime) {
|
||||
fields = append(fields, epicheroinfo.FieldSetUpdateTime)
|
||||
if m.FieldCleared(epicheroinfo.FieldUpdateTimeSet) {
|
||||
fields = append(fields, epicheroinfo.FieldUpdateTimeSet)
|
||||
}
|
||||
return fields
|
||||
}
|
||||
@@ -4735,8 +4735,8 @@ func (m *EpicHeroInfoMutation) ClearField(name string) error {
|
||||
case epicheroinfo.FieldUpdateTime:
|
||||
m.ClearUpdateTime()
|
||||
return nil
|
||||
case epicheroinfo.FieldSetUpdateTime:
|
||||
m.ClearSetUpdateTime()
|
||||
case epicheroinfo.FieldUpdateTimeSet:
|
||||
m.ClearUpdateTimeSet()
|
||||
return nil
|
||||
}
|
||||
return fmt.Errorf("unknown EpicHeroInfo nullable field %s", name)
|
||||
@@ -4794,11 +4794,11 @@ func (m *EpicHeroInfoMutation) ResetField(name string) error {
|
||||
case epicheroinfo.FieldRawJSON:
|
||||
m.ResetRawJSON()
|
||||
return nil
|
||||
case epicheroinfo.FieldSetContentJSON:
|
||||
m.ResetSetContentJSON()
|
||||
case epicheroinfo.FieldContentJSONSet:
|
||||
m.ResetContentJSONSet()
|
||||
return nil
|
||||
case epicheroinfo.FieldSetUpdateTime:
|
||||
m.ResetSetUpdateTime()
|
||||
case epicheroinfo.FieldUpdateTimeSet:
|
||||
m.ResetUpdateTimeSet()
|
||||
return nil
|
||||
}
|
||||
return fmt.Errorf("unknown EpicHeroInfo field %s", name)
|
||||
|
||||
Reference in New Issue
Block a user