v1

package
v0.0.0-...-8f76a04 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package v1 provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen version v1.11.0 DO NOT EDIT.

Index

Constants

View Source
const (
	StatusContinue                      = 100 // RFC 7231, 6.2.1
	StatusSwitchingProtocols            = 101 // RFC 7231, 6.2.2
	StatusProcessing                    = 102 // RFC 2518, 10.1
	StatusEarlyHints                    = 103 // RFC 8297
	StatusOK                            = 200 // RFC 7231, 6.3.1
	StatusCreated                       = 201 // RFC 7231, 6.3.2
	StatusAccepted                      = 202 // RFC 7231, 6.3.3
	StatusNonAuthoritativeInformation   = 203 // RFC 7231, 6.3.4
	StatusNoContent                     = 204 // RFC 7231, 6.3.5
	StatusResetContent                  = 205 // RFC 7231, 6.3.6
	StatusPartialContent                = 206 // RFC 7233, 4.1
	StatusMultiStatus                   = 207 // RFC 4918, 11.1
	StatusAlreadyReported               = 208 // RFC 5842, 7.1
	StatusIMUsed                        = 226 // RFC 3229, 10.4.1
	StatusMultipleChoices               = 300 // RFC 7231, 6.4.1
	StatusMovedPermanently              = 301 // RFC 7231, 6.4.2
	StatusFound                         = 302 // RFC 7231, 6.4.3
	StatusSeeOther                      = 303 // RFC 7231, 6.4.4
	StatusNotModified                   = 304 // RFC 7232, 4.1
	StatusUseProxy                      = 305 // RFC 7231, 6.4.5
	StatusTemporaryRedirect             = 307 // RFC 7231, 6.4.7
	StatusPermanentRedirect             = 308 // RFC 7538, 3
	StatusBadRequest                    = 400 // RFC 7231, 6.5.1
	StatusUnauthorized                  = 401 // RFC 7235, 3.1
	StatusPaymentRequired               = 402 // RFC 7231, 6.5.2
	StatusForbidden                     = 403 // RFC 7231, 6.5.3
	StatusNotFound                      = 404 // RFC 7231, 6.5.4
	StatusMethodNotAllowed              = 405 // RFC 7231, 6.5.5
	StatusNotAcceptable                 = 406 // RFC 7231, 6.5.6
	StatusProxyAuthRequired             = 407 // RFC 7235, 3.2
	StatusRequestTimeout                = 408 // RFC 7231, 6.5.7
	StatusConflict                      = 409 // RFC 7231, 6.5.8
	StatusGone                          = 410 // RFC 7231, 6.5.9
	StatusLengthRequired                = 411 // RFC 7231, 6.5.10
	StatusPreconditionFailed            = 412 // RFC 7232, 4.2
	StatusRequestEntityTooLarge         = 413 // RFC 7231, 6.5.11
	StatusRequestURITooLong             = 414 // RFC 7231, 6.5.12
	StatusUnsupportedMediaType          = 415 // RFC 7231, 6.5.13
	StatusRequestedRangeNotSatisfiable  = 416 // RFC 7233, 4.4
	StatusExpectationFailed             = 417 // RFC 7231, 6.5.14
	StatusTeapot                        = 418 // RFC 7168, 2.3.3
	StatusMisdirectedRequest            = 421 // RFC 7540, 9.1.2
	StatusUnprocessableEntity           = 422 // RFC 4918, 11.2
	StatusLocked                        = 423 // RFC 4918, 11.3
	StatusFailedDependency              = 424 // RFC 4918, 11.4
	StatusTooEarly                      = 425 // RFC 8470, 5.2.
	StatusUpgradeRequired               = 426 // RFC 7231, 6.5.15
	StatusPreconditionRequired          = 428 // RFC 6585, 3
	StatusTooManyRequests               = 429 // RFC 6585, 4
	StatusRequestHeaderFieldsTooLarge   = 431 // RFC 6585, 5
	StatusUnavailableForLegalReasons    = 451 // RFC 7725, 3
	StatusInternalServerError           = 500 // RFC 7231, 6.6.1
	StatusNotImplemented                = 501 // RFC 7231, 6.6.2
	StatusBadGateway                    = 502 // RFC 7231, 6.6.3
	StatusServiceUnavailable            = 503 // RFC 7231, 6.6.4
	StatusGatewayTimeout                = 504 // RFC 7231, 6.6.5
	StatusHTTPVersionNotSupported       = 505 // RFC 7231, 6.6.6
	StatusVariantAlsoNegotiates         = 506 // RFC 2295, 8.1
	StatusInsufficientStorage           = 507 // RFC 4918, 11.5
	StatusLoopDetected                  = 508 // RFC 5842, 7.2
	StatusNotExtended                   = 510 // RFC 2774, 7
	StatusNetworkAuthenticationRequired = 511 // RFC 6585, 6
)

