Documentation ¶
Index ¶
- Variables
- type Block
- type Core
- func (c *Core) BatchCreate(ctx context.Context, cores []NewBlock) ([]Block, error)
- func (c *Core) Create(ctx context.Context, core NewBlock) (Block, error)
- func (c *Core) Delete(ctx context.Context, core Block) (Block, error)
- func (c *Core) DeleteByPropertyID(ctx context.Context, propertyID uuid.UUID) error
- func (c *Core) ExecuteUnderTransaction(tx transaction.Transaction) (*Core, error)
- func (c *Core) QueryByID(ctx context.Context, id uuid.UUID) (Block, error)
- func (c *Core) QueryByPropertyID(ctx context.Context, id uuid.UUID) ([]Block, error)
- func (c *Core) Update(ctx context.Context, o Block, n UpdateBlock) (Block, error)
- type NewBlock
- type Status
- type Storer
- type UpdateBlock
Constants ¶
This section is empty.
Variables ¶
View Source
var ( StatusActive = Status{"ACTIVE"} StatusDeleted = Status{"DELETED"} )
Set of possible status for a user.
View Source
var (
ErrNotFound = errors.New("block not found")
)
Functions ¶
This section is empty.
Types ¶
type Core ¶
type Core struct {
// contains filtered or unexported fields
}
func (*Core) BatchCreate ¶
func (*Core) DeleteByPropertyID ¶
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) QueryByPropertyID ¶
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 Block) error BatchCreate(ctx context.Context, cores []Block) error Update(ctx context.Context, core Block) error DeleteByPropertyID(ctx context.Context, id uuid.UUID) error QueryByID(ctx context.Context, id uuid.UUID) (Block, error) QueryByPropertyID(ctx context.Context, id uuid.UUID) ([]Block, error) ExecuteUnderTransaction(tx transaction.Transaction) (Storer, error) }
type UpdateBlock ¶
type UpdateBlock struct {
Name *string
}
Click to show internal directories.
Click to hide internal directories.