groupby

package
v0.1.175 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{}

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 []Item `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" description:"Arbitrary data passed through to output"`
	Items       []Item  `json:"items" required:"true" configurable:"true" title:"Items" description:"Array of items to group"`
	GroupByPath string  `` /* 154-byte string literal not displayed */
}

InMessage is the input

type Item added in v0.1.175

type Item any

Item type alias for schema traceability between input and output

type OutMessage

type OutMessage struct {
	Context Context `json:"context,omitempty" 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

Jump to

Keyboard shortcuts

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