models

package
v0.0.0-...-ac55ef5 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadDataFromStdin

func ReadDataFromStdin() ([]byte, error)

func ReadNameFromStdin

func ReadNameFromStdin() (string, error)

Types

type File

type File struct {
	ID       int `db:"id"`
	Metadata FileMetadata
	Status   string `db:"status"`
	Data     []byte `db:"data"`
}

func (*File) Deserialize

func (i *File) Deserialize(data []byte) error

func (*File) Serialize

func (i *File) Serialize() []byte

func (*File) SetFile

func (i *File) SetFile() error

type FileMetadata

type FileMetadata struct {
	Name      string `db:"filename"`
	Extension string `db:"extension"`
	Size      int    `db:"filesize"`
}

func NewFileMetadata

func NewFileMetadata(fullname string) FileMetadata

func (*FileMetadata) Split

func (metadata *FileMetadata) Split()

Directories

Path Synopsis
v2

Jump to

Keyboard shortcuts

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