handlers

package
v0.0.0-...-1de268a Latest Latest
Warning

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

Go to latest
Published: May 9, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCompanies

func NewCompanies(c CompaniesRepo) *companies

NewCompanies returns a new companies handler with the given repository.

Types

type CompaniesRepo

type CompaniesRepo interface {
	Create(models.Company) (models.Company, error)
	GetAll(requests.CompanyPayload) ([]models.Company, error)
	Get(uint64) (models.Company, error)
	Delete(uint64) error
	Update(models.Company) error
}

CompaniesRepo repository defines functions used for companies manipulation.

type CompanyCtxKey

type CompanyCtxKey struct{}

CompanyCtxKey is a key used for the Company object in the context

type CompanyPayloadCtxKey

type CompanyPayloadCtxKey struct{}

CompanyPayloadCtxKey is a key used for the Company payload object in the context

Jump to

Keyboard shortcuts

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