chore(repo): reinitialize repository
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package skill
|
||||
|
||||
import "errors"
|
||||
|
||||
type Definition struct {
|
||||
ID string `json:"id"`
|
||||
SkillKey string `json:"skill_key"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
SourceType string `json:"source_type"`
|
||||
ContentMarkdown string `json:"content_markdown"`
|
||||
Status string `json:"status"`
|
||||
Version int `json:"version"`
|
||||
CreatedAt string `json:"created_at"`
|
||||
UpdatedAt string `json:"updated_at"`
|
||||
}
|
||||
|
||||
func (s Definition) Validate() error {
|
||||
if s.SkillKey == "" {
|
||||
return errors.New("skill key is required")
|
||||
}
|
||||
if s.Name == "" {
|
||||
return errors.New("skill name is required")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user