Documentation
¶
Index ¶
- Variables
- type Contact
- type Contacts
- type User
- type UserProfile
- type UserProfiles
- type Users
- type Widget
- func (w *Widget) AfterCreate(tx *pop.Connection) error
- func (w Widget) String() string
- func (w *Widget) Validate(tx *pop.Connection) (*validate.Errors, error)
- func (w *Widget) ValidateCreate(tx *pop.Connection) (*validate.Errors, error)
- func (w *Widget) ValidateUpdate(tx *pop.Connection) (*validate.Errors, error)
- type Widgets
Constants ¶
This section is empty.
Variables ¶
var DB *pop.Connection
DB is a connection to your database to be used throughout your application.
Functions ¶
This section is empty.
Types ¶
type Contact ¶
type Contact struct { ID uuid.UUID `json:"id" db:"id"` CreatedAt time.Time `json:"created_at" db:"created_at"` UpdatedAt time.Time `json:"updated_at" db:"updated_at"` Name string `json:"name" db:"name"` Email string `json:"email" db:"email"` Description string `json:"description" db:"description"` }
Contact is orm for database contacts
func (*Contact) Validate ¶
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 (*Contact) ValidateCreate ¶
ValidateCreate gets run every time you call "pop.ValidateAndCreate" method. This method is not required and may be deleted.
func (*Contact) ValidateUpdate ¶
ValidateUpdate gets run every time you call "pop.ValidateAndUpdate" method. This method is not required and may be deleted.
type User ¶
type User struct { ID uuid.UUID `json:"id" db:"id"` CreatedAt time.Time `json:"created_at" db:"created_at"` UpdatedAt time.Time `json:"updated_at" db:"updated_at"` Name string `json:"name" db:"name"` Email nulls.String `json:"email" db:"email"` Gender nulls.String `json:"gender" db:"gender"` //TODO: string vs nulls.String Location nulls.String `json:"location" db:"location"` Website nulls.String `json:"website" db:"website"` Gravatar nulls.String `json:"gravatar" db:"gravatar"` Provider string `json:"provider" db:"provider"` ProviderID string `json:"provider_id" db:"provider_id"` }
User is orm model for databse user
func (*User) Validate ¶
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 ¶
ValidateCreate gets run every time you call "pop.ValidateAndCreate" method. This method is not required and may be deleted.
func (*User) ValidateUpdate ¶
ValidateUpdate gets run every time you call "pop.ValidateAndUpdate" method. This method is not required and may be deleted.
type UserProfile ¶
type UserProfile struct { ID uuid.UUID `json:"id" db:"id"` Name string `json:"name" db:"name"` CreatedAt time.Time `json:"created_at" db:"created_at"` UpdatedAt time.Time `json:"updated_at" db:"updated_at"` Provider string `json:"provider" db:"provider"` ProviderID string `json:"provider_id" db:"provider_id"` Email nulls.String `json:"email" db:"email"` Data string `json:"data" db:"data"` UserID uuid.UUID `json:"user_id" db:"user_id"` }
UserProfile is orm for database user profile saves profile per login provider like facebook, github etc
func (UserProfile) String ¶
func (u UserProfile) String() string
String is not required by pop and may be deleted
func (*UserProfile) Validate ¶
func (u *UserProfile) 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 (*UserProfile) ValidateCreate ¶
func (u *UserProfile) 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 (*UserProfile) ValidateUpdate ¶
func (u *UserProfile) 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 UserProfiles ¶
type UserProfiles []UserProfile
UserProfiles is not required by pop and may be deleted
func (UserProfiles) String ¶
func (u UserProfiles) String() string
String is not required by pop and may be deleted
type Widget ¶
type Widget struct { ID uuid.UUID `json:"id" db:"id"` CreatedAt time.Time `json:"created_at" db:"created_at"` UpdatedAt time.Time `json:"updated_at" db:"updated_at"` Name string `json:"name" db:"name"` Uploadfile binding.File `db:"-" form:"someFile"` }
Widget is orm for widgets
func (*Widget) AfterCreate ¶
func (w *Widget) AfterCreate(tx *pop.Connection) error
AfterCreate gets run every time after you save widget to database
func (*Widget) Validate ¶
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 (*Widget) ValidateCreate ¶
ValidateCreate gets run every time you call "pop.ValidateAndCreate" method. This method is not required and may be deleted.
func (*Widget) ValidateUpdate ¶
ValidateUpdate gets run every time you call "pop.ValidateAndUpdate" method. This method is not required and may be deleted.