entity

package
v0.0.0-...-9a2df54 Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFoundInDB = errors.New("no result found")

Functions

func IsErrNotFound

func IsErrNotFound(err error) error

Types

type IRepository

type IRepository interface {
	GetUsers(ctx context.Context) ([]*User, error)
}

type ProfileRequest

type ProfileRequest struct {
	Name  string `validate:"required|min_len:7" conform:"trim"`
	Email string `validate:"email"  message:"email is invalid." label:"User Email"`
	Phone string `validate:"required|isE164PhoneNumber"  label:"User Phone"`
	Age   int    `validate:"required|int|min:1|max:99"`
}

GooKit flags

type Stock

type Stock struct {
	Symbol string
	Price  int
}

type User

type User struct {
	bun.BaseModel `bun:"table:users,alias:u"`
	ID            string    `json:"id" bun:",pk"`
	Email         *string   `json:"email" bun:",unique"`
	Phone         *string   `json:"phoneNumber" bun:",unique"`
	FullName      *string   `json:"fullName" `
	IsActive      bool      `json:"isActive"`
	CreatedAt     time.Time `json:"createdAt"`
	UpdatedAt     time.Time `json:"updatedAt"`
}

Jump to

Keyboard shortcuts

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