models

package
v0.0.0-...-080bd3b Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

DB is a connection to your database to be used throughout your application.

Functions

This section is empty.

Types

type User

type User struct {
	ID         uuid.UUID    `json:"id" db:"id"`
	Name       string       `json:"name" db:"name"`
	Email      nulls.String `json:"email" db:"email"`
	Provider   string       `json:"provider" db:"provider"`
	ProviderID string       `json:"provider_id" db:"provider_id"`
	CreatedAt  time.Time    `json:"created_at" db:"created_at"`
	UpdatedAt  time.Time    `json:"updated_at" db:"updated_at"`
}

User is used by pop to map your users database table to your go code.

func (User) String

func (u User) String() string

String is not required by pop and may be deleted

func (*User) Validate

func (u *User) Validate(tx *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method. This method is not required and may be deleted.

func (*User) ValidateCreate

func (u *User) ValidateCreate(tx *pop.Connection) (*validate.Errors, error)

ValidateCreate gets run every time you call "pop.ValidateAndCreate" method. This method is not required and may be deleted.

func (*User) ValidateUpdate

func (u *User) ValidateUpdate(tx *pop.Connection) (*validate.Errors, error)

ValidateUpdate gets run every time you call "pop.ValidateAndUpdate" method. This method is not required and may be deleted.

type Users

type Users []User

Users is not required by pop and may be deleted

func (Users) String

func (u Users) String() string

String is not required by pop and may be deleted

Jump to

Keyboard shortcuts

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