types

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: MIT Imports: 0 Imported by: 0

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