generated from mrz1836/go-template
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #519 from bitcoin-sv/BUX-685/SqlInjectionStatic
feat(bux-685): (Sql Injection) Added DestinationFilter struct, added filter parser
- Loading branch information
Showing
19 changed files
with
911 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package destinations | ||
|
||
import ( | ||
"github.com/bitcoin-sv/spv-wallet/engine" | ||
"github.com/bitcoin-sv/spv-wallet/engine/datastore" | ||
"github.com/bitcoin-sv/spv-wallet/models/filter" | ||
) | ||
|
||
// SearchRequestDestinationParameters is a struct for handling request parameters for search requests | ||
type SearchRequestDestinationParameters struct { | ||
// Custom conditions used for filtering the search results | ||
Conditions filter.DestinationFilter `json:"conditions"` | ||
// Accepts a JSON object for embedding custom metadata, enabling arbitrary additional information to be associated with the resource | ||
Metadata *engine.Metadata `json:"metadata,omitempty" swaggertype:"object,string" example:"key:value,key2:value2"` | ||
// Pagination and sorting options to streamline data exploration and analysis | ||
QueryParams *datastore.QueryParams `json:"params,omitempty" swaggertype:"object,string" example:"page:1,page_size:10,order_by_field:created_at,order_by_direction:desc"` | ||
} | ||
|
||
// CountRequestDestinationParameters is a struct for handling request parameters for count requests | ||
type CountRequestDestinationParameters struct { | ||
// Custom conditions used for filtering the search results | ||
Conditions map[string]interface{} `json:"conditions" swaggertype:"object,string" example:"testColumn:testValue"` | ||
// Accepts a JSON object for embedding custom metadata, enabling arbitrary additional information to be associated with the resource | ||
Metadata engine.Metadata `json:"metadata" swaggertype:"object,string" example:"key:value,key2:value2"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.