coredto

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 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 MongoId

type MongoId struct {
	Id string             `uri:"id" binding:"required" validate:"required,len=24"`
	ID primitive.ObjectID `uri:"-" validate:"-"`
}

func EmptyMongoId

func EmptyMongoId() *MongoId

func (*MongoId) GetValue

func (d *MongoId) GetValue() *MongoId

func (*MongoId) ValidateErrors

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

type Pagination

type Pagination struct {
	Page  int64 `form:"page" binding:"required" validate:"required,min=1,max=1000"`
	Limit int64 `form:"limit" binding:"required" validate:"required,min=1,max=1000"`
}

func EmptyPagination

func EmptyPagination() *Pagination

func (*Pagination) GetValue

func (d *Pagination) GetValue() *Pagination

func (*Pagination) ValidateErrors

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

type Slug

type Slug struct {
	Slug string `uri:"slug" validate:"required,min=3,max=200"`
}

func EmptySlug

func EmptySlug() *Slug

func (*Slug) GetValue

func (d *Slug) GetValue() *Slug

func (*Slug) ValidateErrors

func (b *Slug) ValidateErrors(errs validator.ValidationErrors) ([]string, error)

Jump to

Keyboard shortcuts

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