Documentation
¶
Index ¶
- Variables
- type Core
- func (c *Core) Create(ctx context.Context, core NewProperty) (Property, error)
- func (c *Core) Delete(ctx context.Context, core Property) (Property, error)
- func (c *Core) ExecuteUnderTransaction(tx transaction.Transaction) (*Core, error)
- func (c *Core) QueryByID(ctx context.Context, id uuid.UUID) (Property, error)
- func (c *Core) QueryByManagerID(ctx context.Context, managerID uuid.UUID) ([]Property, error)
- func (c *Core) Update(ctx context.Context, o Property, n UpdateProperty) (Property, error)
- type NewProperty
- type Property
- type Status
- type Storer
- type UpdateProperty
- type UpdatePropertyStatus
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = errors.New("property not found") ErrLimitExceeded = errors.New("max number of properties exceeded") )
View Source
var ( StatusCreated = Status{"CREATED"} StatusActive = Status{"ACTIVE"} StatusDeleted = Status{"DELETED"} )
Set of possible status for a user.
Functions ¶
This section is empty.
Types ¶
type Core ¶
type Core struct {
// contains filtered or unexported fields
}
func (*Core) ExecuteUnderTransaction ¶
func (c *Core) ExecuteUnderTransaction(tx transaction.Transaction) (*Core, error)
ExecuteUnderTransaction constructs a new Core value that will use the specified transaction in any store related calls.
func (*Core) QueryByManagerID ¶
type NewProperty ¶
type Status ¶
type Status struct {
// contains filtered or unexported fields
}
Status represents a user status in the system.
func MustParseStatus ¶
MustParseStatus parses the string value and returns a status if one exists. If an error occurs the function panics.
func ParseStatus ¶
ParseStatus parses the string value and returns a status if one exists.
func (*Status) MarshalText ¶
MarshalText implement the marshal interface for JSON conversions.
func (*Status) UnmarshalText ¶
UnmarshalText implement the unmarshal interface for JSON conversions.
type Storer ¶
type Storer interface { Create(ctx context.Context, core Property) error Update(ctx context.Context, core Property) error QueryByID(ctx context.Context, id uuid.UUID) (Property, error) QueryByManagerID(ctx context.Context, id uuid.UUID) ([]Property, error) ExecuteUnderTransaction(tx transaction.Transaction) (Storer, error) }
type UpdateProperty ¶
type UpdatePropertyStatus ¶
type UpdatePropertyStatus struct {
Status *Status
}
Click to show internal directories.
Click to hide internal directories.