clients

package
v0.1.147 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2026 License: AGPL-3.0, AGPL-3.0-or-later Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// Presigned URL expiry times
	PresignUploadExpiry   = 15 * time.Minute // Upload URLs valid for 15 minutes
	PresignDownloadExpiry = 1 * time.Hour    // Download URLs valid for 1 hour
)

Variables

This section is empty.

Functions

func IsNotFoundError added in v0.1.103

func IsNotFoundError(err error) bool

Types

type AgentMailClient added in v0.1.96

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

func NewAgentMailClient added in v0.1.96

func NewAgentMailClient(cfg AgentMailConfig) *AgentMailClient

func (*AgentMailClient) CreateOrGetInbox added in v0.1.96

func (c *AgentMailClient) CreateOrGetInbox(ctx context.Context, params CreateInboxParams) (*AgentMailInbox, error)

CreateOrGetInbox creates an inbox, or returns the existing one if it already exists.

func (*AgentMailClient) DeleteInbox added in v0.1.96

func (c *AgentMailClient) DeleteInbox(ctx context.Context, inboxID string) error

func (*AgentMailClient) Domain added in v0.1.96

func (c *AgentMailClient) Domain() string

func (*AgentMailClient) GetInbox added in v0.1.96

func (c *AgentMailClient) GetInbox(ctx context.Context, inboxID string) (*AgentMailInbox, error)

func (*AgentMailClient) RegisterWebhook added in v0.1.96

func (c *AgentMailClient) RegisterWebhook(ctx context.Context, url string) error

RegisterWebhook idempotently registers a webhook for message.received events.

func (*AgentMailClient) SendMessage added in v0.1.96

func (c *AgentMailClient) SendMessage(ctx context.Context, inboxID string, params SendMessageParams) error

type AgentMailConfig added in v0.1.96

type AgentMailConfig struct {
	APIKey  string `key:"apiKey" json:"api_key"`
	BaseURL string `key:"baseUrl" json:"base_url"`
	Domain  string `key:"domain" json:"domain"`
}

func (AgentMailConfig) Enabled added in v0.1.96

func (c AgentMailConfig) Enabled() bool

type AgentMailInbox added in v0.1.96

type AgentMailInbox struct {
	PodID       string `json:"pod_id"`
	InboxID     string `json:"inbox_id"` // the email address (e.g. "agent@agentmail.to")
	DisplayName string `json:"display_name"`
	ClientID    string `json:"client_id"`
	CreatedAt   string `json:"created_at"`
	UpdatedAt   string `json:"updated_at"`
}

type CreateInboxParams added in v0.1.96

type CreateInboxParams struct {
	Username    string `json:"username,omitempty"`
	Domain      string `json:"domain,omitempty"`
	DisplayName string `json:"display_name,omitempty"`
	ClientID    string `json:"client_id,omitempty"`
}

type SendMessageParams added in v0.1.96

type SendMessageParams struct {
	To      string `json:"to"`
	Subject string `json:"subject"`
	Text    string `json:"text"`
}

type StorageClient

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

StorageClient manages S3 operations for workspace storage

func (*StorageClient) BucketExists

func (c *StorageClient) BucketExists(ctx context.Context, bucket string) (bool, error)

func (*StorageClient) BucketPrefix added in v0.1.32

func (c *StorageClient) BucketPrefix() string

BucketPrefix returns the configured bucket name prefix.

func (*StorageClient) Config

func (*StorageClient) CopyObject

func (c *StorageClient) CopyObject(ctx context.Context, srcBucket, srcKey, dstBucket, dstKey string) error

func (*StorageClient) CreateBucket

func (c *StorageClient) CreateBucket(ctx context.Context, bucket string) error

func (*StorageClient) CreateWorkspaceBucket

func (c *StorageClient) CreateWorkspaceBucket(ctx context.Context, workspaceExternalId string) (string, error)

func (*StorageClient) Delete

func (c *StorageClient) Delete(ctx context.Context, bucket, key string) error

func (*StorageClient) Download

func (c *StorageClient) Download(ctx context.Context, bucket, key string) ([]byte, error)

func (*StorageClient) Exists

func (c *StorageClient) Exists(ctx context.Context, bucket, key string) (bool, error)

func (*StorageClient) Head

func (c *StorageClient) Head(ctx context.Context, bucket, key string) (*s3.HeadObjectOutput, error)

func (*StorageClient) ListObjects

func (c *StorageClient) ListObjects(ctx context.Context, bucket, prefix string, maxKeys int32) (*s3.ListObjectsV2Output, error)

func (*StorageClient) PresignClient

func (c *StorageClient) PresignClient() *s3.PresignClient

func (*StorageClient) PresignDownload

func (c *StorageClient) PresignDownload(ctx context.Context, bucket, key string, expires time.Duration) (string, error)

func (*StorageClient) PresignUpload

func (c *StorageClient) PresignUpload(ctx context.Context, bucket, key, contentType string, expires time.Duration) (string, error)

func (*StorageClient) S3Client

func (c *StorageClient) S3Client() *s3.Client

func (*StorageClient) SetBucketCORS added in v0.1.96

func (c *StorageClient) SetBucketCORS(ctx context.Context, bucket string) error

func (*StorageClient) Upload

func (c *StorageClient) Upload(ctx context.Context, bucket, key string, data []byte) error

func (*StorageClient) WorkspaceBucketName

func (c *StorageClient) WorkspaceBucketName(workspaceExternalId string) string

Jump to

Keyboard shortcuts

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