domain

package
v0.0.0-...-edb595d Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const MaxLimit = 100

Variables

This section is empty.

Functions

func IsValidFipeCode

func IsValidFipeCode(fipeCode string) bool

IsValidFipeCode validates if the fipe code is in the correct format

func IsValidMonth

func IsValidMonth(month int) bool

func IsValidYear

func IsValidYear(year int) bool

func IsValidYearMonth

func IsValidYearMonth(year int, month int) bool

IsValidYearMonth validates if the year/month are in the future or with invalid values

Types

type OrderByClause

type OrderByClause struct {
	Column string
	IsDesc bool
}

type Pagination

type Pagination struct {
	Offset int
	Limit  int
}

type Vehicle

type Vehicle struct {
	Year           int    `validate:"required"`
	Month          int    `validate:"required"`
	FipeCode       string `validate:"required,validateFipeCode"`
	Brand          string
	Model          string
	YearModel      string
	Authentication string
	MeanValue      float32
}

func GetDomainVehiclesExamples

func GetDomainVehiclesExamples() []Vehicle

func (*Vehicle) Validate

func (v *Vehicle) Validate() error

Validate validates the vehicle struct

type WhereClause

type WhereClause struct {
	Column   string
	Operator string
	Value    interface{}
}

Directories

Path Synopsis
Package mock_ports is a generated GoMock package.
Package mock_ports is a generated GoMock package.

Jump to

Keyboard shortcuts

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