HTTP status codes were copied from net/http.

View Source
const (
	HeaderAuthorization                   = "Authorization"
	HeaderProxyAuthenticate               = "Proxy-Authenticate"
	HeaderProxyAuthorization              = "Proxy-Authorization"
	HeaderWWWAuthenticate                 = "WWW-Authenticate"
	HeaderAge                             = "Age"
	HeaderCacheControl                    = "Cache-Control"
	HeaderClearSiteData                   = "Clear-Site-Data"
	HeaderExpires                         = "Expires"
	HeaderPragma                          = "Pragma"
	HeaderWarning                         = "Warning"
	HeaderAcceptCH                        = "Accept-CH"
	HeaderAcceptCHLifetime                = "Accept-CH-Lifetime"
	HeaderContentDPR                      = "Content-DPR"
	HeaderDPR                             = "DPR"
	HeaderEarlyData                       = "Early-Data"
	HeaderSaveData                        = "Save-Data"
	HeaderViewportWidth                   = "Viewport-Width"
	HeaderWidth                           = "Width"
	HeaderETag                            = "ETag"
	HeaderIfMatch                         = "If-Match"
	HeaderIfModifiedSince                 = "If-Modified-Since"
	HeaderIfNoneMatch                     = "If-None-Match"
	HeaderIfUnmodifiedSince               = "If-Unmodified-Since"
	HeaderLastModified                    = "Last-Modified"
	HeaderVary                            = "Vary"
	HeaderConnection                      = "Connection"
	HeaderKeepAlive                       = "Keep-Alive"
	HeaderAccept                          = "Accept"
	HeaderAcceptCharset                   = "Accept-Charset"
	HeaderAcceptEncoding                  = "Accept-Encoding"
	HeaderAcceptLanguage                  = "Accept-Language"
	HeaderCookie                          = "Cookie"
	HeaderExpect                          = "Expect"
	HeaderMaxForwards                     = "Max-Forwards"
	HeaderSetCookie                       = "Set-Cookie"
	HeaderAccessControlAllowCredentials   = "Access-Control-Allow-Credentials"
	HeaderAccessControlAllowHeaders       = "Access-Control-Allow-Headers"
	HeaderAccessControlAllowMethods       = "Access-Control-Allow-Methods"
	HeaderAccessControlAllowOrigin        = "Access-Control-Allow-Origin"
	HeaderAccessControlExposeHeaders      = "Access-Control-Expose-Headers"
	HeaderAccessControlMaxAge             = "Access-Control-Max-Age"
	HeaderAccessControlRequestHeaders     = "Access-Control-Request-Headers"
	HeaderAccessControlRequestMethod      = "Access-Control-Request-Method"
	HeaderOrigin                          = "Origin"
	HeaderTimingAllowOrigin               = "Timing-Allow-Origin"
	HeaderXPermittedCrossDomainPolicies   = "X-Permitted-Cross-Domain-Policies"
	HeaderDNT                             = "DNT"
	HeaderTk                              = "Tk"
	HeaderContentDisposition              = "Content-Disposition"
	HeaderContentEncoding                 = "Content-Encoding"
	HeaderContentLanguage                 = "Content-Language"
	HeaderContentLength                   = "Content-Length"
	HeaderContentLocation                 = "Content-Location"
	HeaderContentType                     = "Content-Type"
	HeaderForwarded                       = "Forwarded"
	HeaderVia                             = "Via"
	HeaderXForwardedFor                   = "X-Forwarded-For"
	HeaderXForwardedHost                  = "X-Forwarded-Host"
	HeaderXForwardedProto                 = "X-Forwarded-Proto"
	HeaderXForwardedProtocol              = "X-Forwarded-Protocol"
	HeaderXForwardedSsl                   = "X-Forwarded-Ssl"
	HeaderXUrlScheme                      = "X-Url-Scheme"
	HeaderLocation                        = "Location"
	HeaderFrom                            = "From"
	HeaderHost                            = "Host"
	HeaderReferer                         = "Referer"
	HeaderReferrerPolicy                  = "Referrer-Policy"
	HeaderUserAgent                       = "User-Agent"
	HeaderAllow                           = "Allow"
	HeaderServer                          = "Server"
	HeaderAcceptRanges                    = "Accept-Ranges"
	HeaderContentRange                    = "Content-Range"
	HeaderIfRange                         = "If-Range"
	HeaderRange                           = "Range"
	HeaderContentSecurityPolicy           = "Content-Security-Policy"
	HeaderContentSecurityPolicyReportOnly = "Content-Security-Policy-Report-Only"
	HeaderCrossOriginResourcePolicy       = "Cross-Origin-Resource-Policy"
	HeaderExpectCT                        = "Expect-CT"
	// Deprecated: use HeaderPermissionsPolicy instead
	HeaderFeaturePolicy           = "Feature-Policy"
	HeaderPermissionsPolicy       = "Permissions-Policy"
	HeaderPublicKeyPins           = "Public-Key-Pins"
	HeaderPublicKeyPinsReportOnly = "Public-Key-Pins-Report-Only"
	HeaderStrictTransportSecurity = "Strict-Transport-Security"
	HeaderUpgradeInsecureRequests = "Upgrade-Insecure-Requests"
	HeaderXContentTypeOptions     = "X-Content-Type-Options"
	HeaderXDownloadOptions        = "X-Download-Options"
	HeaderXFrameOptions           = "X-Frame-Options"
	HeaderXPoweredBy              = "X-Powered-By"
	HeaderXXSSProtection          = "X-XSS-Protection"
	HeaderLastEventID             = "Last-Event-ID"
	HeaderNEL                     = "NEL"
	HeaderPingFrom                = "Ping-From"
	HeaderPingTo                  = "Ping-To"
	HeaderReportTo                = "Report-To"
	HeaderTE                      = "TE"
	HeaderTrailer                 = "Trailer"
	HeaderTransferEncoding        = "Transfer-Encoding"
	HeaderSecWebSocketAccept      = "Sec-WebSocket-Accept"
	HeaderSecWebSocketExtensions  = "Sec-WebSocket-Extensions"
	HeaderSecWebSocketKey         = "Sec-WebSocket-Key"
	HeaderSecWebSocketProtocol    = "Sec-WebSocket-Protocol"
	HeaderSecWebSocketVersion     = "Sec-WebSocket-Version"
	HeaderAcceptPatch             = "Accept-Patch"
	HeaderAcceptPushPolicy        = "Accept-Push-Policy"
	HeaderAcceptSignature         = "Accept-Signature"
	HeaderAltSvc                  = "Alt-Svc"
	HeaderDate                    = "Date"
	HeaderIndex                   = "Index"
	HeaderLargeAllocation         = "Large-Allocation"
	HeaderLink                    = "Link"
	HeaderPushPolicy              = "Push-Policy"
	HeaderRetryAfter              = "Retry-After"
	HeaderServerTiming            = "Server-Timing"
	HeaderSignature               = "Signature"
	HeaderSignedHeaders           = "Signed-Headers"
	HeaderSourceMap               = "SourceMap"
	HeaderUpgrade                 = "Upgrade"
	HeaderXDNSPrefetchControl     = "X-DNS-Prefetch-Control"
	HeaderXPingback               = "X-Pingback"
	HeaderXRequestID              = "X-Request-ID"
	HeaderXRequestedWith          = "X-Requested-With"
	HeaderXRobotsTag              = "X-Robots-Tag"
	HeaderXUACompatible           = "X-UA-Compatible"
	HeaderXAuditActor             = "X-Audit-Actor"
	HeaderXAuditAction            = "X-Audit-Action"
	HeaderXAuditResource          = "X-Audit-Resource"
	HeaderXAuditResourceID        = "X-Audit-Resource-ID"
)

