Discover Packages
github.com/turahe/pkg
types
package
Version:
v0.5.3
Opens a new window with list of versions in this module.
Published: Aug 8, 2026
License: MIT
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: ? modules, 0 packages
The first number is the count of modules that contain a package that imports this one.
The module count is a better indicator of popularity than the package count.
A module with 100 importing packages is counted only once instead of 100 times,
reflecting the fact that the choice to use the package was likely made only once,
not 100 times.
A '?' means that the value hasn't been computed yet.
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package types provides shared types used across handler, repository, and use-case layers.
Role in architecture:
Shared kernel: no dependencies on infrastructure; used by domain-facing code and adapters.
Responsibilities:
Conditions: map type for repository WHERE clauses (key = SQL fragment, value = arg).
TimeRange: start/end string pair for time-bounded queries.
PageInfo: pagination request (pageNumber, pageSize) with form/json tags.
This package must NOT:
Contain business rules or validation logic.
type Conditions map[string ]interface{}
Conditions is a map from SQL condition fragments to argument values, used by repository WHERE clauses (e.g. "id = ?" -> value).
type PageInfo struct {
PageNumber int `form:"pageNumber" json:"pageNumber"`
PageSize int `form:"pageSize" json:"pageSize"`
}
PageInfo holds offset-based pagination request parameters (pageNumber, pageSize) with form and JSON tags.
type TimeRange struct {
Start string `json:"start"`
End string `json:"end"`
}
TimeRange holds start and end time strings (e.g. IANA or RFC3339) for time-bounded queries.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.