junobuild_storage::strategies

Trait StorageUploadStrategy

Source
pub trait StorageUploadStrategy {
    // Required methods
    fn insert_asset_encoding(
        &self,
        full_path: &FullPath,
        encoding_type: &EncodingType,
        encoding: &AssetEncoding,
        asset: &mut Asset,
        rule: &Rule,
    );
    fn insert_asset(
        &self,
        batch: &Batch,
        asset: &Asset,
        rule: &Rule,
    ) -> Result<(), String>;
    fn get_asset(
        &self,
        reference_id: &Option<ReferenceId>,
        collection: &CollectionKey,
        full_path: &FullPath,
        rule: &Rule,
    ) -> Result<Option<Asset>, String>;
}

Required Methods§

Source

fn insert_asset_encoding( &self, full_path: &FullPath, encoding_type: &EncodingType, encoding: &AssetEncoding, asset: &mut Asset, rule: &Rule, )

Source

fn insert_asset( &self, batch: &Batch, asset: &Asset, rule: &Rule, ) -> Result<(), String>

Source

fn get_asset( &self, reference_id: &Option<ReferenceId>, collection: &CollectionKey, full_path: &FullPath, rule: &Rule, ) -> Result<Option<Asset>, String>

Implementors§