recd

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Datetime MySQL 5.7 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

This section is empty.

Functions

func ColLen

func ColLen(s *sql.ColumnType) string

func IsDemozoo

func IsDemozoo(b []sql.RawBytes) bool

IsDemozoo reports if a fetched demozoo file record is set to unapproved.

func NewApprove

func NewApprove(b []sql.RawBytes) bool

NewApprove reports if a new file record is set to unapproved.

func Queries

func Queries(v bool) error

queries parses all records waiting for approval skipping those that are missing expected data or assets such as thumbnails.

func ReverseInt

func ReverseInt(i uint) (uint, error)

ReverseInt swaps the direction of the value, 12345 would return 54321.

func Valid

func Valid(deletedat, updatedat sql.RawBytes) (bool, error)

func Verbose

func Verbose(v bool, i any)

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) Approve

func (r *Record) Approve() error

approve sets the record to be publically viewable.

func (*Record) AutoID

func (r *Record) AutoID(data string) (id uint)

func (*Record) Check

func (r *Record) Check(values []sql.RawBytes, dir *directories.Dir) (ok bool)

func (*Record) CheckGroups

func (r *Record) CheckGroups(g1, g2 string) (ok bool)

func (*Record) ImagePath

func (r *Record) ImagePath(path string) string

func (*Record) String

func (r *Record) String() string

func (*Record) Summary

func (r *Record) Summary(rows int)

Jump to

Keyboard shortcuts

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