Documentation ¶
Index ¶
- type AwsStorage
- func (awsStorage *AwsStorage) DownloadFile(ctx context.Context, folderPath string, fileName string, keyName eruaes.AesKey) (file []byte, err error)
- func (awsStorage *AwsStorage) Init(ctx context.Context) (err error)
- func (awsStorage *AwsStorage) MakeFromJson(ctx context.Context, rj *json.RawMessage) error
- func (awsStorage *AwsStorage) UploadFile(ctx context.Context, file multipart.File, header *multipart.FileHeader, ...) (docId string, err error)
- func (awsStorage *AwsStorage) UploadFileB64(ctx context.Context, file []byte, fileName string, docType string, ...) (docId string, err error)
- type GcpStorage
- func (gcpStorage *GcpStorage) DownloadFile(ctx context.Context, folderPath string, fileName string, keyName eruaes.AesKey) (file []byte, err error)
- func (gcpStorage *GcpStorage) Init(ctx context.Context) error
- func (gcpStorage *GcpStorage) MakeFromJson(ctx context.Context, rj *json.RawMessage) error
- func (gcpStorage *GcpStorage) UploadFile(ctx context.Context, file multipart.File, header *multipart.FileHeader, ...) (docId string, err error)
- func (gcpStorage *GcpStorage) UploadFileB64(ctx context.Context, file []byte, fileName string, docType string, ...) (docId string, err error)
- type Storage
- type StorageI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AwsStorage ¶
type AwsStorage struct { Storage Region string `json:"region" eru:"required"` BucketName string `json:"bucket_name" eru:"required"` Authentication string `json:"authentication" eru:"required"` Key string `json:"key" eru:"required"` Secret string `json:"secret" eru:"required"` // contains filtered or unexported fields }
func (*AwsStorage) DownloadFile ¶
func (*AwsStorage) MakeFromJson ¶
func (awsStorage *AwsStorage) MakeFromJson(ctx context.Context, rj *json.RawMessage) error
func (*AwsStorage) UploadFile ¶
type GcpStorage ¶
type GcpStorage struct {
Storage
}
func (*GcpStorage) DownloadFile ¶
func (*GcpStorage) MakeFromJson ¶
func (gcpStorage *GcpStorage) MakeFromJson(ctx context.Context, rj *json.RawMessage) error
func (*GcpStorage) UploadFile ¶
type Storage ¶
type Storage struct { StorageType string `json:"storage_type" eru:"required"` StorageName string `json:"storage_name" eru:"required"` EncryptFiles bool `json:"encrypt_files" eru:"required"` KeyPair string `json:"key_pair" eru:"required"` }
func (*Storage) GetAttribute ¶
type StorageI ¶
type StorageI interface { UploadFile(ctx context.Context, file multipart.File, header *multipart.FileHeader, docType string, folderPath string, keyName eruaes.AesKey) (docId string, err error) UploadFileB64(ctx context.Context, file []byte, fileName string, docType string, folderPath string, keyName eruaes.AesKey) (docId string, err error) DownloadFile(ctx context.Context, folderPath string, fileName string, keyName eruaes.AesKey) (file []byte, err error) GetAttribute(attributeName string) (attributeValue interface{}, err error) MakeFromJson(ctx context.Context, rj *json.RawMessage) error Init(ctx context.Context) error }
func GetStorage ¶
Click to show internal directories.
Click to hide internal directories.