order

package
v0.0.0-...-9799ab4 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTooManyFirst             = errors.New("too many first rules")
	ErrTooManyLast              = errors.New("too many last rules")
	ErrRulesSetSanityCheckError = errors.New("rules set sanity check error")
)

Functions

func OrderItems

func OrderItems(
	ides []uuid.UUID,
	get_rules func(id uuid.UUID) *OrderingRulesItem,
	middle_loop_iterations uint,
) (ret []uuid.UUID, err error)

func OrderingRulesSanityCheck

func OrderingRulesSanityCheck(
	ides []uuid.UUID,
	get_rules func(id uuid.UUID) *OrderingRulesItem,
) (log []error, first_rules, last_rules []uuid.UUID, err error)

Types

type OrderingRule

type OrderingRule uint
const (
	OrderingRuleUndefined OrderingRule = iota
	OrderingRuleFirst
	OrderingRuleLast
	OrderingRuleBefore
	OrderingRuleBeforeLast
	OrderingRuleAfter
	OrderingRuleAfterFirst
)

type OrderingRulesItem

type OrderingRulesItem struct {
	Rule     OrderingRule
	TargetId uuid.UUID
}

Jump to

Keyboard shortcuts

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