HTTP Headers were copied from net/http.

View Source
const (
	MIMETextXML               = "text/xml"
	MIMETextHTML              = "text/html"
	MIMETextPlain             = "text/plain"
	MIMEApplicationXML        = "application/xml"
	MIMEApplicationJSON       = "application/json"
	MIMEApplicationJavaScript = "application/javascript"
	MIMEApplicationForm       = "application/x-www-form-urlencoded"
	MIMEOctetStream           = "application/octet-stream"
	MIMEMultipartForm         = "multipart/form-data"

	MIMETextXMLCharsetUTF8               = "text/xml; charset=utf-8"
	MIMETextHTMLCharsetUTF8              = "text/html; charset=utf-8"
	MIMETextPlainCharsetUTF8             = "text/plain; charset=utf-8"
	MIMEApplicationXMLCharsetUTF8        = "application/xml; charset=utf-8"
	MIMEApplicationJSONCharsetUTF8       = "application/json; charset=utf-8"
	MIMEApplicationJavaScriptCharsetUTF8 = "application/javascript; charset=utf-8"
)

MIME types that are commonly used

Variables

This section is empty.

Functions

func GetSwagger

func GetSwagger() (swagger *openapi3.T, err error)

GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.

func Handler

func Handler(si ServerInterface) http.Handler

