Documentation ¶
Overview ¶
Link UC. Application layer
Index ¶
- Variables
- func NewLinkHistogramObserve(ctx context.Context)
- type NotFoundByHash
- type UC
- func (uc *UC) Add(ctx context.Context, in *domain.Link) (*domain.Link, error)
- func (uc *UC) Delete(ctx context.Context, hash string) (*domain.Link, error)
- func (uc *UC) Get(ctx context.Context, hash string) (*domain.Link, error)
- func (uc *UC) List(ctx context.Context, filter *types.FilterLink, cursor string, limit uint32) (*domain.Links, *string, error)
- func (uc *UC) Update(ctx context.Context, in *domain.Link) (*domain.Link, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCreateLink = errors.New("error create a new link")
Functions ¶
func NewLinkHistogramObserve ¶
Types ¶
type NotFoundByHash ¶
type NotFoundByHash struct {
Hash string
}
NotFoundByHash is an error when the link is not found by hash
func (NotFoundByHash) Error ¶
func (e NotFoundByHash) Error() string
type UC ¶
type UC struct { // Observer interface for subscribe on system event notify.Subscriber[domain.Link] // contains filtered or unexported fields }
func (*UC) Add ¶
Add - create a new link
Saga: 1. Save to store 2. Add permission 3. Get metadata 4. Publish event
Click to show internal directories.
Click to hide internal directories.