Documentation
¶
Index ¶
- func ErrFailedTo(action string, err error) error
- func ErrInvalid(what string, value interface{}) error
- func ErrMissingParam(param string) error
- func ErrNotFound(what string) error
- func GenerateCalibrationID() string
- func GenerateEmergingID() string
- func GenerateFixID() string
- func GenerateID(prefix string) string
- func GenerateMemoryID() string
- func GeneratePracticeID(practiceID string) string
- func GenerateResourceID(uri string) string
- func GenerateToolID(pattern string) string
- func GenerateWorkflowID(workflow string, step int) string
- func NewRedisClient(cfg *RedisConfig) (*redis.Client, error)
- func NewTestRedisClient() (*redis.Client, error)
- type RedisConfig
- type Validator
- func (v *Validator) Error() error
- func (v *Validator) Errors() []string
- func (v *Validator) HasErrors() bool
- func (v *Validator) RequireNonEmpty(field string, value string) *Validator
- func (v *Validator) RequirePositive(field string, value int) *Validator
- func (v *Validator) RequireRange(field string, value, min, max float64) *Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrFailedTo ¶
ErrFailedTo creates a "failed to X" error
func ErrInvalid ¶
ErrInvalid creates an "invalid X" error
func ErrMissingParam ¶
ErrMissingParam creates a "missing required parameter" error
func GenerateCalibrationID ¶ added in v0.3.0
func GenerateCalibrationID() string
GenerateCalibrationID generates a unique ID for calibration tasks
func GenerateEmergingID ¶ added in v0.3.0
func GenerateEmergingID() string
GenerateEmergingID generates a unique ID for emerging patterns
func GenerateFixID ¶ added in v0.3.0
func GenerateFixID() string
GenerateFixID generates a unique ID for fixes
func GenerateID ¶ added in v0.3.0
GenerateID generates a unique ID with the given prefix
func GenerateMemoryID ¶ added in v0.3.0
func GenerateMemoryID() string
GenerateMemoryID generates a unique ID for memory entries
func GeneratePracticeID ¶ added in v0.3.0
GeneratePracticeID generates a unique ID for practices
func GenerateResourceID ¶ added in v0.3.0
GenerateResourceID generates a unique ID for resources with URI
func GenerateToolID ¶ added in v0.3.0
GenerateToolID generates a unique ID for tool patterns
func GenerateWorkflowID ¶ added in v0.3.0
GenerateWorkflowID generates a unique ID for workflow steps
func NewRedisClient ¶ added in v0.3.0
func NewRedisClient(cfg *RedisConfig) (*redis.Client, error)
NewRedisClient creates a new Redis client with the given configuration
func NewTestRedisClient ¶ added in v0.3.0
NewTestRedisClient creates a Redis client for testing
Types ¶
type RedisConfig ¶ added in v0.3.0
type RedisConfig struct {
Addr string
MaxRetries int
DialTimeout time.Duration
ReadTimeout time.Duration
WriteTimeout time.Duration
}
RedisConfig holds configuration for Redis client
func DefaultRedisConfig ¶ added in v0.3.0
func DefaultRedisConfig(addr string) *RedisConfig
DefaultRedisConfig returns production-ready Redis configuration
func TestRedisConfig ¶ added in v0.3.0
func TestRedisConfig() *RedisConfig
TestRedisConfig returns simple Redis configuration for testing
type Validator ¶ added in v0.2.0
type Validator struct {
// contains filtered or unexported fields
}
Validator provides common validation functions
func NewValidator ¶ added in v0.2.0
func NewValidator() *Validator
NewValidator creates a new validator
func (*Validator) RequireNonEmpty ¶ added in v0.2.0
RequireNonEmpty validates that a string is not empty
func (*Validator) RequirePositive ¶ added in v0.2.0
RequirePositive validates that a value is positive