crud

package
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2022 License: MIT Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotAuthorized error returned when user is not authorized
	ErrNotAuthorized = errors.New("you're not authorized to do this ⛔")

	// ErrEmptyName error returned when user does not provide a name
	ErrEmptyName = errors.New("name is empty")

	// ErrEmptyFolder error returned when user does not provide a folder
	ErrEmptyFolder = errors.New("folder is empty")

	// ErrAbsoluteFolder error returned when user provide a relative folder
	ErrAbsoluteFolder = errors.New("folder has to be absolute")
)

Functions

This section is empty.

Types

type App

type App struct {
	// contains filtered or unexported fields
}

App of package

func New

func New(config Config, storage absto.Storage, rendererApp renderer.App, shareApp provider.ShareManager, webhookApp provider.WebhookManager, thumbnailApp thumbnail.App, exifApp exif.App, eventProducer provider.EventProducer, amqpClient *amqp.Client, tracerApp tracer.App) (App, error)

New creates new App from Config

func (App) Create

func (a App) Create(w http.ResponseWriter, r *http.Request, request provider.Request)

Create creates given path directory to filesystem

func (App) Delete

func (a App) Delete(w http.ResponseWriter, r *http.Request, request provider.Request)

Delete given path from filesystem

func (App) Download added in v0.8.0

func (a App) Download(w http.ResponseWriter, r *http.Request, request provider.Request, items []absto.Item)

Download content of a directory into a streamed zip

func (App) Get

func (a App) Get(w http.ResponseWriter, r *http.Request, request provider.Request) (renderer.Page, error)

Get output content

func (App) Post

func (a App) Post(w http.ResponseWriter, r *http.Request, request provider.Request)

Post handle post from form

func (App) Rename

func (a App) Rename(w http.ResponseWriter, r *http.Request, request provider.Request)

Rename rename given path to a new one

func (App) Start

func (a App) Start(done <-chan struct{})

Start crud operations

type Config

type Config struct {
	// contains filtered or unexported fields
}

Config of package

func Flags

func Flags(fs *flag.FlagSet, prefix string) Config

Flags adds flags for configuring package

Jump to

Keyboard shortcuts

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