share

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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, storageApp provider.Storage) *App

New creates new App from Config

func (*App) Create

func (a *App) Create(filepath string, edit bool, password string, isDir bool, duration time.Duration) (string, error)

Create a share

func (*App) Delete

func (a *App) Delete(id string) error

Delete a share

func (*App) Enabled

func (a *App) Enabled() bool

Enabled checks if requirements are met

func (*App) EventConsumer added in v0.8.0

func (a *App) EventConsumer(e provider.Event)

EventConsumer handle event pushed to the event bus

func (*App) Get

func (a *App) Get(requestPath string) provider.Share

Get returns a share based on path

func (*App) List

func (a *App) List() map[string]provider.Share

List shares

func (*App) Start

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

Start worker

type Config

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

Config of package

func Flags

func Flags(fs *flag.FlagSet, prefix string, overrides ...flags.Override) 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