dto

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2024 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 CreateMessage

type CreateMessage struct {
	Type string `json:"type" binding:"required,min=2,max=50"`
	Msg  string `json:"msg" binding:"required,min=0,max=2000"`
}

func EmptyCreateMessage

func EmptyCreateMessage() *CreateMessage

func (*CreateMessage) GetValue

func (d *CreateMessage) GetValue() *CreateMessage

func (*CreateMessage) ValidateErrors

func (d *CreateMessage) ValidateErrors(errs validator.ValidationErrors) ([]string, error)

type InfoMessage

type InfoMessage struct {
	ID        primitive.ObjectID `json:"_id" binding:"required"`
	Type      string             `json:"type" binding:"required"`
	Msg       string             `json:"msg" binding:"required"`
	CreatedAt time.Time          `json:"createdAt" binding:"required"`
}

func EmptyInfoMessage

func EmptyInfoMessage() *InfoMessage

func (*InfoMessage) GetValue

func (d *InfoMessage) GetValue() *InfoMessage

func (*InfoMessage) ValidateErrors

func (d *InfoMessage) ValidateErrors(errs validator.ValidationErrors) ([]string, error)

Jump to

Keyboard shortcuts

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