dto

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PaginationQuery

type PaginationQuery struct {
	Limit  int `query:"limit"  validate:"omitempty,min=1,max=100" default:"20"`
	Offset int `query:"offset" validate:"omitempty,min=0"         default:"0"`
}

PaginationQuery represents pagination query parameters.

type Project added in v0.5.0

type Project struct {
	ID        string `json:"id"         example:"backend-service"`
	Name      string `json:"name"       example:"Backend Service"`
	RepoURL   string `json:"repo_url"   example:"https://bitbucket.org/company/backend"`
	CreatedAt string `json:"created_at" example:"2026-04-01T08:00:00Z"`
	UpdatedAt string `json:"updated_at" example:"2026-04-02T09:00:00Z"`
}

Project represents the API response for a single project.

func ToProject added in v0.5.0

func ToProject(p *projects.Project) *Project

type SortQuery

type SortQuery struct {
	Sort string `query:"sort" validate:"omitempty"`
}

SortQuery represents sorting query parameters.

type UserBrief

type UserBrief struct {
	ID        int64  `json:"id"`
	Name      string `json:"name"`
	Role      string `json:"role"`
	CreatedAt string `json:"created_at"`
}

UserBrief represents a minimal user profile for task author/assignee.

@Description	Minimal user information for task relationships.

func ResolveUserBrief

func ResolveUserBrief(id *int64, lookup map[int64]users.User) *UserBrief

func ToUserBrief

func ToUserBrief(u *users.User) UserBrief

type UserBriefList

type UserBriefList struct {
	Items []UserBrief `json:"items"`
	Total int         `json:"total"`
}

func ToUserBriefList

func ToUserBriefList(items []users.User, total int) UserBriefList

Jump to

Keyboard shortcuts

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