service

package
v0.0.0-...-b9e25f6 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RecoverService

func RecoverService(err *error)

Types

type Assets

type Assets struct {
	Storage storage.Storage
	Repo    repository.Repository
	Config  AssetsConfig

	HttpClient *http.Client
	// contains filtered or unexported fields
}

func (*Assets) DescribeByKey

func (a *Assets) DescribeByKey(ctx context.Context, assetKey string) (asset *types.Asset, err error)

func (*Assets) GetByKey

func (a *Assets) GetByKey(ctx context.Context, assetKey string, rng *utils.Range) (asset *types.Asset, rc io.ReadCloser, err error)

func (*Assets) GetByOriginalUrl

func (a *Assets) GetByOriginalUrl(ctx context.Context, originalUrl string, rng *utils.Range) (asset *types.Asset, rc io.ReadCloser, err error)

func (*Assets) Store

func (a *Assets) Store(ctx context.Context, extra *types.Asset, data io.Reader) (asset *types.Asset, err error)

func (*Assets) StoreByOriginalUrl

func (a *Assets) StoreByOriginalUrl(ctx context.Context, originalUrl string, wait bool) (asset *types.Asset, err error)

type AssetsConfig

type AssetsConfig struct {
	MaxRemoteSize      int64
	MaxRemoteWaitSize  int64
	MaxSize            int64
	OriginalUrlPattern *regexp.Regexp
	HttpUserAgent      string
}

type SeeUrlError

type SeeUrlError struct {
	Url string
}

func (*SeeUrlError) Error

func (err *SeeUrlError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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