utils
Last updated: 2024-09-27 10:47:26.019519 File source: link on GitLab
utils
Table of Contents
Specification
Description
This package contains utility tools and functionalities used by other packages
Structure and Organisation
Here is quick overview of the contents of this directory:
README: Current file which is aimed towards developers who wish to use and modify the package functionality.
blockchain: This file contains methods and data types related to interaction with blockchain.
file_system: This file contains a method to retrieve the size of the volume.
init: This file initializes an Open Telemetry logger for this package. It also defines constants to reflect the status of transaction.
network: This file contains helper methods for DMS API calls and responses.
progress_io: This file defines wrapper functions for readers and writers with progress tracking capabilities.
syncmap: This file defines a
SyncMap
type which is a thread-safe version of the standard Gomap
with strongly-typed methods and functions for managing key-value pairs concurrently.utils: This file contains various utility functions for the DMS functionality.
validate: This contains helper functions that perform different kinds of validation checks and numeric conversions.
specs: This folder contains the class diagram for the package.
Files with *_test.go
naming contains unit tests of the specified functionality.
Class Diagram
Source File
Rendered from source file
Functionality
utils
package defines various helper methods for functionality defined in the different packages of DMS. Refer to utils.go for details.
Data Types
Blockchain data models
utils.UTXOs
:TBD
utils.TxHashResp
:TBD
utils.ClaimCardanoTokenBody
:TBD
utils.rewardRespToCPD
:TBD
utils.UpdateTxStatusBody
:TBD
progress_io data models
utils.IOProgress
:TBD
utils.Reader
:TBD
utils.Writer
:TBD
syncmap data models
utils.SyncMap
: a concurrency-safe sync.Map that uses strongly-typed method signatures to ensure the types of its stored data are known.
Testing
The unit tests for the functionality are defined in network_test.go
and utils_test.go
files.
Proposed Functionality / Requirements
List of issues related to the implementation of the utils
package can be found below. These include proposals for modifications to the package or new functionality needed to cover the requirements of other packages.
References
Last updated