Documentation ¶
Index ¶
- Variables
- type PropertyFilter
- type PropertyManager
- func (uc PropertyManager) Get(ctx context.Context, id string) (entity.Property, error)
- func (uc PropertyManager) List(ctx context.Context, f PropertyFilter) ([]entity.Property, error)
- func (uc PropertyManager) Remove(ctx context.Context, id string) error
- func (uc PropertyManager) Search(ctx context.Context, substr string) ([]entity.Property, error)
- func (uc PropertyManager) Store(ctx context.Context, p entity.Property) error
- func (uc PropertyManager) Validate() error
- type PropertyReader
- type PropertyRepo
- type PropertyWriter
- type TenantManager
- func (uc TenantManager) Get(ctx context.Context, id entity.ID) (*entity.Tenant, error)
- func (uc TenantManager) List(ctx context.Context, filter ...filters.TenantFilter) ([]entity.Tenant, error)
- func (uc TenantManager) Store(ctx context.Context, tenant entity.Tenant) (*entity.Tenant, error)
- func (uc TenantManager) Validate() error
- type TenantRepo
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrRepoNotSet = errors.New("use case repo is required") ErrRepo = errors.New("error from repository") )
View Source
var AllProperties = PropertyFilter{}
Functions ¶
This section is empty.
Types ¶
type PropertyFilter ¶
type PropertyFilter struct {
Search string
}
PropertyReader allows queries regarding properties
func NewPropertyFilter ¶
func NewPropertyFilter() PropertyFilter
func (PropertyFilter) WithSearch ¶
func (f PropertyFilter) WithSearch(s string) PropertyFilter
type PropertyManager ¶
type PropertyManager struct {
// contains filtered or unexported fields
}
PropertyReader allows queries regarding properties
func NewPropertyManager ¶
func NewPropertyManager(repo PropertyRepo) PropertyManager
func (PropertyManager) List ¶
func (uc PropertyManager) List(ctx context.Context, f PropertyFilter) ([]entity.Property, error)
func (PropertyManager) Remove ¶
func (uc PropertyManager) Remove(ctx context.Context, id string) error
func (PropertyManager) Validate ¶
func (uc PropertyManager) Validate() error
type PropertyReader ¶
type PropertyReader interface { GetProperty(ctx context.Context, id string) (entity.Property, error) PropertyList(ctx context.Context, filter PropertyFilter) ([]entity.Property, error) }
PropertyReader allows queries regarding properties
type PropertyRepo ¶
type PropertyRepo interface { PropertyReader PropertyWriter }
PropertyReader allows queries regarding properties
type PropertyWriter ¶
type PropertyWriter interface { NewProperty(street, city, state, zip string) entity.Property StoreProperty(context.Context, entity.Property) error DeleteProperty(ctx context.Context, id string) error }
PropertyReader allows queries regarding properties
type TenantManager ¶
type TenantManager struct {
// contains filtered or unexported fields
}
func NewTenantManager ¶
func NewTenantManager(repo TenantRepo) TenantManager
func (TenantManager) List ¶
func (uc TenantManager) List(ctx context.Context, filter ...filters.TenantFilter) ([]entity.Tenant, error)
func (TenantManager) Validate ¶
func (uc TenantManager) Validate() error
Click to show internal directories.
Click to hide internal directories.