Documentation ¶
Index ¶
- type GopherRepository
- func (r *GopherRepository) Create(ctx context.Context, gopher *model.Gopher) error
- func (r *GopherRepository) Delete(ctx context.Context, gopher *model.Gopher) error
- func (r *GopherRepository) Find(ctx context.Context, id int) (*model.Gopher, error)
- func (r *GopherRepository) FindAll(ctx context.Context) ([]model.Gopher, error)
- func (r *GopherRepository) Update(ctx context.Context, gopher *model.Gopher, update *model.Gopher) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GopherRepository ¶
type GopherRepository struct {
// contains filtered or unexported fields
}
GopherRepository is the repository to handle the model.Gopher model database interactions.
func NewGopherRepository ¶
func NewGopherRepository(db *gorm.DB) *GopherRepository
NewGopherRepository returns a new GopherRepository.
func (*GopherRepository) Create ¶
Create creates a new model.Gopher.
func (*GopherRepository) Delete ¶
Delete deletes an existing model.Gopher.
func (*GopherRepository) Find ¶
Find finds a model.Gopher by id.
func (*GopherRepository) FindAll ¶
FindAll finds all model.Gopher.
Click to show internal directories.
Click to hide internal directories.