common

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const PageSizeDefault = 20

Variables

This section is empty.

Functions

func IsEmailValid

func IsEmailValid(e string) (bool, error)

func IsGenderValid

func IsGenderValid(s string) bool

Types

type Condition

type Condition struct {
	Field string      `json:"field,omitempty" query:"field"`
	Value interface{} `json:"value,omitempty" query:"value"`
}

type Gender

type Gender string
const (
	Male   Gender = "male"
	Female Gender = "female"
	Other  Gender = "other"
)

func (Gender) IsValid

func (g Gender) IsValid() bool

func (Gender) ToString

func (g Gender) ToString() string

type Paginator

type Paginator struct {
	Page  int `json:"page,omitempty" query:"page"`
	Limit int `json:"limit,omitempty" query:"limit"`
}

func (*Paginator) Format

func (p *Paginator) Format()

Jump to

Keyboard shortcuts

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