loaddata

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2026 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package loaddata provides an ordinary component handler for typed AFS data. Configuration and the storage capability use normal handler input DI.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New[T any]() xhandler.Contract[Input, Output[T]]

Types

type Config

type Config struct {
	URL         string `json:"url"`
	Format      string `json:"format"`
	Compression string `json:"compression,omitempty"`
	// MaxBytes bounds decoded bytes, including decompressed data. Zero is unlimited.
	MaxBytes int64 `json:"maxBytes,omitempty"`
}

type Handler

type Handler[T any] struct{}

func (*Handler[T]) Exec

func (*Handler[T]) Exec(ctx context.Context, _ xhandler.Session, input *Input, output *Output[T]) error

type Input

type Input struct {
	Config  *Config        `parameter:"Config,kind=const,in=LoadData,required"`
	Storage storage.Opener `bind:"kind=afs,required"`
}

func (*Input) Init

func (i *Input) Init(context.Context) error

type Output

type Output[T any] struct{ Data []T }

Jump to

Keyboard shortcuts

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