Documentation
¶
Index ¶
- Constants
- func IsNotFoundError(err error) bool
- type AgentMailClient
- func (c *AgentMailClient) CreateOrGetInbox(ctx context.Context, params CreateInboxParams) (*AgentMailInbox, error)
- func (c *AgentMailClient) DeleteInbox(ctx context.Context, inboxID string) error
- func (c *AgentMailClient) Domain() string
- func (c *AgentMailClient) GetInbox(ctx context.Context, inboxID string) (*AgentMailInbox, error)
- func (c *AgentMailClient) RegisterWebhook(ctx context.Context, url string) error
- func (c *AgentMailClient) SendMessage(ctx context.Context, inboxID string, params SendMessageParams) error
- type AgentMailConfig
- type AgentMailInbox
- type CreateInboxParams
- type SendMessageParams
- type StorageClient
- func (c *StorageClient) BucketExists(ctx context.Context, bucket string) (bool, error)
- func (c *StorageClient) BucketPrefix() string
- func (c *StorageClient) Config() types.WorkspaceStorageConfig
- func (c *StorageClient) CopyObject(ctx context.Context, srcBucket, srcKey, dstBucket, dstKey string) error
- func (c *StorageClient) CreateBucket(ctx context.Context, bucket string) error
- func (c *StorageClient) CreateWorkspaceBucket(ctx context.Context, workspaceExternalId string) (string, error)
- func (c *StorageClient) Delete(ctx context.Context, bucket, key string) error
- func (c *StorageClient) Download(ctx context.Context, bucket, key string) ([]byte, error)
- func (c *StorageClient) Exists(ctx context.Context, bucket, key string) (bool, error)
- func (c *StorageClient) Head(ctx context.Context, bucket, key string) (*s3.HeadObjectOutput, error)
- func (c *StorageClient) ListObjects(ctx context.Context, bucket, prefix string, maxKeys int32) (*s3.ListObjectsV2Output, error)
- func (c *StorageClient) PresignClient() *s3.PresignClient
- func (c *StorageClient) PresignDownload(ctx context.Context, bucket, key string, expires time.Duration) (string, error)
- func (c *StorageClient) PresignUpload(ctx context.Context, bucket, key, contentType string, expires time.Duration) (string, error)
- func (c *StorageClient) S3Client() *s3.Client
- func (c *StorageClient) SetBucketCORS(ctx context.Context, bucket string) error
- func (c *StorageClient) Upload(ctx context.Context, bucket, key string, data []byte) error
- func (c *StorageClient) WorkspaceBucketName(workspaceExternalId string) string
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
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 CreateInboxParams ¶ added in v0.1.96
type SendMessageParams ¶ added in v0.1.96
type StorageClient ¶
type StorageClient struct {
// contains filtered or unexported fields
}
StorageClient manages S3 operations for workspace storage
func NewStorageClient ¶
func NewStorageClient(ctx context.Context, cfg types.WorkspaceStorageConfig) (*StorageClient, error)
func (*StorageClient) BucketExists ¶
func (*StorageClient) BucketPrefix ¶ added in v0.1.32
func (c *StorageClient) BucketPrefix() string
BucketPrefix returns the configured bucket name prefix.
func (*StorageClient) Config ¶
func (c *StorageClient) Config() types.WorkspaceStorageConfig
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 (*StorageClient) Delete ¶
func (c *StorageClient) Delete(ctx context.Context, bucket, key string) 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 (*StorageClient) PresignUpload ¶
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) WorkspaceBucketName ¶
func (c *StorageClient) WorkspaceBucketName(workspaceExternalId string) string
Click to show internal directories.
Click to hide internal directories.