file

package
v0.0.0-...-2031ce5 Latest Latest
Warning

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

Go to latest
Published: May 8, 2020 License: AGPL-3.0, AGPL-3.0-or-later Imports: 16 Imported by: 0

Documentation

Overview

Package file provides file backend abstraction.

Index

Constants

View Source
const (
	// DefaultUploadsRoot is a static content endpoin URL.
	DefaultUploadsRoot = "/uploads"
)

Variables

View Source
var Backend fileBackend

Backend equals to current file backend.

Functions

func SourcePath

func SourcePath(fileType uint8, sha1 string) string

SourcePath returns URL to file source.

func StartBackend

func StartBackend(conf Config) (err error)

StartBackend initializes file backend.

func ThumbPath

func ThumbPath(thumbType uint8, sha1 string) string

ThumbPath returns URL to file thumbnail.

Types

type Config

type Config struct {
	Backend   string
	Dir       string
	Address   string
	HostKey   string
	Username  string
	Password  string
	AuthURL   string
	Container string
}

Config contains parameters for all backends.

Jump to

Keyboard shortcuts

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