dto

package
v0.0.0-...-f4de95a Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetListPayload

func GetListPayload(rq *http.Request, payload *List_Payload) error

func ValidateQueryParams

func ValidateQueryParams(query string) string

Types

type BaseField

type BaseField struct {
	CreatedAt  int64     `json:"createdAt" time_format:"unix" example:"1662803912"`
	UpdatedAt  int64     `json:"updatedAt" time_format:"unix" example:"1662803912"`
	ModifiedBy *Modifier `json:"modifiedBy"`
	Version    int64     `json:"version" example:"1"`
}

type GetDetailById_Payload

type GetDetailById_Payload struct {
	Id      int64    `json:"XID"`
	Subject *Subject `json:"subject"`
}

type GetDetail_Payload

type GetDetail_Payload struct {
	XID     string   `json:"XID"`
	Subject *Subject `json:"subject"`
}

type GetHealth_Result

type GetHealth_Result struct {
	AppVersion     string    `json:"appVersion" example:"v0.1.0"`
	BuildSignature string    `json:"buildSignature" example:"2b38f457-577f-423b-a7c0-16c50a86398c"`
	Uptime         string    `json:"uptime" example:"1m39.5398474s"`
	ServerTime     time.Time `json:"serverTime" example:"2023-03-14T22:59:10.155009095+07:00"`
}

type ListMetadata

type ListMetadata struct {
	Count  int64  `json:"count" example:"1"`
	Limit  int64  `json:"limit" example:"10"`
	Skip   int64  `json:"skip" example:"0"`
	SortBy string `json:"sortBy" example:"createdAt DESC"`
}

func ToListMetadata

func ToListMetadata(p *List_Payload, count int64) *ListMetadata

type List_Payload

type List_Payload struct {
	Limit   int64             `json:"limit" query:"limit"`
	Skip    int64             `json:"skip" query:"skip"`
	SortBy  string            `json:"sortBy" query:"sortBy"`
	Filters map[string]string `json:"-" query:"filters"`
}

type Modifier

type Modifier struct {
	ID       string                `json:"-"`
	Role     constant.ModifierRole `json:"role" example:"USER"`
	FullName string                `json:"fullName" example:"USER"`
}

type Subject

type Subject struct {
	ID          string
	RefID       int64
	Role        int64
	FullName    string
	SubjectType constant.SubjectType
	SessionXID  string
	Version     int64
	Metadata    map[string]string
}

type Version_Payload

type Version_Payload struct {
	Version int64 `json:"version" example:"1"`
}

Jump to

Keyboard shortcuts

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