Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Model ¶
type Model struct { ID int `json:"id" bson:"_id"` Username string `json:"username" bson:"username"` PasswordHash string `json:"passwordHash" bson:"password_hash"` }
Model is the model of user
type Repository ¶
type Repository interface { Migrate() error FindByID(context.Context, int, *Model) error FindByUsername(context.Context, string, *Model) error }
func NewMongoRepository ¶
func NewMongoRepository(client *mongo.Client) Repository
func NewPostgresRepository ¶
func NewPostgresRepository(db *pgxpool.Pool) Repository
Click to show internal directories.
Click to hide internal directories.