repository

package
v0.0.0-...-33c65be Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IRepository

type IRepository[T any] interface {
	GetAll() ([]T, error)
	Create(t T) error
	GetById(id string) (T, error)
	Delete(id string) error
}

type StudentRepository

type StudentRepository struct {
	Db *gorm.DB
}

func (StudentRepository) Create

func (r StudentRepository) Create(student models.Student) error

func (StudentRepository) Delete

func (r StudentRepository) Delete(id string) error

func (StudentRepository) GetAll

func (r StudentRepository) GetAll() ([]models.Student, error)

func (StudentRepository) GetById

func (r StudentRepository) GetById(id string) (models.Student, error)

Jump to

Keyboard shortcuts

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