batch upload impl

This commit is contained in:
jay brown
2025-08-06 15:06:18 -07:00
parent fac5615c15
commit 7014fa790b
17 changed files with 1272 additions and 97 deletions
+36 -1
View File
@@ -1,6 +1,13 @@
package queryapi
import "log/slog"
import (
"context"
"io"
"log/slog"
"queryorchestration/internal/serviceconfig/aws"
"queryorchestration/internal/serviceconfig/objectstore"
)
// mockAuthConfig provides a minimal implementation of auth.ConfigProvider for testing
type mockAuthConfig struct{}
@@ -47,6 +54,34 @@ func (m *mockAuthConfig) InitializeAuthConfig(string, *slog.Logger) error { retu
func (m *mockAuthConfig) GetNoJWTValidation() bool { return false }
func (m *mockAuthConfig) SetNoJWTValidation(bool) {}
// Objectstore interface methods
func (m *mockAuthConfig) GetAWSKeyID() string { return "test-key" }
func (m *mockAuthConfig) SetAWSKeyID(string) {}
func (m *mockAuthConfig) GetAWSSecretKey() string { return "test-secret" }
func (m *mockAuthConfig) SetAWSSecretKey(string) {}
func (m *mockAuthConfig) GetAWSSessionToken() string { return "" }
func (m *mockAuthConfig) SetAWSSessionToken(string) {}
func (m *mockAuthConfig) GetAWSRegion() string { return "us-east-1" }
func (m *mockAuthConfig) SetAWSRegion(string) {}
func (m *mockAuthConfig) GetAWSEndpoint() string { return "http://localhost:4566" }
func (m *mockAuthConfig) SetAWSEndpoint(string) {}
func (m *mockAuthConfig) SetStoreClient(context.Context) error { return nil }
func (m *mockAuthConfig) SetStoreClientFromS3Cfg(objectstore.S3Client) {}
func (m *mockAuthConfig) SetStoreClientAndPingByName(context.Context, string) error { return nil }
func (m *mockAuthConfig) GetStoreClient() objectstore.S3Client { return nil }
func (m *mockAuthConfig) PingStoreByName(context.Context, string) error { return nil }
func (m *mockAuthConfig) SetS3Endpoint(string) {}
func (m *mockAuthConfig) GetS3Endpoint() string { return "http://localhost:4566" }
func (m *mockAuthConfig) SetS3UsePathStyle(bool) {}
func (m *mockAuthConfig) CalculateETag(context.Context, io.Reader) (string, error) {
return "test-etag", nil
}
func (m *mockAuthConfig) GetDirectoryPart(uint16, int64) uint16 { return 0 }
func (m *mockAuthConfig) GetBucket() string { return "test-bucket" }
func (m *mockAuthConfig) SetBucket(string) {}
func (m *mockAuthConfig) GetAWSProfile() aws.Profile { return aws.Profile("default") }
func (m *mockAuthConfig) SetAWSProfile(aws.Profile) {}
// NewTestControllers creates a Controllers instance for testing with a mock auth config
func NewTestControllers(services *Services) *Controllers {
return NewControllers(services, &mockAuthConfig{})