Documentation
¶
Index ¶
- type Entity
- type Service
- func (s *Service) Activate(ctx context.Context, code string) error
- func (s *Service) Deactivate(ctx context.Context, code string) error
- func (s *Service) Get(ctx context.Context, code string) (*money.Currency, error)
- func (s *Service) GetDefault(ctx context.Context) (*money.Currency, error)
- func (s *Service) GetStatistics(ctx context.Context) (map[string]any, error)
- func (s *Service) IsSupported(ctx context.Context, code string) bool
- func (s *Service) ListAll(ctx context.Context) ([]*money.Currency, error)
- func (s *Service) ListSupported(ctx context.Context) ([]string, error)
- func (s *Service) Register(ctx context.Context, meta Entity) error
- func (s *Service) Search(ctx context.Context, query string) ([]*money.Currency, error)
- func (s *Service) SearchByRegion(ctx context.Context, region string) ([]*money.Currency, error)
- func (s *Service) Unregister(ctx context.Context, code string) error
- func (s *Service) ValidateCode(ctx context.Context, code string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides business logic for currency operations
func (*Service) Deactivate ¶ added in v1.3.0
Deactivate deactivates a currency
func (*Service) GetDefault ¶ added in v1.3.0
GetDefault returns the default currency information
func (*Service) GetStatistics ¶ added in v1.3.0
GetStatistics returns currency statistics
func (*Service) IsSupported ¶ added in v1.3.0
IsSupported checks if a currency is both registered and active
func (*Service) ListAll ¶ added in v1.3.0
ListAll returns all registered currencies with full metadata
func (*Service) ListSupported ¶ added in v1.3.0
ListSupported returns all supported currency codes
func (*Service) SearchByRegion ¶ added in v1.3.0
SearchByRegion searches for currencies by region
func (*Service) Unregister ¶ added in v1.3.0
Unregister removes a currency from the registry
Click to show internal directories.
Click to hide internal directories.