database

package
v2.0.0-...-73b7ba0 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const UpdateID string = "b66dc282-a029-4e99-85db-2cf2892fffcc"

UpdateID is a user id to use with the updatedby column.

Variables

This section is empty.

Functions

func Connect

func Connect() *sql.DB

Connect to the database.

func CreateProof

func CreateProof(id string, ow bool, all bool) error

CreateProof ...

func CreateProofs

func CreateProofs(ow bool, all bool) error

CreateProofs is a placeholder to scan archives.

func Update

func Update(id string, content string)

Update is a temp SQL update func.

Types

type Connection

type Connection struct {
	Name   string // database name
	User   string // access username
	Pass   string // access password
	Server string // host server protocol, address and port
}

Connection information for a MySQL database.

type Empty

type Empty struct{}

Empty is used as a blank value for search maps. See: https://dave.cheney.net/2014/03/25/the-empty-struct

type IDs

type IDs map[string]struct{}

IDs are unique UUID values used by the database and filenames.

func CreateUUIDMap

func CreateUUIDMap() (int, IDs)

CreateUUIDMap builds a map of all the unique UUID values stored in the Defacto2 database.

type Record

type Record struct {
	ID   string // mysql auto increment id
	UUID string // record unique id
	File string // absolute path to file
	Name string // filename
}

Record of a file item.

Jump to

Keyboard shortcuts

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