repository

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FriendRepository

type FriendRepository struct {
	DB *sql.DB
}

FriendRepository is repository for providing and modifying friends data

func (*FriendRepository) Create

func (r *FriendRepository) Create(friend *entity.Friend) (*entity.Friend, error)

Create inserts a row of friend data to friends table

func (*FriendRepository) Delete

func (r *FriendRepository) Delete(id int64) error

Delete deletes a row of friend data from friends table

func (*FriendRepository) FindAll

func (r *FriendRepository) FindAll() ([]*entity.Friend, error)

FindAll retrieves all friends data

func (*FriendRepository) Update

func (r *FriendRepository) Update(friend *entity.Friend) (*entity.Friend, error)

Update updates a row of friend data from friends table

Jump to

Keyboard shortcuts

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