models

package
v0.0.0-...-1415449 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2022 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileSearch

func FileSearch(filename string, filedesc string, page int64, pagesize int64) (ret *[]FileInfo, err error)

Types

type FileChunk

type FileChunk struct {
	ID      primitive.ObjectID `json:"id" bson:"_id,omitempty"`
	FileID  primitive.ObjectID `json:"file_id" bson:"file_id"`
	Index   int64              `json:"index" bson:"index"`
	Data    string             `json:"data" bson:"data"`
	Length  int64              `json:"length" bson:"length"`
	OLength int64              `json:"olength" bson:"olength"`
}

func FindFileData

func FindFileData(id string, index int) (ret *FileChunk, err error)

type FileInfo

type FileInfo struct {
	ID          primitive.ObjectID `json:"id" bson:"_id,omitempty"`
	Filename    string             `json:"filename" bson:"filename"`
	Description string             `json:"description" bson:"description"`
	Chunks      int64              `json:"chunks" bson:"chunks"`
	Bytes       int64              `json:"bytes" bson:"bytes"`
}

func AddFileChunks

func AddFileChunks(filename string, description string) (f *FileInfo, err error)

func FindFileInfo

func FindFileInfo(id string) (ret *FileInfo, err error)

Jump to

Keyboard shortcuts

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