actions

package
v1.0.0-beta.3 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBadTxConfig = errors.New("bad transaction config supplied")

ErrBadTxConfig is when the transaction config specified is not valid

View Source
var ErrTxConfigNotFound = errors.New("transaction config not found")

ErrTxConfigNotFound is when the transaction config is not found in request body

View Source
var ErrXpubNotFound = errors.New("xpub not found")

ErrXpubNotFound is when the xpub is not found (in Auth Header)

Functions

func GetCountQueryParameters added in v0.21.0

func GetCountQueryParameters(c *gin.Context) (*engine.Metadata, *map[string]interface{}, error)

GetCountQueryParameters get all filtering parameters related to the db query

func GetSearchQueryParameters added in v0.21.0

func GetSearchQueryParameters(c *gin.Context) (*datastore.QueryParams, *engine.Metadata, *map[string]interface{}, error)

GetSearchQueryParameters get all filtering parameters related to the db query

func MethodNotAllowed

func MethodNotAllowed(c *gin.Context)

MethodNotAllowed handles all 405 requests

func NotFound

func NotFound(c *gin.Context)

NotFound handles all 404 requests

func StatusOK added in v0.16.0

func StatusOK(c *gin.Context)

StatusOK is a basic response which sets the status to 200

Types

type Action

type Action struct {
	AppConfig *config.AppConfig
	Services  *config.AppServices
}

Action is the configuration for the actions and related services

type CountRequestParameters added in v0.21.0

type CountRequestParameters 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"`
}

CountRequestParameters is a struct for handling request parameters for count requests

type SearchRequestParameters added in v0.21.0

type SearchRequestParameters 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"`
	// Pagination and sorting options to streamline data exploration and analysis
	QueryParams datastore.QueryParams `json:"params" swaggertype:"object,string" example:"page:1,page_size:10,order_by_field:created_at,order_by_direction:desc"`
}

SearchRequestParameters is a struct for handling request parameters for search requests

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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