refactor: Decompose syscalls into pkg, start adding utility commands

This commit is contained in:
Felicitas Pojtinger
2021-11-19 00:39:28 +01:00
parent f41c96b59e
commit f426874cbd
35 changed files with 155 additions and 6100 deletions

View File

@@ -1,54 +0,0 @@
-- +migrate Up
create table headers (
-- Typeflag is the type of header entry.
-- The zero value is automatically promoted to either TypeReg or TypeDir
-- depending on the presence of a trailing slash in Name.
typeflag integer not null,
-- Name of file entry
name text not null primary key,
-- Target name of link (valid for TypeLink or TypeSymlink)
linkname text not null,
-- Logical file size in bytes
size integer not null,
-- Permission and mode bits
mode integer not null,
-- User ID of owner
uid integer not null,
-- Group ID of owner
gid integer not null,
-- User name of owner
uname text not null,
-- Group name of owner
gname text not null,
-- If the Format is unspecified, then Writer.WriteHeader rounds ModTime
-- to the nearest second and ignores the AccessTime and ChangeTime fields.
--
-- To use AccessTime or ChangeTime, specify the Format as PAX or GNU.
-- To use sub-second resolution, specify the Format as PAX.
-- Modification time
modtime date not null,
-- Access time (requires either PAX or GNU support)
accesstime date not null,
-- Change time (requires either PAX or GNU support)
changetime date not null,
-- Major device number (valid for TypeChar or TypeBlock)
devmajor integer not null,
-- Minor device number (valid for TypeChar or TypeBlock)
devminor integer not null,
-- Format specifies the format of the tar header.
--
-- This is set by Reader.Next as a best-effort guess at the format.
-- Since the Reader liberally reads some non-compliant files,
-- it is possible for this to be FormatUnknown.
--
-- If the format is unspecified when Writer.WriteHeader is called,
-- then it uses the first format (in the order of USTAR, PAX, GNU)
-- capable of encoding this Header (see Format).
format integer not null,
-- The record on the tape
record integer not null,
-- The header's block in the record
block integer not null
);
-- +migrate Down
drop table headers;