groupby

package
v0.1.174 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ComponentName = "group_by"
	InPort        = "in"
	OutPort       = "out"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

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

Component implements the group_by logic

func (*Component) GetInfo

func (c *Component) GetInfo() module.ComponentInfo

func (*Component) Handle

func (c *Component) Handle(ctx context.Context, handler module.Handler, port string, msg any) any

func (*Component) Instance

func (c *Component) Instance() module.Component

func (*Component) Ports

func (c *Component) Ports() []module.Port

type Context

type Context any

Context type alias for schema generation

type Group

type Group struct {
	Key   string `json:"key" title:"Key" description:"The group key value"`
	Items []any  `json:"items" title:"Items" description:"Items in this group"`
	Count int    `json:"count" title:"Count" description:"Number of items in group"`
}

Group represents a single group

type InMessage

type InMessage struct {
	Context Context `json:"context,omitempty" configurable:"true" title:"Context"`
	Items   []any   `json:"items" required:"true" title:"Items" description:"Array of items to group"`
}

InMessage is the input

type OutMessage

type OutMessage struct {
	Context Context `json:"context,omitempty" configurable:"true" title:"Context"`
	Groups  []Group `json:"groups" title:"Groups" description:"Grouped items"`
	Total   int     `json:"total" title:"Total" description:"Total number of items"`
}

OutMessage is the output

type Settings

type Settings struct {
	GroupByPath string `` /* 134-byte string literal not displayed */
}

Settings configures the component

Jump to

Keyboard shortcuts

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