dto

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProcessingError

type ProcessingError struct {
	//Here is string because of https://github.com/golang/go/issues/5161 - error marshals to {}
	Cause string `json:"cause"`

	Message string `json:"message"`
}

ProcessingError represents basic DTO to provide information about the error when the processing request contains a notification request

func NewProcessingError

func NewProcessingError(message string, err string) ProcessingError

func (*ProcessingError) Error

func (pe *ProcessingError) Error() string

type ScrapingResult

type ScrapingResult struct {
	IsNotifyUser bool

	ApiSpecDoc *apispecdoc.ApiSpecDoc
}

type UrlRequest

type UrlRequest struct {
	//File url to scrape data
	FileUrl string `json:"file_url"`

	//A flag is a notification required related to an error notification in case of an error
	//Notification is required when this is the request from the user and doesn't require it
	//if it is the request from the storage and update service.
	IsNotifyUser bool `json:"is_notify_user"`
}

UrlRequest represents listening request model

type UserNotification

type UserNotification struct {
	Error *ProcessingError `json:"error"`
}

UserNotification represents basic DTO notification to the user if requested Initially, it supposed to be simple - if err != nil => error happens, else all is ok

func NewUserNotification

func NewUserNotification(procErr *ProcessingError) UserNotification

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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