Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataGetErrorCodes ¶
type DataGetErrorCodes int
var ( // DataGetErrorCodes_FilePathInvalid error code for invalid file path was provided DataGetErrorCodes_FilePathInvalid DataGetErrorCodes = 1 // DataGetErrorCodes_FileFormatNotSupported error code for file format not supported DataGetErrorCodes_FileFormatNotSupported DataGetErrorCodes = 2 // DataGetErrorCodes_CouldNotGetData error code for could not get data by provided key DataGetErrorCodes_CouldNotGetData DataGetErrorCodes = 3 )
type DataGetUsecase ¶
type DataGetUsecase interface { // Run gets data from file by provided data key // Returns data value or [error_utils.ErrorWithCode[DataGetErrorCodes]] if error occurred Run(ctx context.Context, filePath string, dataKey string, fileFormat pb.FileFormat) (string, error_utils.ErrorWithCode[DataGetErrorCodes]) }
DataGetUsecase usecase interface for getting data from file of specific format by provided data key
func NewDataGetUsecase ¶
func NewDataGetUsecase(fileDataReaderFactory file_data.FileDataRepositoryFactory) DataGetUsecase
NewDataGetUsecase creates new instance of DataSetUsecase
type DataSetErrorCodes ¶
type DataSetErrorCodes int
var ( // DataSetErrorCodes_FilePathInvalid error code for invalid file path was provided DataSetErrorCodes_FilePathInvalid DataSetErrorCodes = 1 // DataGetErrorCodes_FileFormatNotSupported error code for file format not supported DataSetErrorCodes_FileFormatNotSupported DataSetErrorCodes = 2 // DataGetErrorCodes_CouldNotGetData error code for could not get data by provided key DataSetErrorCodes_CouldNotSetData DataSetErrorCodes = 3 )
type DataSetUsecase ¶
type DataSetUsecase interface { // Run sets data to file by provided data key // Returns [error_utils.ErrorWithCode[DataSetErrorCodes]] if error occurred Run(ctx context.Context, filePath string, dataKey string, fileFormat pb.FileFormat, value string, valueType pb.DataSetValueType) error_utils.ErrorWithCode[DataSetErrorCodes] }
DataSetUsecase usecase interface for set data to file of specific format by provided data key
func NewDataSetUsecase ¶
func NewDataSetUsecase(fileDataRepoFactory file_data.FileDataRepositoryFactory) DataSetUsecase
NewDataSetUsecase creates new instance of DataSetUsecase
Click to show internal directories.
Click to hide internal directories.