types

package
v0.0.0-...-325dcee Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateAgeGT

func ValidateAgeGT(fl validator.FieldLevel) bool

Types

type ApiError

type ApiError struct {
	Param   string `json:"param"`
	Message string `json:"message"`
}

ApiError represents an API error containing parameter and message details.

func ConstructErrorMeesages

func ConstructErrorMeesages(err error) []ApiError

type CreateUserRequest

type CreateUserRequest struct {
	UserId int64      `json:"userId"`
	Traits UserTraits `json:"traits"`
}

type NewUserRequest

type NewUserRequest struct {
	Name              string    `json:"name" validate:"required"`
	Email             string    `json:"email" validate:"email"`
	NewsletterConsent bool      `json:"newsletterConsent" validate:"boolean"`
	DOB               time.Time `json:"dob" validate:"age=16"`
}

func (*NewUserRequest) Validate

func (newUserReq *NewUserRequest) Validate() error

type UserGetResponse

type UserGetResponse struct {
	User *models.User `json:"user"`
	Org  *models.Org  `json:"org"`
}

type UserTraits

type UserTraits struct {
	Email             string `json:"email"`
	Name              string `json:"name"`
	NewsLetterConsent bool   `json:"newsletterConsent"`
}

Jump to

Keyboard shortcuts

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