mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-05-18 14:47:13 +02:00
Add GoString method for jobmeta
This commit is contained in:
parent
fe1ff5c7a3
commit
432e06e801
@ -145,7 +145,12 @@ const (
|
|||||||
JobStateOutOfMemory JobState = "out_of_memory"
|
JobStateOutOfMemory JobState = "out_of_memory"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (e *JobState) UnmarshalGQL(v interface{}) error {
|
func (j JobMeta) GoString() string {
|
||||||
|
return fmt.Sprintf("JobMeta{ID:%d, StartTime:%d, JobID:%v, BaseJob:%v}",
|
||||||
|
j.ID, j.StartTime, j.JobID, j.BaseJob)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e *JobState) UnmarshalGQL(v any) error {
|
||||||
str, ok := v.(string)
|
str, ok := v.(string)
|
||||||
if !ok {
|
if !ok {
|
||||||
return fmt.Errorf("SCHEMA/JOB > enums must be strings")
|
return fmt.Errorf("SCHEMA/JOB > enums must be strings")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user