refactor: use uint64
This commit is contained in:
parent
e9baacd55e
commit
47048ed2ab
|
@ -18,8 +18,8 @@ type extMap struct {
|
||||||
|
|
||||||
type FileReference struct {
|
type FileReference struct {
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Created int `json:"created"`
|
Created uint64 `json:"created"`
|
||||||
Version int `json:"version"`
|
Version uint64 `json:"version"`
|
||||||
File *FileVersion `json:"file"`
|
File *FileVersion `json:"file"`
|
||||||
Ext extMap `json:"ext"`
|
Ext extMap `json:"ext"`
|
||||||
History fileHistoryMap `json:"history"`
|
History fileHistoryMap `json:"history"`
|
||||||
|
@ -28,7 +28,7 @@ type FileReference struct {
|
||||||
Key string `json:"key"`
|
Key string `json:"key"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewFileReference(name string, created, version int, file *FileVersion, ext extMap, history fileHistoryMap, mimeType string) *FileReference {
|
func NewFileReference(name string, created, version uint64, file *FileVersion, ext extMap, history fileHistoryMap, mimeType string) *FileReference {
|
||||||
return &FileReference{
|
return &FileReference{
|
||||||
Name: name,
|
Name: name,
|
||||||
Created: created,
|
Created: created,
|
||||||
|
@ -106,7 +106,7 @@ func (fr *FileReference) DecodeMsgpack(dec *msgpack.Decoder) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
fr.Version = val
|
fr.Version = uint64(val)
|
||||||
case int8(6):
|
case int8(6):
|
||||||
err := dec.Decode(&fr.MimeType)
|
err := dec.Decode(&fr.MimeType)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue