Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultBucketName = "terrarium-modules" DefaultStorageServiceDefaultEndpoint = "storage:3001" DefaultChunkSize int64 = 64 * 1024 // 64 KB )
Variables ¶
View Source
var ( BucketName = DefaultBucketName StorageServiceEndpoint = DefaultStorageServiceDefaultEndpoint ChunkSize = DefaultChunkSize SourceZipUploaded = &terrarium.Response{Message: "Source zip uploaded successfully."} BucketInitializationError = status.Error(codes.Unknown, "Failed to initialize bucket for storage.") UploadSourceZipError = status.Error(codes.Unknown, "Failed to upload source zip.") RecieveSourceZipError = status.Error(codes.Unknown, "Failed to recieve source zip.") DownloadSourceZipError = status.Error(codes.Unknown, "Failed to download source zip.") SendSourceZipError = status.Error(codes.Unknown, "Failed to send source zip.") ContentLenghtError = status.Error(codes.Unknown, "Failed to read correct content lenght.") )
Functions ¶
This section is empty.
Types ¶
type StorageService ¶
type StorageService struct { services.UnimplementedStorageServer Client storage.AWSS3BucketClient BucketName string Region string }
func (*StorageService) DownloadSourceZip ¶
func (s *StorageService) DownloadSourceZip(request *terrarium.DownloadSourceZipRequest, server services.Storage_DownloadSourceZipServer) error
Download Source Zip from storage
func (*StorageService) RegisterWithServer ¶
func (s *StorageService) RegisterWithServer(grpcServer grpc.ServiceRegistrar) error
Registers StorageService with grpc server
func (*StorageService) UploadSourceZip ¶
func (s *StorageService) UploadSourceZip(server services.Storage_UploadSourceZipServer) error
Upload Source Zip to storage
Click to show internal directories.
Click to hide internal directories.