database

package
v0.0.0-...-a45a6ee Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package database contains an repository of database schema ” Auto-generated at Fri, 12 Apr 2019 13:09:42 CEST

Index

Constants

This section is empty.

Variables

Schema represents the database schema

Functions

func Open

func Open(url string) (*orm.Gateway, error)

Open opens the connection

Types

type UserRepository

type UserRepository struct {
	// Gateway connects the repository to the underlying database
	Gateway *orm.Gateway
}

UserRepository represents a repository for 'users'

func (*UserRepository) AllUsers

func (r *UserRepository) AllUsers(ctx context.Context) ([]*ent.User, error)

AllUsers returns all User from the database

func (*UserRepository) InsertUser

func (r *UserRepository) InsertUser(ctx context.Context, entity *ent.User) error

InsertUser inserts a record of type User into the database

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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