file

package
v0.9.28 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2019 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package contains Node File struct and MultiReaderAt implementation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RemoveAllFormFiles

func RemoveAllFormFiles(formfiles FormFiles)

Types

type File

type File struct {
	Name         string            `bson:"name" json:"name"`
	Size         int64             `bson:"size" json:"size"`
	Checksum     map[string]string `bson:"checksum" json:"checksum"`
	Format       string            `bson:"format" json:"format"`
	Path         string            `bson:"path" json:"-"`
	Virtual      bool              `bson:"virtual" json:"virtual"`
	VirtualParts []string          `bson:"virtual_parts" json:"virtual_parts"`
	CreatedOn    time.Time         `bson:"created_on" json:"created_on"`
	Locked       *locker.LockInfo  `bson:"-" json:"locked"`
}

File is the Node file structure. Contains the json/bson marshalling controls.

type FileInfo

type FileInfo struct {
	R        []SectionReader
	E        error
	ESection int
	Body     io.ReadCloser
	Name     string
	Size     int64
	ModTime  time.Time
	Checksum string
}

FileInfo for streaming file content

type FormFile

type FormFile struct {
	Name     string
	Path     string
	Checksum map[string]string
}

func (*FormFile) Remove

func (formfile *FormFile) Remove()

type FormFiles

type FormFiles map[string]FormFile

type ReaderAt

type ReaderAt interface {
	SectionReader
	Stat() (os.FileInfo, error)
	Close() error
}

ReaderAt interface that is compatiable with os.File types.

func MultiReaderAt

func MultiReaderAt(readers ...ReaderAt) ReaderAt

MultiReaderAt returns a ReaderAt that's the logical concatenation of the provided input readers. BUG / KNOW-ISSUE: all file handles are opened initially. May not be suitiable for large numbers of files.

type SectionReader

type SectionReader interface {
	io.Reader
	io.ReaderAt
}

SectionReader interface required for MultiReaderAt

Directories

Path Synopsis
format
fasta
Package to read and write FASTA format files
Package to read and write FASTA format files
fastq
Package to read and write FASTQ format files
Package to read and write FASTQ format files
line
Package to read and index lines of a file
Package to read and index lines of a file
multi
Package to read and auto-detect format of fasta & fastq files
Package to read and auto-detect format of fasta & fastq files
sam
Package to read and write SAM format files
Package to read and write SAM format files
seq
Package contains interfaces for fasta & fastq & and multi packages
Package contains interfaces for fasta & fastq & and multi packages

Jump to

Keyboard shortcuts

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