Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var HEADERS_TO_IGNORE = []string{
"authorization",
"connection",
"x-amzn-trace-id",
"user-agent",
"expect",
"presigned-expires",
"range",
}
HEADERS_TO_IGNORE contains headers to be ignored while signing request
var HEADERS_TO_INCLUDE = []string{"host", "x-fp-.*"}
HEADERS_TO_INCLUDE contains headers to be included while signing request
Functions ¶
This section is empty.
Types ¶
type FDKError ¶
type FDKError struct { // Message is user-friendly message that can be displayed on front-end for end-users Message string `json:"message"` // Status is HTTP status code that is set in API response Status int `json:"status"` // A Code should be unique and used only once throughout the project // so that it can lead to the exact line of failed function when searched in the entire project. Code string `json:"code"` // Exception is technical expection title. This should be mostly 2-3 words title of the // error/er to be understood by developers. Exception string `json:"exception"` // Info is link/URL to the logging system(Sentry/Kibana) to get more insight and trace error Info string `json:"info"` // RequestID is the unique ID of a particular request for tracing the errors in the logging system(Sentry/Kibana) RequestID string `json:"request_id,omitempty"` //StackTrace gives the report of the active stack frames at a certain point in time during the execution of a program used for debugging purposes StackTrace string `json:"stack_trace,omitempty"` //Meta can be used for your custom keys, which would be helpful for detailed error and for debugging Meta objx.Map `json:"meta,omitempty"` }
FDKError is custom error type to pass more information along with the native error.
func NewFDKError ¶
NewFDKError constructs and returns new FDKError object
func (*FDKError) SetRequestID ¶
SetRequestID sets the RequestID in the error object
type Paginator ¶
type Paginator struct { PageNo float64 HasNextPage bool NextID string Next func() (interface{}, error) }
Paginator holds paginator object
func NewPaginator ¶
NewPaginator returns paginator instance
type RequestSigner ¶
RequestSigner holds request signer object
func NewRequestSigner ¶
func NewRequestSigner(req *http.Request, signQuery bool) *RequestSigner
NewRequestSigner return the request signer instance
func (*RequestSigner) GetRequestedDateTime ¶
func (r *RequestSigner) GetRequestedDateTime() string
GetRequestedDateTime reuse and returns the date time created
func (*RequestSigner) GetUpdatedRequest ¶
func (r *RequestSigner) GetUpdatedRequest() *http.Request
GetUpdatedRequest return the updated HTTP request
func (*RequestSigner) Sign ¶
func (r *RequestSigner) Sign() error
Sign performs request signing operation