Handler creates http.Handler with routing matching OpenAPI spec.

func HandlerFromMux

func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler

HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.

func HandlerFromMuxWithBaseURL

func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler

func HandlerWithOptions

func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler

HandlerWithOptions creates http.Handler with additional options

func IsErrorTypeOfOAPI

func IsErrorTypeOfOAPI(err error) bool

func IsInvalidParamFormatError

func IsInvalidParamFormatError(err error) bool

func IsRequiredHeaderError

func IsRequiredHeaderError(err error) bool

func IsRequiredParamError

func IsRequiredParamError(err error) bool

func IsTooManyValuesForParamError

func IsTooManyValuesForParamError(err error) bool

func IsUnescapedCookieParamError

func IsUnescapedCookieParamError(err error) bool

func IsUnmarshalingParamError

func IsUnmarshalingParamError(err error) bool

func NewPostEnqueueFromDeadQueueRequest

func NewPostEnqueueFromDeadQueueRequest(server string) (*http.Request, error)

NewPostEnqueueFromDeadQueueRequest generates requests for PostEnqueueFromDeadQueue

func NewPostPushRequest

func NewPostPushRequest(server string, body PostPushJSONRequestBody) (*http.Request, error)

NewPostPushRequest calls the generic PostPush builder with application/json body

func NewPostPushRequestWithBody

func NewPostPushRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewPostPushRequestWithBody generates requests for PostPush with any type of body

func NewPostStatusRequest

func NewPostStatusRequest(server string) (*http.Request, error)

NewPostStatusRequest generates requests for PostStatus

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

Types

type ChiServerOptions

type ChiServerOptions struct {
	BaseURL          string
	BaseRouter       chi.Router
	Middlewares      []MiddlewareFunc
	ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) PostEnqueueFromDeadQueue

func (c *Client) PostEnqueueFromDeadQueue(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostPush

func (c *Client) PostPush(ctx context.Context, body PostPushJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostPushWithBody

func (c *Client) PostPushWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostStatus

func (c *Client) PostStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// PostEnqueueFromDeadQueue request
	PostEnqueueFromDeadQueue(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostPush request with any body
	PostPushWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PostPush(ctx context.Context, body PostPushJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostStatus request
	PostStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) PostEnqueueFromDeadQueueWithResponse

func (c *ClientWithResponses) PostEnqueueFromDeadQueueWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*PostEnqueueFromDeadQueueResponse, error)

PostEnqueueFromDeadQueueWithResponse request returning *PostEnqueueFromDeadQueueResponse

func (*ClientWithResponses) PostPushWithBodyWithResponse

func (c *ClientWithResponses) PostPushWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPushResponse, error)

PostPushWithBodyWithResponse request with arbitrary body returning *PostPushResponse

func (*ClientWithResponses) PostPushWithResponse

func (c *ClientWithResponses) PostPushWithResponse(ctx context.Context, body PostPushJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPushResponse, error)

func (*ClientWithResponses) PostStatusWithResponse

func (c *ClientWithResponses) PostStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*PostStatusResponse, error)

