Documentation ¶
Index ¶
- func Get(ctx context.Context, c *redis.Client, id, key string) interface{}
- func GetSafe(ctx context.Context, c *redis.Client, id, key string) (interface{}, error)
- func Remove(ctx context.Context, c *redis.Client, id, key string)
- func Store(ctx context.Context, c *redis.Client, id, key string, entity interface{})
- func StoreSafe(ctx context.Context, c *redis.Client, id, key string, entity interface{}) error
- type AuthorBuilder
- func (b *AuthorBuilder) Active(state string) *AuthorBuilder
- func (b *AuthorBuilder) And() *AuthorBuilder
- func (b *AuthorBuilder) Country(countryCode string) *AuthorBuilder
- func (b *AuthorBuilder) DisplayName(displayName string) *AuthorBuilder
- func (b *AuthorBuilder) Filter(key, op, id, state string) *AuthorBuilder
- func (b *AuthorBuilder) Limit(limit int) *AuthorBuilder
- func (b *AuthorBuilder) Or() *AuthorBuilder
- func (b *AuthorBuilder) OrderBy(key, def, param string) *AuthorBuilder
- func (b *AuthorBuilder) Owner(ownerID string) *AuthorBuilder
- func (b *AuthorBuilder) Ownership(ownershipType string) *AuthorBuilder
- func (b *AuthorBuilder) Query(query string) *AuthorBuilder
- func (b *AuthorBuilder) Raw(statement string) *AuthorBuilder
- type AuthorKafkaEventBus
- func (b *AuthorKafkaEventBus) HardRemoved(ctx context.Context, id string) error
- func (b *AuthorKafkaEventBus) Removed(ctx context.Context, id string) error
- func (b *AuthorKafkaEventBus) Restored(ctx context.Context, id string) error
- func (b *AuthorKafkaEventBus) StartCreate(ctx context.Context, author domain.Author) error
- func (b *AuthorKafkaEventBus) StartUpdate(ctx context.Context, author domain.Author, snapshot domain.Author) error
- func (b *AuthorKafkaEventBus) Updated(ctx context.Context, author domain.Author) error
- type AuthorPQRepository
- func (r *AuthorPQRepository) ChangeState(ctx context.Context, id, state string) error
- func (r *AuthorPQRepository) Fetch(ctx context.Context, params core.PaginationParams, ...) ([]*domain.Author, error)
- func (r *AuthorPQRepository) FetchByID(ctx context.Context, id string, showDisabled bool) (*domain.Author, error)
- func (r *AuthorPQRepository) HardRemove(ctx context.Context, id string) error
- func (r *AuthorPQRepository) Remove(ctx context.Context, id string) error
- func (r *AuthorPQRepository) Replace(ctx context.Context, author domain.Author) error
- func (r *AuthorPQRepository) Restore(ctx context.Context, id string) error
- func (r *AuthorPQRepository) Save(ctx context.Context, author domain.Author) error
- func (r *AuthorPQRepository) SaveRaw(ctx context.Context, author domain.Author) error
- type AuthorSAGAKafkaEventBus
- func (e *AuthorSAGAKafkaEventBus) BlobFailed(ctx context.Context, msg string) error
- func (e *AuthorSAGAKafkaEventBus) Created(ctx context.Context, author domain.Author) error
- func (e *AuthorSAGAKafkaEventBus) Failed(ctx context.Context, service, msg string) error
- func (e *AuthorSAGAKafkaEventBus) Verified(ctx context.Context, service string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Get ¶
Get returns an entity from redis store using the write-through pattern, ignores errors (recommended for optional cache)
Types ¶
type AuthorBuilder ¶
type AuthorBuilder struct {
Statement string
}
func (*AuthorBuilder) Active ¶
func (b *AuthorBuilder) Active(state string) *AuthorBuilder
Active return a query to search by entity's state
func (*AuthorBuilder) And ¶
func (b *AuthorBuilder) And() *AuthorBuilder
And returns a query with the AND statement
func (*AuthorBuilder) Country ¶
func (b *AuthorBuilder) Country(countryCode string) *AuthorBuilder
func (*AuthorBuilder) DisplayName ¶
func (b *AuthorBuilder) DisplayName(displayName string) *AuthorBuilder
DisplayName returns a query to search by display_name field
func (*AuthorBuilder) Filter ¶
func (b *AuthorBuilder) Filter(key, op, id, state string) *AuthorBuilder
Filter returns a query to filter useful fields like timestamp, id, or total_views
key = field, op = operator, id = entity external_id, state = is entity active
func (*AuthorBuilder) Limit ¶
func (b *AuthorBuilder) Limit(limit int) *AuthorBuilder
Limit returns a query with a limiter, useful for pagination
func (*AuthorBuilder) Or ¶
func (b *AuthorBuilder) Or() *AuthorBuilder
Or returns a query with the OR statement
func (*AuthorBuilder) OrderBy ¶
func (b *AuthorBuilder) OrderBy(key, def, param string) *AuthorBuilder
OrderBy returns a query for ordering
key = field, def = default order, param = sorting from params, will replace default value
func (*AuthorBuilder) Owner ¶
func (b *AuthorBuilder) Owner(ownerID string) *AuthorBuilder
Owner returns a query to search by owner from owner_pool
func (*AuthorBuilder) Ownership ¶
func (b *AuthorBuilder) Ownership(ownershipType string) *AuthorBuilder
Ownership returns a query to search by ownership_type field
func (*AuthorBuilder) Query ¶
func (b *AuthorBuilder) Query(query string) *AuthorBuilder
Query returns a query from most important fields
func (*AuthorBuilder) Raw ¶
func (b *AuthorBuilder) Raw(statement string) *AuthorBuilder
Raw returns a query with the raw SQL query
type AuthorKafkaEventBus ¶
type AuthorKafkaEventBus struct {
// contains filtered or unexported fields
}
func NewAuthorKafkaEventBus ¶
func NewAuthorKafkaEventBus(cfg *config.Kernel) *AuthorKafkaEventBus
func (*AuthorKafkaEventBus) HardRemoved ¶
func (b *AuthorKafkaEventBus) HardRemoved(ctx context.Context, id string) error
func (*AuthorKafkaEventBus) Removed ¶
func (b *AuthorKafkaEventBus) Removed(ctx context.Context, id string) error
func (*AuthorKafkaEventBus) Restored ¶
func (b *AuthorKafkaEventBus) Restored(ctx context.Context, id string) error
func (*AuthorKafkaEventBus) StartCreate ¶
func (*AuthorKafkaEventBus) StartUpdate ¶
type AuthorPQRepository ¶
type AuthorPQRepository struct {
// contains filtered or unexported fields
}
AuthorPQRepository DBMS Author repository
func NewAuthorPQRepository ¶
func NewAuthorPQRepository(dbPool *sql.DB, memPool *redis.Client, logger log.Logger) *AuthorPQRepository
NewAuthorPQRepository Create an author repository
func (*AuthorPQRepository) ChangeState ¶
func (r *AuthorPQRepository) ChangeState(ctx context.Context, id, state string) error
func (*AuthorPQRepository) Fetch ¶
func (r *AuthorPQRepository) Fetch(ctx context.Context, params core.PaginationParams, filterParams core.FilterParams) ([]*domain.Author, error)
func (*AuthorPQRepository) HardRemove ¶
func (r *AuthorPQRepository) HardRemove(ctx context.Context, id string) error
func (*AuthorPQRepository) Remove ¶
func (r *AuthorPQRepository) Remove(ctx context.Context, id string) error
func (*AuthorPQRepository) Restore ¶
func (r *AuthorPQRepository) Restore(ctx context.Context, id string) error
type AuthorSAGAKafkaEventBus ¶
type AuthorSAGAKafkaEventBus struct {
// contains filtered or unexported fields
}
func NewAuthorSAGAKafkaEventBus ¶
func NewAuthorSAGAKafkaEventBus(cfg *config.Kernel) *AuthorSAGAKafkaEventBus
func (*AuthorSAGAKafkaEventBus) BlobFailed ¶
func (e *AuthorSAGAKafkaEventBus) BlobFailed(ctx context.Context, msg string) error