dto

package
v1.0.14 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MissingFieldError

func MissingFieldError(missingField string) error

Types

type InsertCategory

type InsertCategory struct {
	Titulo string `json:"titulo" example:"Example video"`
	Cor    string `json:"cor" example:"blue"`
}

InsertCategory represents the DTO of a new or an updating category

func (*InsertCategory) ConvertToCategory

func (category *InsertCategory) ConvertToCategory() models.Category

func (*InsertCategory) Validate

func (category *InsertCategory) Validate() error

type InsertVideo

type InsertVideo struct {
	Titulo     string             `json:"titulo" example:"Example video"`
	Descricao  string             `json:"descricao" example:"Example description"`
	Url        string             `json:"url" example:"https://www.example-url.com"`
	CategoryID primitive.ObjectID `json:"categoriaID" example:"000000000000000000000000"`
}

InsertVideo represents the DTO of a new or an updating video

func (*InsertVideo) ConvertToVideo

func (video *InsertVideo) ConvertToVideo() models.Video

func (*InsertVideo) Validate

func (video *InsertVideo) Validate() error

Jump to

Keyboard shortcuts

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