model_file

package
v0.0.0-...-9e8b3cb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	Id   int64  `json:"id,omitempty" bson:"_id,omitempty"`
	Md5  string `json:"md5" bson:"md5"`                       //文件md5值
	Path string `json:"path"  bson:"path"`                    //本地路径
	Ext  string `json:"ext" bson:"ext"`                       //文件后缀
	Size int64  `json:"size,omitempty" bson:"size,omitempty"` //文件大小
}

func (File) Exist

func (f File) Exist() bool

func (File) FindOne

func (f File) FindOne() (File, error)

func (File) Insert

func (f File) Insert() (id int64, err error)

func (File) Remove

func (f File) Remove() error

func (File) ToJson

func (f File) ToJson() string

type Picture

type Picture struct {
	Id         int64  `json:"id,omitempty" bson:"_id,omitempty"`
	CreateTime int64  `json:"create_time,omitempty" bson:"create_time,omitempty"`
	Height     int    `json:"height,omitempty" bson:"height,omitempty"`
	Width      int    `json:"width,omitempty" bson:"width,omitempty"`
	Size       int64  `json:"size,omitempty" bson:"size,omitempty"`  //文件大小
	Md5        string `json:"md5,omitempty" bson:"md5,omitempty"`    //文件md5值
	Path       string `json:"path,omitempty"  bson:"path,omitempty"` //本地路径
	Ext        string `json:"ext,omitempty" bson:"ext,omitempty"`    //文件后缀

}

func (Picture) Exist

func (p Picture) Exist() bool

func (Picture) FindOne

func (p Picture) FindOne() (Picture, error)

func (Picture) Insert

func (p Picture) Insert() (id int64, err error)

func (Picture) Remove

func (p Picture) Remove() error

func (Picture) ToJson

func (p Picture) ToJson() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL