model

package
v0.0.0-...-e5cbba9 Latest Latest
Warning

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

Go to latest
Published: May 4, 2022 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 Dir

type Dir struct {
	// Current dir
	Path string `json:"path"`
	// Files in current path
	Files []*File `json:"files"`
	// Subdirs in current path
	Dirs []*Dir `json:"dirs"`
}

type File

type File struct {
	// Unique identifier to the file
	ID string `json:"id"`
	// File name
	Name string `json:"name"`
	// File path
	Path string `json:"path"`
	// File owner
	User int `json:"user"`
	// Content type
	FileType string `json:"fileType"`
	// Size in bytes
	Size int `json:"size"`
	// Creation date
	CreatedAt time.Time `json:"createdAt"`
	// Last update date
	UpdatedAt time.Time `json:"updatedAt"`
	// URL to download the file
	DownloadURL string `json:"downloadURL"`
}

func NewFile

func NewFile(file *entity.File) *File

func NewFiles

func NewFiles(files []*entity.File) []*File

type MoveInput

type MoveInput struct {
	// Identifier of the desired file to move
	ID string `json:"id"`
	// Destination user
	User int `json:"user"`
	// Destination path
	NewPath string `json:"newPath"`
	// If set will replace duplicate files without error
	Overwrite bool `json:"overwrite"`
}

type UploadInput

type UploadInput struct {
	File graphql.Upload `json:"file"`
	// File owner
	User int `json:"user"`
	// Destination path
	Path string `json:"path"`
	// If set will replace duplicate files without error
	Overwrite bool `json:"overwrite"`
}

Jump to

Keyboard shortcuts

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