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

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