Documentation ¶
Index ¶
- type InMemory
- func (r InMemory) DeleteProperty(_ context.Context, id string) error
- func (r InMemory) GetProperty(_ context.Context, id string) (entity.Property, error)
- func (r InMemory) GetTenant(_ context.Context, id entity.ID) (*entity.Tenant, error)
- func (r InMemory) ListTenants(_ context.Context, _ ...filters.TenantFilter) ([]entity.Tenant, error)
- func (r InMemory) NewProperty(street, city, state, zip string) entity.Property
- func (r InMemory) PropertyList(_ context.Context, f usecase.PropertyFilter) ([]entity.Property, error)
- func (r InMemory) StoreProperty(_ context.Context, property entity.Property) error
- func (r InMemory) StoreTenant(_ context.Context, e entity.Tenant) error
- func (r InMemory) WithEntityErr(id string, err error) InMemory
- type Postgres
- func (r Postgres) DeleteProperty(ctx context.Context, id string) error
- func (r Postgres) GetProperty(ctx context.Context, id string) (entity.Property, error)
- func (r Postgres) GetTenant(ctx context.Context, id entity.ID) (*entity.Tenant, error)
- func (r Postgres) ListTenants(ctx context.Context, filter ...filters.TenantFilter) ([]entity.Tenant, error)
- func (r Postgres) NewProperty(street, city, state, zip string) entity.Property
- func (r Postgres) PropertyList(ctx context.Context, f usecase.PropertyFilter) ([]entity.Property, error)
- func (r Postgres) StoreProperty(ctx context.Context, property entity.Property) error
- func (r Postgres) StoreTenant(ctx context.Context, tenant entity.Tenant) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InMemory ¶
type InMemory struct {
// contains filtered or unexported fields
}
InMemory repository should NOT be used in production
func NewInMemoryRepo ¶
func NewInMemoryRepo() InMemory
NewInMemoryRepo constructs an InMemory repository
func (InMemory) DeleteProperty ¶
func (InMemory) GetProperty ¶
func (InMemory) ListTenants ¶
func (InMemory) NewProperty ¶
func (InMemory) PropertyList ¶
func (InMemory) StoreProperty ¶
func (InMemory) StoreTenant ¶
type Postgres ¶
type Postgres struct {
// contains filtered or unexported fields
}
Postgres repository should NOT be used in production
func NewPostgresRepo ¶
NewPostgresRepo constructs a Postgres repository
func (Postgres) DeleteProperty ¶
func (Postgres) GetProperty ¶
func (Postgres) ListTenants ¶
func (Postgres) NewProperty ¶
func (Postgres) PropertyList ¶
func (Postgres) StoreProperty ¶
Click to show internal directories.
Click to hide internal directories.