openmeter / pkg /models /id.go
Leon4gr45's picture
Upload folder using huggingface_hub (part 9)
fea99b3 verified
Raw
History Blame Contribute Delete
319 Bytes
package models
import (
"fmt"
)
type NamespacedID struct {
Namespace string `json:"namespace"`
ID string `json:"id"`
}
func (i NamespacedID) Validate() error {
if i.Namespace == "" {
return fmt.Errorf("namespace is required")
}
if i.ID == "" {
return fmt.Errorf("id is required")
}
return nil
}