gifkv

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect() (ok bool, err error)

Connect to the database

func Count

func Count() int

Count returns the number of gifs cached in the database

func Disconnect

func Disconnect()

Disconnect from the database connection

func GetDatabasePath

func GetDatabasePath() string

GetDatabasePath returns the db path

func Init

func Init() (ok bool, err error)

Init queues up the database connection

func SetDatabasePath

func SetDatabasePath(filePath string) (ok bool, err error)

SetDatabasePath sets the db path

Types

type Record

type Record struct {
	ID           string `json:"checksum"`
	BaseName     string `json:"base_name"`
	Directory    string `json:"directory"`
	FileSize     int    `json:"file_size"`
	SharedLinkID string `json:"shared_link_id"`
	RemotePath   string `json:"remote_path"`
	// contains filtered or unexported fields
}

Record of a dropbox-linked gif

func Find

func Find(checksum string) (record Record, err error)

Find looks up a record by checksum

func (Record) BBCode added in v1.5.0

func (r Record) BBCode() string

BBCode returns a publicly-accessible bbcode-based url

func (*Record) Delete

func (r *Record) Delete() (bool, error)

Delete removes the record from the database

func (Record) Markdown

func (r Record) Markdown() string

Markdown returns a publicly-accessible markdown-based url

func (Record) Persisted

func (r Record) Persisted() bool

Persisted returns whether the record is saved in the database

func (Record) RemoteOK

func (r Record) RemoteOK() (bool, error)

RemoteOK checks to see if a persisted record returns a 200 status code

func (*Record) Save

func (r *Record) Save() (bool, error)

Save captures the record to the database

func (Record) String

func (r Record) String() string

String returns a string formatted-Record

func (Record) Tags

func (r Record) Tags() string

Tags break down the directory

func (Record) URL

func (r Record) URL() string

URL returns a publicly-accessible url

Jump to

Keyboard shortcuts

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