share

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	PubsubChannel string
}

func Flags

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

type GetNow added in v0.25.0

type GetNow func() time.Time

type Service added in v0.26.0

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

func New

func New(config *Config, storageService absto.Storage, redisClient redis.Client, exclusiveService exclusive.Service) (*Service, error)

func (*Service) Create added in v0.26.0

func (s *Service) Create(ctx context.Context, filepath string, edit, story bool, password string, isDir bool, duration time.Duration) (string, error)

func (*Service) Delete added in v0.26.0

func (s *Service) Delete(ctx context.Context, id string) error

func (*Service) Done added in v0.26.0

func (s *Service) Done() <-chan struct{}

func (*Service) EventConsumer added in v0.26.0

func (s *Service) EventConsumer(ctx context.Context, e provider.Event)

func (*Service) Exclusive added in v0.26.0

func (s *Service) Exclusive(ctx context.Context, name string, duration time.Duration, action func(ctx context.Context) error) (bool, error)

func (*Service) Get added in v0.26.0

func (s *Service) Get(requestPath string) provider.Share

func (*Service) List added in v0.26.0

func (s *Service) List() (output []provider.Share)

func (*Service) PubSubHandle added in v0.26.0

func (s *Service) PubSubHandle(share provider.Share, err error)

func (*Service) Start added in v0.26.0

func (s *Service) Start(ctx context.Context)

func (*Service) UpdatePassword added in v0.26.0

func (s *Service) UpdatePassword(ctx context.Context, id, password string) error

Jump to

Keyboard shortcuts

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