Documentation ¶
Overview ¶
Package recd has various checks for record values.
Index ¶
- Constants
- Variables
- func ColLen(s *sql.ColumnType) string
- func IsDemozoo(b []sql.RawBytes) (bool, error)
- func NewApprove(b []sql.RawBytes) (bool, error)
- func Queries(db *sql.DB, w io.Writer, cfg conf.Config, v bool) error
- func ReverseInt(i int) (int, error)
- func Valid(deletedat, updatedat sql.RawBytes) (bool, error)
- func Verbose(w io.Writer, v bool, i any)
- type Record
- func (r *Record) Approve(db *sql.DB) error
- func (r *Record) AutoID(data string) uint
- func (r *Record) Check(w io.Writer, incoming string, values []sql.RawBytes, dir *directories.Dir) (bool, error)
- func (r *Record) CheckDownload(w io.Writer, incoming, path string) bool
- func (r *Record) CheckFileContent(fc string) bool
- func (r *Record) CheckFileSize(fs string) bool
- func (r *Record) CheckGroups(g1, g2 string) bool
- func (r *Record) CheckImage(path string) bool
- func (r *Record) ImagePath(path string) string
- func (r *Record) RecoverDownload(w io.Writer, incoming, path string) bool
- func (r *Record) String() string
- func (r *Record) Summary(w io.Writer, rows int)
Constants ¶
View Source
const ( // Datetime MySQL format. Datetime = "2006-01-02T15:04:05Z" // UpdateID is a user id to use with the updatedby column. UpdateID = "b66dc282-a029-4e99-85db-2cf2892fffcc" )
Variables ¶
Functions ¶
func ColLen ¶
func ColLen(s *sql.ColumnType) string
func NewApprove ¶
NewApprove reports if a new file record is set to unapproved.
func Queries ¶
queries parses all records waiting for approval skipping those that are missing expected data or assets such as thumbnails.
func ReverseInt ¶
ReverseInt swaps the direction of the value, 12345 would return 54321.
Types ¶
type Record ¶
type Record struct { C int Save bool Verbose bool ID uint UUID string Filename string // contains filtered or unexported fields }
func (*Record) CheckDownload ¶ added in v1.11.0
func (*Record) CheckFileContent ¶ added in v1.11.0
func (*Record) CheckFileSize ¶ added in v1.11.0
func (*Record) CheckGroups ¶
func (*Record) CheckImage ¶ added in v1.11.0
func (*Record) RecoverDownload ¶ added in v1.11.0
Click to show internal directories.
Click to hide internal directories.