PostStatusWithResponse request returning *PostStatusResponse

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// PostEnqueueFromDeadQueue request
	PostEnqueueFromDeadQueueWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*PostEnqueueFromDeadQueueResponse, error)

	// PostPush request with any body
	PostPushWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPushResponse, error)

	PostPushWithResponse(ctx context.Context, body PostPushJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPushResponse, error)

	// PostStatus request
	PostStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*PostStatusResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type InvalidParamFormatError

type InvalidParamFormatError struct {
	ParamName string
	Err       error
}

func (*InvalidParamFormatError) Error

func (e *InvalidParamFormatError) Error() string

func (*InvalidParamFormatError) Unwrap

func (e *InvalidParamFormatError) Unwrap() error

type Message

type Message struct {
	// for tracking who is send
	From *string `json:"from,omitempty"`

	// message identifier
	Id *string `json:"id,omitempty"`

	// actual push token by service
	PushToken *string `json:"push_token,omitempty"`

	// send type ON_DEMAND[send immediately] RESERVED send at scheduled]
	Send *MessageSend `json:"send,omitempty"`

	// one of service from pickstudio
	Service *MessageService `json:"service,omitempty"`

	// view object is actual push message format
	View *interface{} `json:"view,omitempty"`

	// view type of push message
	ViewType *MessageViewType `json:"view_type,omitempty"`
}

a message

type MessageSend

type MessageSend string

send type ON_DEMAND[send immediately] RESERVED send at scheduled]

const (
	ONDEMAND MessageSend = "ON_DEMAND"
	RESERVED MessageSend = "RESERVED"
)

Defines values for MessageSend.

type MessageService

type MessageService string

one of service from pickstudio

const (
	BUDDYSTOCK MessageService = "BUDDYSTOCK"
	DIJKSTRA   MessageService = "DIJKSTRA"
	PICKME     MessageService = "PICKME"
)

Defines values for MessageService.

type MessageViewType

type MessageViewType string

view type of push message

const (
	PLAIN MessageViewType = "PLAIN"
)

Defines values for MessageViewType.

type MiddlewareFunc

type MiddlewareFunc func(http.HandlerFunc) http.HandlerFunc

type PlainView

type PlainView struct {
	Alarm        string  `json:"alarm"`
	Content      string  `json:"content"`
	CreatedAt    string  `json:"created_at"`
	SchemeUrl    string  `json:"scheme_url"`
	ThumbnailUrl *string `json:"thumbnail_url,omitempty"`
	Title        string  `json:"title"`
}

plain type push message

type PostEnqueueFromDeadQueueResponse

type PostEnqueueFromDeadQueueResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Status
}

func ParsePostEnqueueFromDeadQueueResponse

func ParsePostEnqueueFromDeadQueueResponse(rsp *http.Response) (*PostEnqueueFromDeadQueueResponse, error)

ParsePostEnqueueFromDeadQueueResponse parses an HTTP response from a PostEnqueueFromDeadQueueWithResponse call

func (PostEnqueueFromDeadQueueResponse) Status

Status returns HTTPResponse.Status

func (PostEnqueueFromDeadQueueResponse) StatusCode

func (r PostEnqueueFromDeadQueueResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostPushJSONBody

type PostPushJSONBody struct {
	Messages *[]Message `json:"messages,omitempty"`
}

PostPushJSONBody defines parameters for PostPush.

type PostPushJSONRequestBody

type PostPushJSONRequestBody PostPushJSONBody

PostPushJSONRequestBody defines body for PostPush for application/json ContentType.

type PostPushResponse

type PostPushResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Status *Status `json:"_status,omitempty"`
	}
}

