Documentation
¶
Index ¶
- type ObjectService
- func (a *ObjectService) Delete(ctx context.Context, key string) (err error)
- func (a *ObjectService) Get(ctx context.Context, key string) (value string, err error)
- func (a *ObjectService) Put(ctx context.Context, key, value string) (err error)
- func (a *ObjectService) Setup() (err error)
- func (a *ObjectService) Teardown()
- func (a *ObjectService) WithPort(port ports.ObjectPort[string, string]) *ObjectService
- func (a *ObjectService) WithTransactionalLogger(logger consistency.Logger[string, string]) *ObjectService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ObjectService ¶
type ObjectService struct {
// contains filtered or unexported fields
}
func NewObjectService ¶
func NewObjectService(cfg *config.Config) *ObjectService
NewObjectService creates a new instance of ObjectService without any dependencies.
func (*ObjectService) Delete ¶
func (a *ObjectService) Delete(ctx context.Context, key string) (err error)
Delete removes an object identified by the key from the port and logs the operation.
func (*ObjectService) Put ¶
func (a *ObjectService) Put(ctx context.Context, key, value string) (err error)
Put adds or updates an object identified by the key and logs the operation.
func (*ObjectService) Setup ¶
func (a *ObjectService) Setup() (err error)
Setup initializes the ObjectService by processing pending events from the transactional logger and applying them to the data store.
func (*ObjectService) Teardown ¶
func (a *ObjectService) Teardown()
Teardown cleans up any resources used by the ObjectService.
func (*ObjectService) WithPort ¶
func (a *ObjectService) WithPort(port ports.ObjectPort[string, string]) *ObjectService
WithPort sets the ObjectPort for the service and returns the updated service.
func (*ObjectService) WithTransactionalLogger ¶
func (a *ObjectService) WithTransactionalLogger(logger consistency.Logger[string, string]) *ObjectService
WithTransactionalLogger sets the transactional logger for the service and returns the updated service.
Click to show internal directories.
Click to hide internal directories.