Documentation ¶
Index ¶
- func BuildSeenPayload(notificationsSeenBody string, notificationsSeenAuth string) (*notifications.SeenPayload, error)
- func DecodeListenResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
- func DecodeSeenResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
- func EncodeSeenRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error
- func ListenNotificationsPath() string
- func NewListenBadRequest(body *ListenBadRequestResponseBody) *goa.ServiceError
- func NewListenForbidden(body *ListenForbiddenResponseBody) *goa.ServiceError
- func NewListenNotFound(body *ListenNotFoundResponseBody) *goa.ServiceError
- func NewListenUnauthorized(body ListenUnauthorizedResponseBody) notifications.Unauthorized
- func NewSeenBadRequest(body *SeenBadRequestResponseBody) *goa.ServiceError
- func NewSeenForbidden(body *SeenForbiddenResponseBody) *goa.ServiceError
- func NewSeenNotFound(body *SeenNotFoundResponseBody) *goa.ServiceError
- func NewSeenUnauthorized(body SeenUnauthorizedResponseBody) notifications.Unauthorized
- func SeenNotificationsPath() string
- func ValidateListenBadRequestResponseBody(body *ListenBadRequestResponseBody) (err error)
- func ValidateListenForbiddenResponseBody(body *ListenForbiddenResponseBody) (err error)
- func ValidateListenNotFoundResponseBody(body *ListenNotFoundResponseBody) (err error)
- func ValidateSeenBadRequestResponseBody(body *SeenBadRequestResponseBody) (err error)
- func ValidateSeenForbiddenResponseBody(body *SeenForbiddenResponseBody) (err error)
- func ValidateSeenNotFoundResponseBody(body *SeenNotFoundResponseBody) (err error)
- type Client
- type ConnConfigurer
- type ListenBadRequestResponseBody
- type ListenClientStream
- type ListenForbiddenResponseBody
- type ListenNotFoundResponseBody
- type ListenUnauthorizedResponseBody
- type SeenBadRequestResponseBody
- type SeenForbiddenResponseBody
- type SeenNotFoundResponseBody
- type SeenRequestBody
- type SeenUnauthorizedResponseBody
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildSeenPayload ¶
func BuildSeenPayload(notificationsSeenBody string, notificationsSeenAuth string) (*notifications.SeenPayload, error)
BuildSeenPayload builds the payload for the notifications seen endpoint from CLI flags.
func DecodeListenResponse ¶
func DecodeListenResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
DecodeListenResponse returns a decoder for responses returned by the notifications listen endpoint. restoreBody controls whether the response body should be restored after having been read. DecodeListenResponse may return the following errors:
- "forbidden" (type *goa.ServiceError): http.StatusForbidden
- "not-found" (type *goa.ServiceError): http.StatusNotFound
- "bad-request" (type *goa.ServiceError): http.StatusBadRequest
- "unauthorized" (type notifications.Unauthorized): http.StatusUnauthorized
- error: internal error
func DecodeSeenResponse ¶
func DecodeSeenResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
DecodeSeenResponse returns a decoder for responses returned by the notifications seen endpoint. restoreBody controls whether the response body should be restored after having been read. DecodeSeenResponse may return the following errors:
- "forbidden" (type *goa.ServiceError): http.StatusForbidden
- "not-found" (type *goa.ServiceError): http.StatusNotFound
- "bad-request" (type *goa.ServiceError): http.StatusBadRequest
- "unauthorized" (type notifications.Unauthorized): http.StatusUnauthorized
- error: internal error
func EncodeSeenRequest ¶
func EncodeSeenRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error
EncodeSeenRequest returns an encoder for requests sent to the notifications seen server.
func ListenNotificationsPath ¶
func ListenNotificationsPath() string
ListenNotificationsPath returns the URL path to the notifications service listen HTTP endpoint.
func NewListenBadRequest ¶
func NewListenBadRequest(body *ListenBadRequestResponseBody) *goa.ServiceError
NewListenBadRequest builds a notifications service listen endpoint bad-request error.
func NewListenForbidden ¶
func NewListenForbidden(body *ListenForbiddenResponseBody) *goa.ServiceError
NewListenForbidden builds a notifications service listen endpoint forbidden error.
func NewListenNotFound ¶
func NewListenNotFound(body *ListenNotFoundResponseBody) *goa.ServiceError
NewListenNotFound builds a notifications service listen endpoint not-found error.
func NewListenUnauthorized ¶
func NewListenUnauthorized(body ListenUnauthorizedResponseBody) notifications.Unauthorized
NewListenUnauthorized builds a notifications service listen endpoint unauthorized error.
func NewSeenBadRequest ¶
func NewSeenBadRequest(body *SeenBadRequestResponseBody) *goa.ServiceError
NewSeenBadRequest builds a notifications service seen endpoint bad-request error.
func NewSeenForbidden ¶
func NewSeenForbidden(body *SeenForbiddenResponseBody) *goa.ServiceError
NewSeenForbidden builds a notifications service seen endpoint forbidden error.
func NewSeenNotFound ¶
func NewSeenNotFound(body *SeenNotFoundResponseBody) *goa.ServiceError
NewSeenNotFound builds a notifications service seen endpoint not-found error.
func NewSeenUnauthorized ¶
func NewSeenUnauthorized(body SeenUnauthorizedResponseBody) notifications.Unauthorized
NewSeenUnauthorized builds a notifications service seen endpoint unauthorized error.
func SeenNotificationsPath ¶
func SeenNotificationsPath() string
SeenNotificationsPath returns the URL path to the notifications service seen HTTP endpoint.
func ValidateListenBadRequestResponseBody ¶
func ValidateListenBadRequestResponseBody(body *ListenBadRequestResponseBody) (err error)
ValidateListenBadRequestResponseBody runs the validations defined on listen_bad-request_response_body
func ValidateListenForbiddenResponseBody ¶
func ValidateListenForbiddenResponseBody(body *ListenForbiddenResponseBody) (err error)
ValidateListenForbiddenResponseBody runs the validations defined on listen_forbidden_response_body
func ValidateListenNotFoundResponseBody ¶
func ValidateListenNotFoundResponseBody(body *ListenNotFoundResponseBody) (err error)
ValidateListenNotFoundResponseBody runs the validations defined on listen_not-found_response_body
func ValidateSeenBadRequestResponseBody ¶
func ValidateSeenBadRequestResponseBody(body *SeenBadRequestResponseBody) (err error)
ValidateSeenBadRequestResponseBody runs the validations defined on seen_bad-request_response_body
func ValidateSeenForbiddenResponseBody ¶
func ValidateSeenForbiddenResponseBody(body *SeenForbiddenResponseBody) (err error)
ValidateSeenForbiddenResponseBody runs the validations defined on seen_forbidden_response_body
func ValidateSeenNotFoundResponseBody ¶
func ValidateSeenNotFoundResponseBody(body *SeenNotFoundResponseBody) (err error)
ValidateSeenNotFoundResponseBody runs the validations defined on seen_not-found_response_body
Types ¶
type Client ¶
type Client struct { // Listen Doer is the HTTP client used to make requests to the listen endpoint. ListenDoer goahttp.Doer // Seen Doer is the HTTP client used to make requests to the seen endpoint. SeenDoer goahttp.Doer // CORS Doer is the HTTP client used to make requests to the endpoint. CORSDoer goahttp.Doer // RestoreResponseBody controls whether the response bodies are reset after // decoding so they can be read again. RestoreResponseBody bool // contains filtered or unexported fields }
Client lists the notifications service endpoint HTTP clients.
func NewClient ¶
func NewClient( scheme string, host string, doer goahttp.Doer, enc func(*http.Request) goahttp.Encoder, dec func(*http.Response) goahttp.Decoder, restoreBody bool, dialer goahttp.Dialer, cfn *ConnConfigurer, ) *Client
NewClient instantiates HTTP clients for all the notifications service servers.
func (*Client) BuildListenRequest ¶
BuildListenRequest instantiates a HTTP request object with method and path set to call the "notifications" service "listen" endpoint
func (*Client) BuildSeenRequest ¶
BuildSeenRequest instantiates a HTTP request object with method and path set to call the "notifications" service "seen" endpoint
type ConnConfigurer ¶
type ConnConfigurer struct {
ListenFn goahttp.ConnConfigureFunc
}
ConnConfigurer holds the websocket connection configurer functions for the streaming endpoints in "notifications" service.
func NewConnConfigurer ¶
func NewConnConfigurer(fn goahttp.ConnConfigureFunc) *ConnConfigurer
NewConnConfigurer initializes the websocket connection configurer function with fn for all the streaming endpoints in "notifications" service.
type ListenBadRequestResponseBody ¶
type ListenBadRequestResponseBody struct { // Name is the name of this class of errors. Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` // ID is a unique identifier for this particular occurrence of the problem. ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` // Message is a human-readable explanation specific to this occurrence of the // problem. Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` // Is the error temporary? Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"` // Is the error a timeout? Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"` // Is the error a server-side fault? Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"` }
ListenBadRequestResponseBody is the type of the "notifications" service "listen" endpoint HTTP response body for the "bad-request" error.
type ListenClientStream ¶
type ListenClientStream struct {
// contains filtered or unexported fields
}
ListenClientStream implements the notifications.ListenClientStream interface.
func (*ListenClientStream) Close ¶
func (s *ListenClientStream) Close() error
Close closes the "listen" endpoint websocket connection.
func (*ListenClientStream) Recv ¶
func (s *ListenClientStream) Recv() (map[string]interface{}, error)
Recv reads instances of "map[string]interface{}" from the "listen" endpoint websocket connection.
func (*ListenClientStream) Send ¶
func (s *ListenClientStream) Send(v map[string]interface{}) error
Send streams instances of "map[string]interface{}" to the "listen" endpoint websocket connection.
type ListenForbiddenResponseBody ¶
type ListenForbiddenResponseBody struct { // Name is the name of this class of errors. Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` // ID is a unique identifier for this particular occurrence of the problem. ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` // Message is a human-readable explanation specific to this occurrence of the // problem. Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` // Is the error temporary? Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"` // Is the error a timeout? Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"` // Is the error a server-side fault? Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"` }
ListenForbiddenResponseBody is the type of the "notifications" service "listen" endpoint HTTP response body for the "forbidden" error.
type ListenNotFoundResponseBody ¶
type ListenNotFoundResponseBody struct { // Name is the name of this class of errors. Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` // ID is a unique identifier for this particular occurrence of the problem. ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` // Message is a human-readable explanation specific to this occurrence of the // problem. Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` // Is the error temporary? Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"` // Is the error a timeout? Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"` // Is the error a server-side fault? Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"` }
ListenNotFoundResponseBody is the type of the "notifications" service "listen" endpoint HTTP response body for the "not-found" error.
type ListenUnauthorizedResponseBody ¶
type ListenUnauthorizedResponseBody string
ListenUnauthorizedResponseBody is the type of the "notifications" service "listen" endpoint HTTP response body for the "unauthorized" error.
type SeenBadRequestResponseBody ¶
type SeenBadRequestResponseBody struct { // Name is the name of this class of errors. Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` // ID is a unique identifier for this particular occurrence of the problem. ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` // Message is a human-readable explanation specific to this occurrence of the // problem. Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` // Is the error temporary? Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"` // Is the error a timeout? Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"` // Is the error a server-side fault? Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"` }
SeenBadRequestResponseBody is the type of the "notifications" service "seen" endpoint HTTP response body for the "bad-request" error.
type SeenForbiddenResponseBody ¶
type SeenForbiddenResponseBody struct { // Name is the name of this class of errors. Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` // ID is a unique identifier for this particular occurrence of the problem. ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` // Message is a human-readable explanation specific to this occurrence of the // problem. Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` // Is the error temporary? Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"` // Is the error a timeout? Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"` // Is the error a server-side fault? Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"` }
SeenForbiddenResponseBody is the type of the "notifications" service "seen" endpoint HTTP response body for the "forbidden" error.
type SeenNotFoundResponseBody ¶
type SeenNotFoundResponseBody struct { // Name is the name of this class of errors. Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` // ID is a unique identifier for this particular occurrence of the problem. ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` // Message is a human-readable explanation specific to this occurrence of the // problem. Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` // Is the error temporary? Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"` // Is the error a timeout? Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"` // Is the error a server-side fault? Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"` }
SeenNotFoundResponseBody is the type of the "notifications" service "seen" endpoint HTTP response body for the "not-found" error.
type SeenRequestBody ¶
type SeenRequestBody struct {
Ids []int64 `form:"ids" json:"ids" xml:"ids"`
}
SeenRequestBody is the type of the "notifications" service "seen" endpoint HTTP request body.
func NewSeenRequestBody ¶
func NewSeenRequestBody(p *notifications.SeenPayload) *SeenRequestBody
NewSeenRequestBody builds the HTTP request body from the payload of the "seen" endpoint of the "notifications" service.
type SeenUnauthorizedResponseBody ¶
type SeenUnauthorizedResponseBody string
SeenUnauthorizedResponseBody is the type of the "notifications" service "seen" endpoint HTTP response body for the "unauthorized" error.