Documentation
¶
Index ¶
Constants ¶
const APIName = "gram"
APIName is the name of the API as defined in the design.
const APIVersion = "0.0.1"
APIVersion is the version of the API as defined in the design.
const ServiceName = "external"
ServiceName is the name of the service as defined in the design. This is the same value that is set in the endpoint request contexts under the ServiceKey key.
Variables ¶
var MethodNames = [1]string{"receiveWorkOSWebhook"}
MethodNames lists the service method names as defined in the design. These are the same values that are set in the endpoint request contexts under the MethodKey key.
Functions ¶
func NewReceiveWorkOSWebhookEndpoint ¶
NewReceiveWorkOSWebhookEndpoint returns an endpoint function that calls the method "receiveWorkOSWebhook" of service "external".
Types ¶
type Client ¶
Client is the "external" service client.
func (*Client) ReceiveWorkOSWebhook ¶
func (c *Client) ReceiveWorkOSWebhook(ctx context.Context, p *ReceiveWorkOSWebhookPayload, req io.ReadCloser) (err error)
ReceiveWorkOSWebhook calls the "receiveWorkOSWebhook" endpoint of the "external" service.
type Endpoints ¶
Endpoints wraps the "external" service endpoints.
func NewEndpoints ¶
NewEndpoints wraps the methods of the "external" service with endpoints.
type ReceiveWorkOSWebhookPayload ¶
type ReceiveWorkOSWebhookPayload struct {
// WorkOS webhook signature header
WorkosSignature *string
}
ReceiveWorkOSWebhookPayload is the payload type of the external service receiveWorkOSWebhook method.
type ReceiveWorkOSWebhookRequestData ¶
type ReceiveWorkOSWebhookRequestData struct {
// Payload is the method payload.
Payload *ReceiveWorkOSWebhookPayload
// Body streams the HTTP request body.
Body io.ReadCloser
}
ReceiveWorkOSWebhookRequestData holds both the payload and the HTTP request body reader of the "receiveWorkOSWebhook" method.
type Service ¶
type Service interface {
// Receive and enqueue a WorkOS webhook event.
ReceiveWorkOSWebhook(context.Context, *ReceiveWorkOSWebhookPayload, io.ReadCloser) (err error)
}
Endpoints for external services to interact with gram.