示例#1
0
文件: main.go 项目: ZurgInq/protogame
func serializeToAPIData(obj g.Refer) apiData {
	return apiData{
		Type:  "",
		ID:    uuid.UUID(obj.RefID()),
		Attrs: obj,
	}
}
示例#2
0
文件: main.go 项目: ZurgInq/protogame
func wrapJSONResponse(obj g.Refer, attrs interface{}) apiJSONAPI {
	return apiJSONAPI{
		Data: apiData{
			Type:  "",
			ID:    uuid.UUID(obj.RefID()),
			Attrs: attrs,
		},
	}
}