Documentation
¶
Index ¶
- func BuildSeenPayload(notificationsSeenBody string, notificationsSeenAuth string) (*notifications.SeenPayload, error)
- func DecodeListenResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)
- func DecodeSeenResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)
- func EncodeSeenRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) 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) *goa.ServiceError
- func NewSeenBadRequest(body *SeenBadRequestResponseBody) *goa.ServiceError
- func NewSeenForbidden(body *SeenForbiddenResponseBody) *goa.ServiceError
- func NewSeenNotFound(body *SeenNotFoundResponseBody) *goa.ServiceError
- func NewSeenUnauthorized(body *SeenUnauthorizedResponseBody) *goa.ServiceError
- func SeenNotificationsPath() string
- func ValidateListenBadRequestResponseBody(body *ListenBadRequestResponseBody) (err error)
- func ValidateListenForbiddenResponseBody(body *ListenForbiddenResponseBody) (err error)
- func ValidateListenNotFoundResponseBody(body *ListenNotFoundResponseBody) (err error)
- func ValidateListenUnauthorizedResponseBody(body *ListenUnauthorizedResponseBody) (err error)
- func ValidateSeenBadRequestResponseBody(body *SeenBadRequestResponseBody) (err error)
- func ValidateSeenForbiddenResponseBody(body *SeenForbiddenResponseBody) (err error)
- func ValidateSeenNotFoundResponseBody(body *SeenNotFoundResponseBody) (err error)
- func ValidateSeenUnauthorizedResponseBody(body *SeenUnauthorizedResponseBody) (err error)
- type Client
- type ConnConfigurer
- type ListenBadRequestResponseBody
- type ListenClientStream
- func (s *ListenClientStream) Close() error
- func (s *ListenClientStream) Recv() (map[string]any, error)
- func (s *ListenClientStream) RecvWithContext(ctx context.Context) (map[string]any, error)
- func (s *ListenClientStream) Send(v map[string]any) error
- func (s *ListenClientStream) SendWithContext(ctx context.Context, v map[string]any) error
- 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) (any, 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:
- "unauthorized" (type *goa.ServiceError): http.StatusUnauthorized
- "forbidden" (type *goa.ServiceError): http.StatusForbidden
- "not-found" (type *goa.ServiceError): http.StatusNotFound
- "bad-request" (type *goa.ServiceError): http.StatusBadRequest
- error: internal error
func DecodeSeenResponse ¶
func DecodeSeenResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, 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:
- "unauthorized" (type *goa.ServiceError): http.StatusUnauthorized
- "forbidden" (type *goa.ServiceError): http.StatusForbidden
- "not-found" (type *goa.ServiceError): http.StatusNotFound
- "bad-request" (type *goa.ServiceError): http.StatusBadRequest
- error: internal error
func EncodeSeenRequest ¶
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) *goa.ServiceError
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) *goa.ServiceError
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 ValidateListenUnauthorizedResponseBody ¶
func ValidateListenUnauthorizedResponseBody(body *ListenUnauthorizedResponseBody) (err error)
ValidateListenUnauthorizedResponseBody runs the validations defined on listen_unauthorized_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
func ValidateSeenUnauthorizedResponseBody ¶
func ValidateSeenUnauthorizedResponseBody(body *SeenUnauthorizedResponseBody) (err error)
ValidateSeenUnauthorizedResponseBody runs the validations defined on seen_unauthorized_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]any, error)
Recv reads instances of "map[string]any" from the "listen" endpoint websocket connection.
func (*ListenClientStream) RecvWithContext ¶
RecvWithContext reads instances of "map[string]any" from the "listen" endpoint websocket connection with context.
func (*ListenClientStream) Send ¶
func (s *ListenClientStream) Send(v map[string]any) error
Send streams instances of "map[string]any" to the "listen" endpoint websocket connection.
func (*ListenClientStream) SendWithContext ¶
SendWithContext streams instances of "map[string]any" to the "listen" endpoint websocket connection with context.
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 struct {
Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
// problem.
Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
}
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 struct {
Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
// problem.
Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
}
SeenUnauthorizedResponseBody is the type of the "notifications" service "seen" endpoint HTTP response body for the "unauthorized" error.