Skip to main content

qstashclient

import "github.com/Ask-Atlas/AskAtlas/api/internal/qstash"

Index

type Client

Client wraps the QStash SDK for publishing job messages.

type Client struct {
// contains filtered or unexported fields
}

func New

func New(token, jobBaseURL, env string) *Client

New creates a Client using the provided QStash token and base URL for job endpoints.

func (*Client) PublishDeleteFile

func (c *Client) PublishDeleteFile(ctx context.Context, msg DeleteFileMessage) (string, error)

PublishDeleteFile sends a delete-file message to QStash and returns the QStash message ID.

type DeleteFileMessage

DeleteFileMessage is the payload published to the delete-file job queue.

type DeleteFileMessage struct {
FileID string `json:"file_id"`
S3Key string `json:"s3_key"`
UserID string `json:"user_id"`
RequestedAt string `json:"requested_at"`
Environment string `json:"environment,omitempty"`
}

Generated by gomarkdoc