disk

package
v0.0.0-...-34d1da7 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DirectoryExt

type DirectoryExt struct {
	ID        uuid.UUID `db:"id" json:"id" validate:"required,uuid"`
	CreatedAt time.Time `db:"created_at" json:"created_at"`
	UpdatedAt time.Time `db:"updated_at" json:"updated_at"`

	Name               string  `db:"name" json:"name" validate:"required,lte=255"`
	Path               string  `db:"path" json:"path" validate:"required,lte=255"`
	Size               int64   `db:"size" json:"size"`
	Free               int64   `db:"free" json:"free"`
	Used               int64   `db:"used" json:"used"`
	Percentage         float64 `db:"percentage" json:"percentage"`
	Marked_For_Cleanup bool    `db:"marked_for_cleanup" json:"marked_for_cleanup"`
	// contains filtered or unexported fields
}

func (*DirectoryExt) New

func (dr *DirectoryExt) New(base *fs.DirEntry) *DirectoryExt

type Drive

type Drive struct {
	Name       string    `json:"name"`
	Size       int64     `json:"size"`
	Free       int64     `json:"free"`
	Used       int64     `json:"used"`
	Percentage float64   `json:"percentage"`
	Volumes    []Volume  `json:"volumes"`
	CreatedAt  time.Time `json:"created_at"`
	UpdatedAt  time.Time `json:"updated_at"`
}

func (*Drive) New

func (d *Drive) New() *Drive

type FileExt

type FileExt struct {
	ID                  uuid.UUID `db:"id" json:"id" validate:"required,uuid"`
	CreatedAt           time.Time `db:"created_at" json:"created_at"`
	UpdatedAt           time.Time `db:"updated_at" json:"updated_at"`
	Version             int       `db:"version" json:"version"`
	Marked_For_Deletion bool      `db:"marked_for_deletion" json:"marked_for_deletion"`
	Marked_For_Cleanup  bool      `db:"marked_for_cleanup" json:"marked_for_cleanup"`
	Marked_For_Sync     bool      `db:"marked_for_sync" json:"marked_for_sync"`

	Name string `db:"name" json:"name" validate:"required,lte=255"`
	Path string `db:"path" json:"path" validate:"required,lte=255"`
	Size int64  `db:"size" json:"size"`

	Deleted_At time.Time `db:"deleted_at" json:"deleted_at"`
	// contains filtered or unexported fields
}

func (*FileExt) Delete

func (f *FileExt) Delete() bool

func (*FileExt) GetBase

func (f *FileExt) GetBase() fs.DirEntry

func (*FileExt) IsDeleted

func (f *FileExt) IsDeleted() bool

func (*FileExt) New

func (fl *FileExt) New(base *fs.DirEntry) *FileExt

func (*FileExt) SetDeleted

func (f *FileExt) SetDeleted(isDeleted bool)

type Volume

type Volume struct {
	Name                string         `json:"name"`
	Size                int64          `json:"size"`
	Free                int64          `json:"free"`
	Used                int64          `json:"used"`
	Percentage          float64        `json:"percentage"`
	CreatedAt           time.Time      `json:"created_at"`
	UpdatedAt           time.Time      `json:"updated_at"`
	Mounted             bool           `json:"mounted"`
	MountPoint          string         `json:"mount_point"`
	Filesystem          string         `json:"filesystem"`
	Top_Ten_Directories []DirectoryExt `json:"top_ten_directories"`
}

Jump to

Keyboard shortcuts

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