db

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewUserRepository

func NewUserRepository(cfg conf.Persistence) (user.Repository, error)

Types

type Database

type Database interface {
	DB() *gorm.DB
}

type SocialAccount

type SocialAccount struct {
	UserID   string        `gorm:"primaryKey"`
	SocialID user.SocialID `gorm:"primaryKey"`
	Provider user.SocialProvider
	model.DataModel
}

func NewSocialAccount

func NewSocialAccount(a *user.SocialAccount, u *user.User) *SocialAccount

type User

type User struct {
	ID       string `gorm:"primaryKey"`
	Username string
	Name     string
	Email    string
	Status   user.Status
	Accounts []*SocialAccount
	model.DataModel
}

func NewUser

func NewUser(u *user.User) *User

Jump to

Keyboard shortcuts

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