repositories

package
v0.0.0-...-37a348f Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompanyRepository

type CompanyRepository struct {
	// contains filtered or unexported fields
}

func (*CompanyRepository) Create

func (r *CompanyRepository) Create(ctx context.Context, request dto.CreateCompanyRequest) (id string, err error)

func (*CompanyRepository) DeleteById

func (r *CompanyRepository) DeleteById(ctx context.Context, id string) error

func (*CompanyRepository) GetById

func (r *CompanyRepository) GetById(ctx context.Context, id string) (*dto.Company, error)

func (*CompanyRepository) UpdateById

func (r *CompanyRepository) UpdateById(ctx context.Context, request dto.UpdateCompanyRequest, id string) error

type CompanyRepositoryInterface

type CompanyRepositoryInterface interface {
	Create(ctx context.Context, request dto.CreateCompanyRequest) (string, error)
	GetById(ctx context.Context, id string) (*dto.Company, error)
	UpdateById(ctx context.Context, request dto.UpdateCompanyRequest, id string) error
	DeleteById(ctx context.Context, id string) error
}

func NewCompanyRepository

func NewCompanyRepository(db *pg.DB) CompanyRepositoryInterface

Jump to

Keyboard shortcuts

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