telemetry

package
v0.5.16 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(storage model.Storage, tracer trace.Tracer) model.Storage

New creates new App from Config

Types

type App

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

App of the package

func (App) ConvertError added in v0.3.4

func (a App) ConvertError(err error) error

ConvertError with the appropriate type

func (App) CreateDir

func (a App) CreateDir(ctx context.Context, pathname string) error

CreateDir container in storage

func (App) Enabled

func (a App) Enabled() bool

Enabled checks that requirements are met

func (App) Info

func (a App) Info(ctx context.Context, pathname string) (model.Item, error)

Info provide metadata about given pathname

func (App) List

func (a App) List(ctx context.Context, pathname string) ([]model.Item, error)

List items in the storage

func (App) Name

func (a App) Name() string

Name of the sotrage

func (App) Path

func (a App) Path(pathname string) string

Path return full path of pathname

func (App) ReadFrom

func (a App) ReadFrom(ctx context.Context, pathname string) (io.ReadSeekCloser, error)

ReadFrom reads content from given pathname

func (App) Remove

func (a App) Remove(ctx context.Context, pathname string) error

Remove file or directory from storage

func (App) Rename

func (a App) Rename(ctx context.Context, oldName, newName string) error

Rename file or directory from storage

func (App) UpdateDate

func (a App) UpdateDate(ctx context.Context, pathname string, date time.Time) error

UpdateDate update date from given value

func (App) Walk

func (a App) Walk(ctx context.Context, pathname string, walkFn func(model.Item) error) error

Walk browses item recursively

func (App) WithIgnoreFn

func (a App) WithIgnoreFn(ignoreFn func(model.Item) bool) model.Storage

WithIgnoreFn create a new App with given ignoreFn

func (App) WriteSizedTo added in v0.5.1

func (a App) WriteSizedTo(ctx context.Context, pathname string, size int64, reader io.Reader) error

WriteSizedTo with content from reader to pathname with known size

func (App) WriteTo

func (a App) WriteTo(ctx context.Context, pathname string, reader io.Reader) error

WriteTo with content from reader to pathname

Jump to

Keyboard shortcuts

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