pcm-coordinator/api/pkg/response/TaskInfo.go

20 lines
504 B
Go

package response
import "fmt"
type TaskInfo struct {
TaskId int64 `json:"taskId,optional"`
TaskType string `json:"taskType,optional"`
MatchLabels map[string]string `json:"matchLabels"`
ParticipantId int64 `json:"participantId"`
TenantId int64 `json:"tenantId"`
Metadata interface{} `json:"metadata"`
}
func (t *TaskInfo) Validate() error {
if t.TenantId == 0 {
return fmt.Errorf("tenantId is nil")
}
return nil
}