model

package
v0.0.0-...-6343e97 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Field

type Field string

Field is an enum providing valid fields for filtering.

const (
	// FieldFirstName represents the first name field.
	FieldFirstName Field = "first_name"
	// FieldLastName represents the last name field.
	FieldLastName Field = "last_name"
	// FieldNickname represents the nickname field.
	FieldNickname Field = "nickname"
	// FieldEmail represents the email field.
	FieldEmail Field = "email"
	// FieldCountry represents the country field.
	FieldCountry Field = "country"
)

type Filter

type Filter struct {
	MatchType MatchType `json:"match_type"`
	Field     Field     `json:"field"`
	Value     string    `json:"value"`
}

Filter is a struct representing a filter for finding users.

type MatchType

type MatchType string

MatchType is an enum providing valid matching mechanisms for filtering values.

const (
	// MatchTypeLike represents a LIKE match.
	MatchTypeLike MatchType = "ILIKE"
	// MatchTypeEqual represents an exact match.
	MatchTypeEqual MatchType = "="
)

type User

type User struct {
	ID        *string    `json:"id" db:"id"`
	FirstName *string    `json:"first_name" db:"first_name"`
	LastName  *string    `json:"last_name" db:"last_name"`
	Nickname  *string    `json:"nickname" db:"nickname"`
	Password  *string    `json:"password" db:"password"`
	Email     *string    `json:"email" db:"email"`
	Country   *string    `json:"country" db:"country"`
	CreatedAt *time.Time `json:"created_at" db:"created_at"`
	UpdatedAt *time.Time `json:"updated_at" db:"updated_at"`
}

User represents a person using our platform.

Jump to

Keyboard shortcuts

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