openmeter / event /models /models.go
Leon4gr45's picture
Upload folder using huggingface_hub (part 5)
cee2387 verified
Raw
History Blame Contribute Delete
469 Bytes
package models
import "errors"
type FeatureKeyAndID struct {
Key string `json:"key"`
ID string `json:"id"`
}
func (f FeatureKeyAndID) Validate() error {
if f.Key == "" {
return errors.New("key is required")
}
if f.ID == "" {
return errors.New("id is required")
}
return nil
}
type NamespaceID struct {
ID string `json:"id"`
}
func (i NamespaceID) Validate() error {
if i.ID == "" {
return errors.New("namespace-id is required")
}
return nil
}