parsers

package
v0.0.0-...-9dfb24e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 24, 2024 License: MIT Imports: 8 Imported by: 0

README

UC-1: Parse metadata from URL

sequenceDiagram
  participant C as Client
  participant S as Service
  participant MetaStore as MetaStore
  participant HttpClient as HttpClient
  participant Notify as Notify

  C->>S: Request to parse metadata (URL)
  S->>MetaStore: Check if metadata exists
  MetaStore-->>S: Return metadata (if exists)
  alt Metadata not in store
    S->>HttpClient: Request URL
    HttpClient-->>S: Return HTML content
    S->>S: Parse HTML for metadata
    S->>MetaStore: Store new metadata
    MetaStore-->>S: Confirm storage
    S->>Notify: Publish event (METHOD_ADD)
    Notify-->>S: Confirm notification
  end
  S-->>C: Return metadata

Documentation

Overview

Metadata UC. Application layer

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UC

type UC struct {
	MetaStore *meta_store.MetaStore
}

func New

func New(store *meta_store.MetaStore) (*UC, error)

func (*UC) Get

func (r *UC) Get(ctx context.Context, hash string) (*v1.Meta, error)

func (*UC) Set

func (r *UC) Set(ctx context.Context, url string) (*v1.Meta, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL