validation

package
v0.24.1 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseIssueType

func ParseIssueType(content string) (types.IssueType, error)

ParseIssueType extracts and validates an issue type from content. Returns the validated type or error if invalid.

func ParsePriority

func ParsePriority(content string) int

ParsePriority extracts and validates a priority value from content. Supports both numeric (0-4) and P-prefix format (P0-P4). Returns the parsed priority (0-4) or -1 if invalid.

func ValidateIDFormat

func ValidateIDFormat(id string) (string, error)

ValidateIDFormat validates that an ID has the correct format. Supports: prefix-number (bd-42), prefix-hash (bd-a3f8e9), or hierarchical (bd-a3f8e9.1) Returns the prefix part or an error if invalid.

func ValidatePrefix

func ValidatePrefix(requestedPrefix, dbPrefix string, force bool) error

ValidatePrefix checks that the requested prefix matches the database prefix. Returns an error if they don't match (unless force is true).

func ValidatePriority

func ValidatePriority(priorityStr string) (int, error)

ValidatePriority parses and validates a priority string. Returns the parsed priority (0-4) or an error if invalid. Supports both numeric (0-4) and P-prefix format (P0-P4).

Types

This section is empty.

Jump to

Keyboard shortcuts

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