Documentation ¶
Index ¶
- Constants
- func GCSClient(ctx context.Context) (*storage.Client, error)
- type ServiceUploadImpl
- func (s ServiceUploadImpl) FindUploadByID(ctx context.Context, id string) (*profileutils.Upload, error)
- func (s ServiceUploadImpl) FirestoreClient() *firestore.Client
- func (s ServiceUploadImpl) StorageClient() *storage.Client
- func (s ServiceUploadImpl) Upload(ctx context.Context, inp profileutils.UploadInput) (*profileutils.Upload, error)
- type ServiceUploads
Constants ¶
View Source
const ( BucketNameBase = "healthcloud_bewell_api_gateway_uploads" BucketLocation = "EU" UploadFirestoreCollectionName = "uploads" )
Constants used to save and retrieve upload content
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ServiceUploadImpl ¶
type ServiceUploadImpl struct {
// contains filtered or unexported fields
}
ServiceUploadImpl is an upload service
func NewUploadsService ¶
func NewUploadsService() *ServiceUploadImpl
NewUploadsService initializes an upload service
func (ServiceUploadImpl) FindUploadByID ¶
func (s ServiceUploadImpl) FindUploadByID( ctx context.Context, id string, ) (*profileutils.Upload, error)
FindUploadByID retrieves an upload by it's ID
func (ServiceUploadImpl) FirestoreClient ¶
func (s ServiceUploadImpl) FirestoreClient() *firestore.Client
FirestoreClient returns the upload service's Firebase Firestore client
func (ServiceUploadImpl) StorageClient ¶
func (s ServiceUploadImpl) StorageClient() *storage.Client
StorageClient returns the upload service's Google Cloud Storage Client
func (ServiceUploadImpl) Upload ¶
func (s ServiceUploadImpl) Upload( ctx context.Context, inp profileutils.UploadInput, ) (*profileutils.Upload, error)
Upload uploads the file to cloud storage
type ServiceUploads ¶
type ServiceUploads interface { Upload( ctx context.Context, inp profileutils.UploadInput, ) (*profileutils.Upload, error) FindUploadByID( ctx context.Context, id string, ) (*profileutils.Upload, error) }
ServiceUploads ...
Click to show internal directories.
Click to hide internal directories.