fsc

package
v0.0.0-...-4b1035e Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 10 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFileStoreApiService

func NewFileStoreApiService(conf *FileStoreApiConfig) *fileStoreApiService

Types

type FileDTO

type FileDTO struct {
	Id          string `json:"id"`
	FileName    string `json:"fileName"`
	MimeType    string `json:"mimeType"`
	Size        int64  `json:"size"`
	MetadataUrl string `json:"previewUrl"`
	DownloadUrl string `json:"downloadUrl"`
	CdnUrl      string `json:"cdnUrl"`
}

type FileStoreApiConfig

type FileStoreApiConfig struct {
	ApiPath string `env:"FILE_STORE_API,required" envDefault:""`
	ApiKey  string `env:"FILE_STORE_API_KEY,required" envDefault:""`
}

type FileStoreApiService

type FileStoreApiService interface {
	GetFile(tenantName, fileId string, span opentracing.Span) (*FileDTO, *[]byte, error)
	GetFileMetadata(tenantName, fileId string, span opentracing.Span) (*FileDTO, error)
	GetFileBytes(tenantName, fileId string, span opentracing.Span) (*[]byte, error)

	UploadSingleMultipartFile(tenantName, basePath string, multipartFileHeader *multipart.FileHeader, span opentracing.Span) (*FileDTO, error)
	UploadSingleFileBytes(tenantName, basePath, fileId, fileName string, fileBytes []byte, span opentracing.Span) (*FileDTO, error)
}

Jump to

Keyboard shortcuts

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