Documentation
¶
Overview ¶
Package state provides filtering for workflow states.
Supported filters (7):
- created-at: Filter by creation date (--created-after, --created-before)
- updated-at: Filter by update date (--updated-after, --updated-before)
- id: Filter by workflow state UUID (--id)
- name: Filter by state name contains (--name)
- description: Filter by description contains (--description)
- type: Filter by state type (--type): triage, backlog, unstarted, started, completed, canceled
- team: Filter by team name/key (--team)
Index ¶
- Variables
- func ApplyDescription(ctx context.Context, cmd *cobra.Command, b *FilterBuilder) error
- func ApplyName(ctx context.Context, cmd *cobra.Command, b *FilterBuilder) error
- func ApplyTeam(ctx context.Context, cmd *cobra.Command, b *FilterBuilder) error
- func ApplyType(ctx context.Context, cmd *cobra.Command, b *FilterBuilder) error
- type FilterBuilder
- func (b *FilterBuilder) Build() *intgraphql.WorkflowStateFilter
- func (b *FilterBuilder) CreatedAtComparator() *intgraphql.DateComparator
- func (b *FilterBuilder) Filter() *intgraphql.WorkflowStateFilter
- func (b *FilterBuilder) FromFlags(ctx context.Context, cmd *cobra.Command) error
- func (b *FilterBuilder) Parser() dateparser.Parser
- func (b *FilterBuilder) Resolver() *resolver.Resolver
- func (b *FilterBuilder) SetID(comp *intgraphql.IDComparator)
- func (b *FilterBuilder) UpdatedAtComparator() *intgraphql.DateComparator
- type FilterFunc
Constants ¶
This section is empty.
Variables ¶
var Filters = map[string]FilterFunc{ "created-at": common.ApplyCreatedAt[*FilterBuilder], "updated-at": common.ApplyUpdatedAt[*FilterBuilder], "id": common.ApplyID[*FilterBuilder], "team": ApplyTeam, "name": ApplyName, "description": ApplyDescription, "type": ApplyType, }
Filters maps filter names to their apply functions. Uses shared filters from common package where applicable.
Functions ¶
func ApplyDescription ¶
ApplyDescription handles --description flag.
Types ¶
type FilterBuilder ¶
type FilterBuilder struct {
// contains filtered or unexported fields
}
FilterBuilder constructs WorkflowStateFilter from CLI flags.
func NewFilterBuilder ¶
func NewFilterBuilder(res *resolver.Resolver) *FilterBuilder
NewFilterBuilder creates a FilterBuilder with the given resolver.
func (*FilterBuilder) Build ¶
func (b *FilterBuilder) Build() *intgraphql.WorkflowStateFilter
Build returns the filter if any fields are set, nil otherwise.
func (*FilterBuilder) CreatedAtComparator ¶
func (b *FilterBuilder) CreatedAtComparator() *intgraphql.DateComparator
CreatedAtComparator returns or creates the CreatedAt comparator.
func (*FilterBuilder) Filter ¶
func (b *FilterBuilder) Filter() *intgraphql.WorkflowStateFilter
Filter returns the underlying WorkflowStateFilter.
func (*FilterBuilder) Parser ¶
func (b *FilterBuilder) Parser() dateparser.Parser
Parser returns the date parser.
func (*FilterBuilder) Resolver ¶
func (b *FilterBuilder) Resolver() *resolver.Resolver
Resolver returns the resolver for entity lookups.
func (*FilterBuilder) SetID ¶
func (b *FilterBuilder) SetID(comp *intgraphql.IDComparator)
SetID sets the ID comparator. Implements common.IDFilterable.
func (*FilterBuilder) UpdatedAtComparator ¶
func (b *FilterBuilder) UpdatedAtComparator() *intgraphql.DateComparator
UpdatedAtComparator returns or creates the UpdatedAt comparator.
type FilterFunc ¶
FilterFunc applies a filter based on command flags.