dtos

package
v0.1.16 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2023 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindAndValidateDTO

func BindAndValidateDTO(c echo.Context, dto interface{}) error

Types

type BaseSessionDTO

type BaseSessionDTO struct {
	AppVersion string `json:"appVersion"`
	URL        string `json:"url" validate:"required"`
	Screen     string `json:"screen" validate:"required"`
	Referrer   string `json:"referrer" validate:"omitempty"`
	Language   string `json:"language" validate:"required"`
	Meta       string `json:"meta"`
}

type ChangePasswordDTO

type ChangePasswordDTO struct {
	CurrentPassword string `json:"currentPassword" validate:"required"`
	NewPassword     string `json:"newPassword" validate:"required"`
}

type CustomValidator

type CustomValidator struct {
	Validator *validator.Validate
}

func (*CustomValidator) Validate

func (cv *CustomValidator) Validate(i interface{}) error

type ErrorDTO

type ErrorDTO struct {
	Name    string `json:"name" validate:"required"`
	Message string `json:"message" validate:"required"`
	Stack   string `json:"stack" validate:"required"`
	Cause   string `json:"cause"`
}

type EventDTO

type EventDTO struct {
	Action string `json:"action" validate:"required"`
	Value  string `json:"value"`
}

type HTTPDTO

type HTTPDTO struct {
	Resource string `json:"resource" validate:"required"`
	Method   string `json:"method" validate:"required"`
	Headers  string `json:"headers" validate:"required"`
	Status   int    `json:"status"  validate:"required"`
	Body     string `json:"body"`
	Response string `json:"response"`
}

type IntervalData

type IntervalData struct {
	X string  `json:"x" validate:"required"`
	Y float64 `json:"y" validate:"required"`
}

type LoginDTO

type LoginDTO struct {
	Name     string `json:"name" validate:"required"`
	Password string `json:"password" validate:"required"`
}

type PageViewDTO

type PageViewDTO struct {
	URL string `json:"url" validate:"required"`
}

type PerformanceDTO

type PerformanceDTO struct {
	Name  string  `json:"name" validate:"required"`
	Value float64 `json:"value" validate:"omitempty"`
	URL   string  `json:"url" validate:"required"`
}

type SessionDTO

type SessionDTO struct {
	BaseSessionDTO
	UA string `json:"ua" validate:"required"`
	IP string `json:"ip" validate:"required"`
}

type SpanFilterDTO

type SpanFilterDTO struct {
	Start time.Time `query:"start" validate:"required"`
	End   time.Time `query:"end" validate:"required"`
}

type TimeIntervalSpanDTO

type TimeIntervalSpanDTO struct {
	SpanFilterDTO
	Unit tools.Unit `query:"unit" validate:"required"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