dbx_util

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DateTimeFormat = "2006-01-02T15:04:05Z"
)

Variables

View Source
var (
	RegexEmail = regexp.MustCompile(`^['&A-Za-z0-9._%+-]+@[A-Za-z0-9-][A-Za-z0-9.-]*\.[A-Za-z]{2,15}$`)
)

Functions

func ContentHash

func ContentHash(f io.ReadCloser, totalBytes int64) (string, error)

func FileContentHash

func FileContentHash(path string) (string, error)

Calculate File content hash

func HeaderSafeJson

func HeaderSafeJson(p interface{}) (string, error)

If you use the Dropbox-API-Arg header, you need to make it "HTTP header safe". This means using JSON-style "\uXXXX" escape codes for the character 0x7F and all non-ASCII characters. @see https://www.dropbox.com/developers/reference/json-encoding

Returns error if any char that is Unicode plane 1 or above

func IsFileIgnored

func IsFileIgnored(path string) bool

func IsFileNameIgnored

func IsFileNameIgnored(filename string) bool

func Parse

func Parse(iso8601 string) (t time.Time, err error)

func RebaseTime

func RebaseTime(t time.Time) time.Time

func ToApiTimeString

func ToApiTimeString(t time.Time) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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