file

package module
v0.0.39 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2023 License: MIT Imports: 19 Imported by: 0

README

Para manejo de archivos en go via http u solicitado desde otro paquete

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArchiveType

func ArchiveType(File *[]byte) string

func CloneDirectory

func CloneDirectory(origin, destiny string)

Types

type File

type File struct {
	//table
	Name             string // file
	FieldIdFile      string //0 id_file
	FieldModuleName  string //1 module_name
	FieldName        string //2 field_name
	FieldFolderId    string //3 folder_id
	FieldDescription string //4 description
	FieldFilePath    string //5 file_path
	FieldFiles       string //6 files
	// contains filtered or unexported fields
}

func New

func New(m *model.Module, db model.DataBaseAdapter, conf ...string) *File

conf: field_name:voucher,user_photo,boleta... default file filetype:video, pdf, document. default imagen root_folder:static_files default "app_files" max_files:1, 4, 6.. default 6 max_kb_size:100, 400 default 50

func (File) CreateFile added in v0.0.20

func (f File) CreateFile(u *model.User, r *http.Request, params map[string]string) ([]map[string]string, error)

CreateFile upload files http handler

func (File) Delete added in v0.0.2

func (f File) Delete(u *model.User, params ...map[string]string) ([]map[string]string, error)

func (File) FieldAddEventListener

func (File) FieldAddEventListener(field_name string) string

func (File) FilePath added in v0.0.20

func (f File) FilePath(u *model.User, params map[string]string) (string, error)

func (File) HtmlName

func (File) HtmlName() string

func (File) InputValueChanges

func (File) InputValueChanges() string

func (File) MaximumFileSize added in v0.0.20

func (f File) MaximumFileSize() int64

func (File) Object

func (f File) Object() *model.Object

func (File) Read added in v0.0.20

func (f File) Read(u *model.User, params ...map[string]string) ([]map[string]string, error)

func (File) SelectedTargetChanges

func (File) SelectedTargetChanges() string

func (File) Update added in v0.0.2

func (f File) Update(u *model.User, data ...map[string]string) ([]map[string]string, error)

Jump to

Keyboard shortcuts

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