Documentation ¶
Index ¶
- func CreatePointRepo(conn *gorm.DB) point.Repository
- func ToListDomain(data []Point) (result []point.Domain)
- type Point
- type PointRepo
- func (rep *PointRepo) Create(ctx context.Context, pointC *point.Domain) (point.Domain, error)
- func (rep *PointRepo) Delete(ctx context.Context, id int) error
- func (rep *PointRepo) GetAll(ctx context.Context) ([]point.Domain, error)
- func (rep *PointRepo) GetByUserId(ctx context.Context, id int) (point.Domain, error)
- func (rep *PointRepo) Update(ctx context.Context, pointU point.Domain) (point.Domain, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreatePointRepo ¶
func CreatePointRepo(conn *gorm.DB) point.Repository
func ToListDomain ¶
Types ¶
type Point ¶
type Point struct { Id int `gorm:"primaryKey"` UserId int `gorm:"unique"` Point float64 CreatedAt time.Time UpdatedAt time.Time }
func FromDomain ¶
Click to show internal directories.
Click to hide internal directories.