postgres

package
v0.0.0-...-d0e7b85 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewUserRepository

func NewUserRepository(db *gorm.DB) accounts.UserRepository

NewUserRepository Returns new instance of userRepository

Types

type UserDB

type UserDB struct {
	gorm.Model
	ID       string `gorm:"primaryKey;uniqueIndex;not null;<-:create"`
	Email    string `gorm:"size:255;uniqueIndex;not null"`
	Password []byte `gorm:"size:255;unique;not null" json:"-"`
	Metadata []byte
}

UserDB defines user structure as Gorm model representation

func (UserDB) TableName

func (UserDB) TableName() string

TableName tells gorm to set UserDB table name

Jump to

Keyboard shortcuts

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