types

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 0 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.

Documentation

Overview

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.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conditions added in v0.1.2

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 added in v0.3.3

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

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.

Jump to

Keyboard shortcuts

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