Documentation ¶
Index ¶
- Constants
- Variables
- func BuildSchemaPathsList() []string
- func CheckEnvVariable(key string) string
- func Difference(a, b []string) []string
- func EnableLogging(enabled bool)
- func FindRoute(req *http.Request) (string, error)
- func GetRequestKeys(method string, path string, status int) ([]string, error)
- func JSONKeys(data map[string]interface{}) []string
- func RecurseRequestKeys(method string, path string, status int) ([]string, error)
- func RecurseResponseKeys(method string, path string, status int) ([]string, error)
- func ValidateRequest(method string, path string, params url.Values, body io.Reader) (*openapi3filter.RequestValidationInput, error)
- func ValidateResponse(status int, body []byte, ...) error
- type CustomerProfileResponseItem
- type DOB
Constants ¶
const ( // Platform SDK BasePath = "api/v1" APITimeout = time.Second * 30 TokenMaxAge = int64((time.Hour * 23) / time.Millisecond) // Message Queue MQSendTimeout = time.Millisecond * 5000 MQReceiveTimeout = time.Millisecond * 5000 SDKVersion = "1.1.0" )
Shared SDK Constants
Variables ¶
var Environments = []string{"sandbox", "integration", "production"}
Environments are Rize infrastructure tiers
var MQServices = []string{"adjustments", "customer", "debit_card", "synthetic_account", "transfer", "transaction"}
MQServices are the available Message Queue topic services
Functions ¶
func BuildSchemaPathsList ¶ added in v1.1.0
func BuildSchemaPathsList() []string
BuildSchemaPathsList generates a list of all path and method combinations in the OpenAPI schema
func CheckEnvVariable ¶
CheckEnvVariable is a helper function to check for the existence of an environment variable
func Difference ¶
Difference will find any string from a[] that are not present in b[]
func EnableLogging ¶
func EnableLogging(enabled bool)
EnableLogging will customize or disable the standard Go log package
func FindRoute ¶ added in v1.1.0
FindRoute matches an HTTP request with the path/operation in the OpenAPI schema
func GetRequestKeys ¶
GetRequestKeys returns any request keys (query string or body params) from the OpenAPI schema
func RecurseRequestKeys ¶
RecurseRequestKeys recursively traverses the Request object for a given OpenAPI path and returns a list of all properties
func RecurseResponseKeys ¶
RecurseResponseKeys recursively traverses the Response object for a given OpenAPI path and returns a list of all properties
func ValidateRequest ¶
func ValidateRequest(method string, path string, params url.Values, body io.Reader) (*openapi3filter.RequestValidationInput, error)
ValidateRequest is used to validate the given input according to the loaded OpenAPIv3 spec
func ValidateResponse ¶
func ValidateResponse(status int, body []byte, requestValidationInput *openapi3filter.RequestValidationInput) error
ValidateResponse is used to validate the given input according to the loaded OpenAPIv3 spec
Types ¶
type CustomerProfileResponseItem ¶
type CustomerProfileResponseItem struct { Response string `json:"-,omitempty"` Num0 string `json:"0,omitempty"` Num1 string `json:"1,omitempty"` Num2 string `json:"2,omitempty"` }
CustomerProfileResponseItem contains the Customer's response to the Profile Requirement. Use `Response` to return a string value, or Num0/1/2 for an ordered list
func (CustomerProfileResponseItem) MarshalJSON ¶
func (c CustomerProfileResponseItem) MarshalJSON() ([]byte, error)
MarshalJSON is a custom json marshaller for CustomerProfileResponseItem
func (*CustomerProfileResponseItem) UnmarshalJSON ¶
func (c *CustomerProfileResponseItem) UnmarshalJSON(b []byte) error
UnmarshalJSON is a custom json unmarshaller for CustomerProfileResponseItem
type DOB ¶
DOB is a custom date of birth time format
func (DOB) MarshalJSON ¶
MarshalJSON is a custom json marshaller for formatting DOB strings
func (*DOB) UnmarshalJSON ¶
UnmarshalJSON is a custom json unmarshaller for formatting DOB strings