callback

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppStorageWithCallback

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

AppStorageWithCallback is an implementation of AppStorage that allows for callbacks to be configured for when a directory is created or deleted.

func NewAppStorageWithCallback

func NewAppStorageWithCallback(impl appv1.AppStorage, cfg Config) *AppStorageWithCallback

func (*AppStorageWithCallback) CreateDirectory

func (s *AppStorageWithCallback) CreateDirectory(ctx context.Context, d *apiv1.Directory) (*apiv1.Directory, error)

func (*AppStorageWithCallback) DeleteDirectory

func (s *AppStorageWithCallback) DeleteDirectory(ctx context.Context, id apiv1.DirectoryID) error

func (*AppStorageWithCallback) IsDirectoryInfoUpdated

func (s *AppStorageWithCallback) IsDirectoryInfoUpdated(ctx context.Context, dir *apiv1.Directory) (bool, error)

func (*AppStorageWithCallback) IsDirectoryTracked

func (s *AppStorageWithCallback) IsDirectoryTracked(ctx context.Context, id apiv1.DirectoryID) (bool, error)

type Config

type Config struct {
	CreateDirectory func(context.Context, *apiv1.Directory) error
	DeleteDirectory func(context.Context, apiv1.DirectoryID) error
}

CallbackConfig allows for configuring callbacks for when a directory is created or deleted. This allows applications to react to these events.

Jump to

Keyboard shortcuts

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