overflow_proxy_service/proxy/crawlerInputItem/crawlerinputitem_service.go
snoop 37a2128b45 fixed
return error
2017-06-08 20:53:04 +09:00

38 lines
796 B
Go

package crawlerInputItem
import (
"git.loafle.net/overflow/commons_go/model/timestamp"
"encoding/json"
"git.loafle.net/overflow/overflow_proxy_service/proxy/utils"
)
type CrawlerInputItem struct {
Id json.Number `json:"id,Number,omitempty"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
DataType string `json:"dataType,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
}
type CrawlerInputItemSerivce struct {
}
func NewCrawlerInputItemService() *CrawlerInputItemSerivce {
return &CrawlerInputItemSerivce{}
}
func (c *CrawlerInputItemSerivce)Create(cii * CrawlerInputItem) (string, error) {
out, err := utils.InvokeDB("crawlerInputItem", "create", cii)
if err != nil {
return "", err
}
return out, nil;
}