Documentation ¶
Index ¶
- Variables
- func Headers(headers []api.Header) func() ([]api.Header, error)
- func SingleRowFrom[E any](f func(e E) (api.Row, error)) func(e E) ([]api.Row, error)
- func ZipTables(tables ...*api.Table) (*api.Table, error)
- type Func
- type Funcs
- type Registry
- type RegistryBuilder
- type SliceFuncs
- type TableConverter
- type TagAndAnyConverter
- type TaggedAnyTableConverter
- type TemplateTableColumn
- type TypedAnyConverter
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = errors.New("not found") ErrAlreadyExists = errors.New("already exists") )
Functions ¶
func SingleRowFrom ¶
Types ¶
type Funcs ¶
func TemplateTableBuilder ¶
func TemplateTableBuilder[E any](columns ...TemplateTableColumn) Funcs[E]
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶
func NewRegistry() *Registry
type RegistryBuilder ¶
func (*RegistryBuilder) AddToRegistry ¶
func (b *RegistryBuilder) AddToRegistry(r *Registry) error
func (*RegistryBuilder) Register ¶
func (b *RegistryBuilder) Register(taggedConvs ...TagAndAnyConverter)
func (*RegistryBuilder) RegisterFunc ¶
func (b *RegistryBuilder) RegisterFunc(funcs ...func(*Registry) error)
type SliceFuncs ¶
func (SliceFuncs[E]) ConvertToTable ¶
func (f SliceFuncs[E]) ConvertToTable(es []E) (*api.Table, error)
type TableConverter ¶
func StaticTable ¶
func StaticTable[E any](table *api.Table) TableConverter[E]
func Zip ¶
func Zip[E any](convs ...TableConverter[E]) TableConverter[E]
type TagAndAnyConverter ¶
type TagAndAnyConverter struct { Tag reflect.Type Converter TableConverter[any] }
func ToTagAndTypedAny ¶
func ToTagAndTypedAny[E any](conv TableConverter[E]) TagAndAnyConverter
type TaggedAnyTableConverter ¶
type TaggedAnyTableConverter interface { TableConverter[any] Tag() reflect.Type }
type TemplateTableColumn ¶
type TypedAnyConverter ¶
type TypedAnyConverter[E any, TC TableConverter[E]] struct { Converter TC }
func (TypedAnyConverter[E, TC]) ConvertToTable ¶
func (c TypedAnyConverter[E, TC]) ConvertToTable(v any) (*api.Table, error)
Click to show internal directories.
Click to hide internal directories.