func ParsePostPushResponse

func ParsePostPushResponse(rsp *http.Response) (*PostPushResponse, error)

ParsePostPushResponse parses an HTTP response from a PostPushWithResponse call

func (PostPushResponse) Status

func (r PostPushResponse) Status() string

Status returns HTTPResponse.Status

func (PostPushResponse) StatusCode

func (r PostPushResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostStatusResponse

type PostStatusResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Status
}

func ParsePostStatusResponse

func ParsePostStatusResponse(rsp *http.Response) (*PostStatusResponse, error)

ParsePostStatusResponse parses an HTTP response from a PostStatusWithResponse call

func (PostStatusResponse) Status

func (r PostStatusResponse) Status() string

Status returns HTTPResponse.Status

func (PostStatusResponse) StatusCode

func (r PostStatusResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type RequiredHeaderError

type RequiredHeaderError struct {
	ParamName string
	Err       error
}

func (*RequiredHeaderError) Error

func (e *RequiredHeaderError) Error() string

func (*RequiredHeaderError) Unwrap

func (e *RequiredHeaderError) Unwrap() error

type RequiredParamError

type RequiredParamError struct {
	ParamName string
}

func (*RequiredParamError) Error

func (e *RequiredParamError) Error() string

type ServerInterface

type ServerInterface interface {
	// DLQ로 빠진 실패한 에러메세지들을 다시 queue에다가 집어 넣을 수 있도록 합니다.
	// (POST /_enqueue_from_dead_queue)
	PostEnqueueFromDeadQueue(w http.ResponseWriter, r *http.Request)
	// send push message immediately
	// (POST /_push)
	PostPush(w http.ResponseWriter, r *http.Request)
	// send push message immediately
	// (POST /_status)
	PostStatus(w http.ResponseWriter, r *http.Request)
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler            ServerInterface
	HandlerMiddlewares []MiddlewareFunc
	ErrorHandlerFunc   func(w http.ResponseWriter, r *http.Request, err error)
}

ServerInterfaceWrapper converts contexts to parameters.

func (*ServerInterfaceWrapper) PostEnqueueFromDeadQueue

func (siw *ServerInterfaceWrapper) PostEnqueueFromDeadQueue(w http.ResponseWriter, r *http.Request)

PostEnqueueFromDeadQueue operation middleware

func (*ServerInterfaceWrapper) PostPush

func (siw *ServerInterfaceWrapper) PostPush(w http.ResponseWriter, r *http.Request)

PostPush operation middleware

func (*ServerInterfaceWrapper) PostStatus

func (siw *ServerInterfaceWrapper) PostStatus(w http.ResponseWriter, r *http.Request)

PostStatus operation middleware

type Status

type Status struct {
	DeadQueueAdminUrl *string  `json:"dead_queue_admin_url,omitempty"`
	DeadQueueSize     *float32 `json:"dead_queue_size,omitempty"`
	Manual            *string  `json:"manual,omitempty"`
	QueueAdminUrl     *string  `json:"queue_admin_url,omitempty"`
	QueueSize         *float32 `json:"queue_size,omitempty"`
	Time              *string  `json:"time,omitempty"`
}

Status defines model for status.

type TooManyValuesForParamError

type TooManyValuesForParamError struct {
	ParamName string
	Count     int
}

func (*TooManyValuesForParamError) Error

type UnescapedCookieParamError

type UnescapedCookieParamError struct {
	ParamName string
	Err       error
}

func (*UnescapedCookieParamError) Error

func (e *UnescapedCookieParamError) Error() string

func (*UnescapedCookieParamError) Unwrap

func (e *UnescapedCookieParamError) Unwrap() error

type UnmarshalingParamError

type UnmarshalingParamError struct {
	ParamName string
	Err       error
}

func (*UnmarshalingParamError) Error

func (e *UnmarshalingParamError) Error() string

func (*UnmarshalingParamError) Unwrap

func (e *UnmarshalingParamError) Unwrap() error

Jump to

Keyboard shortcuts

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