Documentation ¶
Index ¶
- Constants
- func CallbacksHandler(impl CallbacksService, r chi.Router, hooks *Hooks, ...) http.Handler
- func DeleteTransactionsUUIDResponseBuilder() *deleteTransactionsUUIDStatusCodeResponseBuilder
- func PostCallbacksCallbackTypeResponseBuilder() *postCallbacksCallbackTypeStatusCodeResponseBuilder
- func PostTransactionResponseBuilder() *postTransactionStatusCodeResponseBuilder
- func PutTransactionResponseBuilder() *putTransactionStatusCodeResponseBuilder
- func Spec(w http.ResponseWriter, _ *http.Request)
- func TransactionsHandler(impl TransactionsService, r chi.Router, hooks *Hooks, ...) http.Handler
- type Boolean
- type CallbacksService
- type CreateTransactionRequest
- type DeleteTransactionsUUID200ApplicationJsonResponseBuilder
- type DeleteTransactionsUUID400ApplicationJsonResponseBuilder
- type DeleteTransactionsUUIDRequest
- type DeleteTransactionsUUIDRequestHeader
- type DeleteTransactionsUUIDRequestPath
- type DeleteTransactionsUUIDRequestQuery
- type DeleteTransactionsUUIDResponse
- type Email
- type GenericResponse
- type GenericResponseResultEnum
- type Hooks
- type PostCallbacksCallbackType200ApplicationOctetStreamResponseBuilder
- type PostCallbacksCallbackType200Headers
- type PostCallbacksCallbackType307Headers
- type PostCallbacksCallbackType307ResponseBuilder
- type PostCallbacksCallbackTypeRequest
- type PostCallbacksCallbackTypeRequestPath
- type PostCallbacksCallbackTypeRequestQuery
- type PostCallbacksCallbackTypeResponse
- type PostTransaction201ApplicationJsonResponseBuilder
- type PostTransaction400ApplicationJsonResponseBuilder
- type PostTransaction500ApplicationJsonResponseBuilder
- type PostTransactionRequest
- type PostTransactionRequestHeader
- type PostTransactionResponse
- type PutTransaction200ApplicationJsonResponseBuilder
- type PutTransaction400ApplicationJsonResponseBuilder
- type PutTransaction500ApplicationJsonResponseBuilder
- type PutTransactionRequest
- type PutTransactionRequestHeader
- type PutTransactionResponse
- type RawPayload
- type RequestProcessingResult
- type SecurityCheckResult
- type SecuritySchemas
- type SecurityScheme
- type Time
- type TransactionsService
- type URL
- type UpdateTransactionRequest
- type WithEnum
Constants ¶
View Source
const ( BodyUnmarshalFailed requestProcessingResultType = iota + 1 BodyValidationFailed HeaderParseFailed HeaderValidationFailed QueryParseFailed QueryValidationFailed PathParseFailed PathValidationFailed SecurityParseFailed SecurityCheckFailed ParseSucceed )
Variables ¶
This section is empty.
Functions ¶
func CallbacksHandler ¶ added in v1.0.28
func CallbacksHandler(impl CallbacksService, r chi.Router, hooks *Hooks, securitySchemas SecuritySchemas) http.Handler
func DeleteTransactionsUUIDResponseBuilder ¶
func DeleteTransactionsUUIDResponseBuilder() *deleteTransactionsUUIDStatusCodeResponseBuilder
func PostCallbacksCallbackTypeResponseBuilder ¶ added in v1.0.28
func PostCallbacksCallbackTypeResponseBuilder() *postCallbacksCallbackTypeStatusCodeResponseBuilder
func PostTransactionResponseBuilder ¶
func PostTransactionResponseBuilder() *postTransactionStatusCodeResponseBuilder
func PutTransactionResponseBuilder ¶ added in v1.0.53
func PutTransactionResponseBuilder() *putTransactionStatusCodeResponseBuilder
func TransactionsHandler ¶
func TransactionsHandler(impl TransactionsService, r chi.Router, hooks *Hooks, securitySchemas SecuritySchemas) http.Handler
Types ¶
type CallbacksService ¶ added in v1.0.28
type CallbacksService interface {
PostCallbacksCallbackType(context.Context, PostCallbacksCallbackTypeRequest) PostCallbacksCallbackTypeResponse
}
type CreateTransactionRequest ¶
type CreateTransactionRequest struct { Amount float64 `json:"amount"` AmountCents int `json:"amountCents"` CallbackURL url.URL `json:"callbackURL"` Country countries.Alpha2Code `json:"country"` Currency currency.Code `json:"currency"` Description string `json:"description"` Details *string `json:"details,omitempty"` Email email.Email `json:"email"` RegexParam string `json:"regexParam"` Title string `json:"title"` TransactionID uuid.UUID `json:"transactionID"` }
func (*CreateTransactionRequest) UnmarshalJSON ¶
func (body *CreateTransactionRequest) UnmarshalJSON(data []byte) error
func (CreateTransactionRequest) Validate ¶ added in v1.0.27
func (body CreateTransactionRequest) Validate() error
type DeleteTransactionsUUID200ApplicationJsonResponseBuilder ¶
type DeleteTransactionsUUID200ApplicationJsonResponseBuilder struct {
// contains filtered or unexported fields
}
func (*DeleteTransactionsUUID200ApplicationJsonResponseBuilder) Build ¶
func (builder *DeleteTransactionsUUID200ApplicationJsonResponseBuilder) Build() DeleteTransactionsUUIDResponse
type DeleteTransactionsUUID400ApplicationJsonResponseBuilder ¶
type DeleteTransactionsUUID400ApplicationJsonResponseBuilder struct {
// contains filtered or unexported fields
}
func (*DeleteTransactionsUUID400ApplicationJsonResponseBuilder) Build ¶
func (builder *DeleteTransactionsUUID400ApplicationJsonResponseBuilder) Build() DeleteTransactionsUUIDResponse
type DeleteTransactionsUUIDRequest ¶
type DeleteTransactionsUUIDRequest struct { Header DeleteTransactionsUUIDRequestHeader Path DeleteTransactionsUUIDRequestPath Query DeleteTransactionsUUIDRequestQuery ProcessingResult RequestProcessingResult SecurityCheckResults map[SecurityScheme]string }
type DeleteTransactionsUUIDRequestHeader ¶ added in v1.0.27
type DeleteTransactionsUUIDRequestHeader struct { XFingerprint string `json:"x-fingerprint"` XSignature string `json:"x-signature"` }
func (DeleteTransactionsUUIDRequestHeader) GetXFingerprint ¶ added in v1.0.48
func (header DeleteTransactionsUUIDRequestHeader) GetXFingerprint() string
func (DeleteTransactionsUUIDRequestHeader) GetXSignature ¶ added in v1.0.27
func (header DeleteTransactionsUUIDRequestHeader) GetXSignature() string
func (DeleteTransactionsUUIDRequestHeader) Validate ¶ added in v1.0.27
func (header DeleteTransactionsUUIDRequestHeader) Validate() error
type DeleteTransactionsUUIDRequestPath ¶
func (DeleteTransactionsUUIDRequestPath) GetRegexParam ¶ added in v1.0.26
func (path DeleteTransactionsUUIDRequestPath) GetRegexParam() string
func (DeleteTransactionsUUIDRequestPath) GetUUID ¶
func (path DeleteTransactionsUUIDRequestPath) GetUUID() string
func (DeleteTransactionsUUIDRequestPath) Validate ¶ added in v1.0.27
func (path DeleteTransactionsUUIDRequestPath) Validate() error
type DeleteTransactionsUUIDRequestQuery ¶ added in v1.0.39
func (DeleteTransactionsUUIDRequestQuery) GetTimeParam ¶ added in v1.0.39
func (query DeleteTransactionsUUIDRequestQuery) GetTimeParam() time.Time
func (DeleteTransactionsUUIDRequestQuery) Validate ¶ added in v1.0.39
func (query DeleteTransactionsUUIDRequestQuery) Validate() error
type DeleteTransactionsUUIDResponse ¶
type DeleteTransactionsUUIDResponse interface {
// contains filtered or unexported methods
}
type GenericResponse ¶
type GenericResponse struct {
Result GenericResponseResultEnum `json:"result"`
}
func (*GenericResponse) UnmarshalJSON ¶
func (body *GenericResponse) UnmarshalJSON(data []byte) error
func (GenericResponse) Validate ¶ added in v1.0.27
func (body GenericResponse) Validate() error
type GenericResponseResultEnum ¶
type GenericResponseResultEnum string
var GenericResponseResultEnumFailed GenericResponseResultEnum = "failed"
var GenericResponseResultEnumSuccess GenericResponseResultEnum = "success"
func (GenericResponseResultEnum) Check ¶
func (enum GenericResponseResultEnum) Check() error
func (*GenericResponseResultEnum) UnmarshalJSON ¶
func (enum *GenericResponseResultEnum) UnmarshalJSON(data []byte) error
type Hooks ¶
type Hooks struct { RequestSecurityParseFailed func(*http.Request, string, RequestProcessingResult) RequestSecurityParseCompleted func(*http.Request, string) RequestSecurityCheckFailed func(*http.Request, string, string, RequestProcessingResult) RequestSecurityCheckCompleted func(*http.Request, string, string) RequestBodyUnmarshalFailed func(*http.Request, string, RequestProcessingResult) RequestHeaderParseFailed func(*http.Request, string, string, RequestProcessingResult) RequestPathParseFailed func(*http.Request, string, string, RequestProcessingResult) RequestQueryParseFailed func(*http.Request, string, string, RequestProcessingResult) RequestBodyValidationFailed func(*http.Request, string, RequestProcessingResult) RequestHeaderValidationFailed func(*http.Request, string, RequestProcessingResult) RequestPathValidationFailed func(*http.Request, string, RequestProcessingResult) RequestQueryValidationFailed func(*http.Request, string, RequestProcessingResult) RequestBodyUnmarshalCompleted func(*http.Request, string) RequestHeaderParseCompleted func(*http.Request, string) RequestPathParseCompleted func(*http.Request, string) RequestQueryParseCompleted func(*http.Request, string) RequestParseCompleted func(*http.Request, string) RequestProcessingCompleted func(*http.Request, string) RequestRedirectStarted func(*http.Request, string, string) ResponseBodyMarshalCompleted func(*http.Request, string) ResponseBodyWriteCompleted func(*http.Request, string, int) ResponseBodyMarshalFailed func(http.ResponseWriter, *http.Request, string, error) ResponseBodyWriteFailed func(*http.Request, string, int, error) ServiceCompleted func(*http.Request, string) }
type PostCallbacksCallbackType200ApplicationOctetStreamResponseBuilder ¶ added in v1.0.28
type PostCallbacksCallbackType200ApplicationOctetStreamResponseBuilder struct {
// contains filtered or unexported fields
}
func (*PostCallbacksCallbackType200ApplicationOctetStreamResponseBuilder) Build ¶ added in v1.0.28
func (builder *PostCallbacksCallbackType200ApplicationOctetStreamResponseBuilder) Build() PostCallbacksCallbackTypeResponse
type PostCallbacksCallbackType200Headers ¶ added in v1.0.36
type PostCallbacksCallbackType200Headers struct {
XJwsSignature string
}
type PostCallbacksCallbackType307Headers ¶ added in v1.0.57
type PostCallbacksCallbackType307Headers struct {
ReferrerPolicy string
}
type PostCallbacksCallbackType307ResponseBuilder ¶ added in v1.0.57
type PostCallbacksCallbackType307ResponseBuilder struct {
// contains filtered or unexported fields
}
func (*PostCallbacksCallbackType307ResponseBuilder) Build ¶ added in v1.0.57
func (builder *PostCallbacksCallbackType307ResponseBuilder) Build() PostCallbacksCallbackTypeResponse
type PostCallbacksCallbackTypeRequest ¶ added in v1.0.28
type PostCallbacksCallbackTypeRequest struct { Body RawPayload Path PostCallbacksCallbackTypeRequestPath Query PostCallbacksCallbackTypeRequestQuery ProcessingResult RequestProcessingResult SecurityCheckResults map[SecurityScheme]string }
type PostCallbacksCallbackTypeRequestPath ¶ added in v1.0.28
type PostCallbacksCallbackTypeRequestPath struct {
CallbackType string
}
func (PostCallbacksCallbackTypeRequestPath) GetCallbackType ¶ added in v1.0.28
func (path PostCallbacksCallbackTypeRequestPath) GetCallbackType() string
func (PostCallbacksCallbackTypeRequestPath) Validate ¶ added in v1.0.28
func (path PostCallbacksCallbackTypeRequestPath) Validate() error
type PostCallbacksCallbackTypeRequestQuery ¶ added in v1.0.39
type PostCallbacksCallbackTypeRequestQuery struct {
HasSmth bool
}
func (PostCallbacksCallbackTypeRequestQuery) GetHasSmth ¶ added in v1.0.39
func (query PostCallbacksCallbackTypeRequestQuery) GetHasSmth() bool
func (PostCallbacksCallbackTypeRequestQuery) Validate ¶ added in v1.0.39
func (query PostCallbacksCallbackTypeRequestQuery) Validate() error
type PostCallbacksCallbackTypeResponse ¶ added in v1.0.28
type PostCallbacksCallbackTypeResponse interface {
// contains filtered or unexported methods
}
type PostTransaction201ApplicationJsonResponseBuilder ¶
type PostTransaction201ApplicationJsonResponseBuilder struct {
// contains filtered or unexported fields
}
func (*PostTransaction201ApplicationJsonResponseBuilder) Build ¶
func (builder *PostTransaction201ApplicationJsonResponseBuilder) Build() PostTransactionResponse
type PostTransaction400ApplicationJsonResponseBuilder ¶
type PostTransaction400ApplicationJsonResponseBuilder struct {
// contains filtered or unexported fields
}
func (*PostTransaction400ApplicationJsonResponseBuilder) Build ¶
func (builder *PostTransaction400ApplicationJsonResponseBuilder) Build() PostTransactionResponse
type PostTransaction500ApplicationJsonResponseBuilder ¶ added in v1.0.27
type PostTransaction500ApplicationJsonResponseBuilder struct {
// contains filtered or unexported fields
}
func (*PostTransaction500ApplicationJsonResponseBuilder) Build ¶ added in v1.0.27
func (builder *PostTransaction500ApplicationJsonResponseBuilder) Build() PostTransactionResponse
type PostTransactionRequest ¶
type PostTransactionRequest struct { Body CreateTransactionRequest Header PostTransactionRequestHeader ProcessingResult RequestProcessingResult }
type PostTransactionRequestHeader ¶ added in v1.0.27
type PostTransactionRequestHeader struct { XFingerprint string `json:"x-fingerprint"` XSignature string `json:"x-signature"` }
func (PostTransactionRequestHeader) GetXFingerprint ¶ added in v1.0.48
func (header PostTransactionRequestHeader) GetXFingerprint() string
func (PostTransactionRequestHeader) GetXSignature ¶ added in v1.0.27
func (header PostTransactionRequestHeader) GetXSignature() string
func (PostTransactionRequestHeader) Validate ¶ added in v1.0.27
func (header PostTransactionRequestHeader) Validate() error
type PostTransactionResponse ¶
type PostTransactionResponse interface {
// contains filtered or unexported methods
}
type PutTransaction200ApplicationJsonResponseBuilder ¶ added in v1.0.53
type PutTransaction200ApplicationJsonResponseBuilder struct {
// contains filtered or unexported fields
}
func (*PutTransaction200ApplicationJsonResponseBuilder) Build ¶ added in v1.0.53
func (builder *PutTransaction200ApplicationJsonResponseBuilder) Build() PutTransactionResponse
type PutTransaction400ApplicationJsonResponseBuilder ¶ added in v1.0.53
type PutTransaction400ApplicationJsonResponseBuilder struct {
// contains filtered or unexported fields
}
func (*PutTransaction400ApplicationJsonResponseBuilder) Build ¶ added in v1.0.53
func (builder *PutTransaction400ApplicationJsonResponseBuilder) Build() PutTransactionResponse
type PutTransaction500ApplicationJsonResponseBuilder ¶ added in v1.0.53
type PutTransaction500ApplicationJsonResponseBuilder struct {
// contains filtered or unexported fields
}
func (*PutTransaction500ApplicationJsonResponseBuilder) Build ¶ added in v1.0.53
func (builder *PutTransaction500ApplicationJsonResponseBuilder) Build() PutTransactionResponse
type PutTransactionRequest ¶ added in v1.0.53
type PutTransactionRequest struct { Body UpdateTransactionRequest Header PutTransactionRequestHeader ProcessingResult RequestProcessingResult }
type PutTransactionRequestHeader ¶ added in v1.0.53
type PutTransactionRequestHeader struct { XFingerprint string `json:"x-fingerprint"` XSignature string `json:"x-signature"` }
func (PutTransactionRequestHeader) GetXFingerprint ¶ added in v1.0.53
func (header PutTransactionRequestHeader) GetXFingerprint() string
func (PutTransactionRequestHeader) GetXSignature ¶ added in v1.0.53
func (header PutTransactionRequestHeader) GetXSignature() string
func (PutTransactionRequestHeader) Validate ¶ added in v1.0.53
func (header PutTransactionRequestHeader) Validate() error
type PutTransactionResponse ¶ added in v1.0.53
type PutTransactionResponse interface {
// contains filtered or unexported methods
}
type RawPayload ¶ added in v1.0.28
type RawPayload = []byte
type RequestProcessingResult ¶
type RequestProcessingResult struct {
// contains filtered or unexported fields
}
func NewRequestProcessingResult ¶
func NewRequestProcessingResult(t requestProcessingResultType, err error) RequestProcessingResult
func (RequestProcessingResult) Err ¶
func (r RequestProcessingResult) Err() error
func (RequestProcessingResult) Type ¶
func (r RequestProcessingResult) Type() requestProcessingResultType
type SecurityCheckResult ¶
type SecurityCheckResult struct { Scheme SecurityScheme Value string }
type SecuritySchemas ¶
type SecuritySchemas interface { SecuritySchemeBasic(r *http.Request, scheme SecurityScheme, name string, value string) error SecuritySchemeBearer(r *http.Request, scheme SecurityScheme, name string, value string) error SecuritySchemeCookie(r *http.Request, scheme SecurityScheme, name string, value string) error }
type SecurityScheme ¶
type SecurityScheme string
const ( SecuritySchemeBasic SecurityScheme = "Basic" SecuritySchemeBearer SecurityScheme = "Bearer" SecuritySchemeCookie SecurityScheme = "Cookie" )
type TransactionsService ¶
type TransactionsService interface { PutTransaction(context.Context, PutTransactionRequest) PutTransactionResponse PostTransaction(context.Context, PostTransactionRequest) PostTransactionResponse DeleteTransactionsUUID(context.Context, DeleteTransactionsUUIDRequest) DeleteTransactionsUUIDResponse }
type UpdateTransactionRequest ¶ added in v1.0.53
type UpdateTransactionRequest struct { Description string `json:"description"` Details *string `json:"details,omitempty"` Title string `json:"title"` }
func (*UpdateTransactionRequest) UnmarshalJSON ¶ added in v1.0.53
func (body *UpdateTransactionRequest) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.