models

package
v0.0.0-...-f894a38 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type News

type News struct {
	Object    string `json:"object"`
	Name      string `json:"name"`
	Message   string `json:"message"`
	Timestamp int64  `json:"ts"`
}

type NullInt32

type NullInt32 struct {
	sql.NullInt32
}

func (*NullInt32) MarshalJSON

func (t *NullInt32) MarshalJSON() ([]byte, error)

func (*NullInt32) UnmarshalJSON

func (t *NullInt32) UnmarshalJSON(b []byte) error

type NullString

type NullString struct {
	sql.NullString
}

func (NullString) MarshalJSON

func (t NullString) MarshalJSON() ([]byte, error)

func (*NullString) UnmarshalJSON

func (t *NullString) UnmarshalJSON(data []byte) error

type PassChange

type PassChange struct {
	Password        string
	PasswordConfirm string
}

func (*PassChange) Validate

func (p *PassChange) Validate() error

type User

type User struct {
	Id           int64      `json:"id"`
	Username     string     `json:"username"`
	FirstName    NullString `json:"firstName"`
	LastName     NullString `json:"lastName"`
	Age          NullInt32  `json:"age"`
	Gender       string     `json:"gender"`
	City         NullString `json:"city"`
	Interests    NullString `json:"interests"`
	PasswordHash []byte     `json:"-"`
	IsFriend     bool       `json:"isFriend,omitempty"`
	CreatedAt    time.Time  `json:"createdAt"`
}

func (*User) Sanitize

func (u *User) Sanitize()

func (*User) SetPassword

func (u *User) SetPassword(password string) error

func (*User) Validate

func (u *User) Validate() error

type UserList

type UserList struct {
	Object string `json:"object"`
}

Jump to

Keyboard shortcuts

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