pub struct VideoHandler {
pub config: Config,
pub gcs: GcsClient,
pub http: Client,
pub auth: AuthProvider,
}Expand description
Video generation handler.
Handles video generation requests using the Vertex AI Veo API.
Fields§
§config: ConfigApplication configuration.
gcs: GcsClientGCS client for storage operations.
http: ClientHTTP client for API requests.
auth: AuthProviderAuthentication provider.
Implementations§
Source§impl VideoHandler
impl VideoHandler
Sourcepub async fn new(config: Config) -> Result<Self, Error>
pub async fn new(config: Config) -> Result<Self, Error>
Create a new VideoHandler with the given configuration.
§Errors
Returns an error if GCS client or auth provider initialization fails.
Sourcepub fn get_generate_endpoint(&self, model: &str) -> String
pub fn get_generate_endpoint(&self, model: &str) -> String
Get the Vertex AI Veo API endpoint for generating videos.
Sourcepub fn get_fetch_operation_endpoint(&self, model: &str) -> String
pub fn get_fetch_operation_endpoint(&self, model: &str) -> String
Get the endpoint for fetching LRO status.
Sourcepub async fn generate_video_t2v(
&self,
params: VideoT2vParams,
) -> Result<VideoGenerateResult, Error>
pub async fn generate_video_t2v( &self, params: VideoT2vParams, ) -> Result<VideoGenerateResult, Error>
Sourcepub async fn generate_video_i2v(
&self,
params: VideoI2vParams,
) -> Result<VideoGenerateResult, Error>
pub async fn generate_video_i2v( &self, params: VideoI2vParams, ) -> Result<VideoGenerateResult, Error>
Sourcepub async fn extend_video(
&self,
params: VideoExtendParams,
) -> Result<VideoGenerateResult, Error>
pub async fn extend_video( &self, params: VideoExtendParams, ) -> Result<VideoGenerateResult, Error>
Auto Trait Implementations§
impl Freeze for VideoHandler
impl !RefUnwindSafe for VideoHandler
impl Send for VideoHandler
impl Sync for VideoHandler
impl Unpin for VideoHandler
impl UnsafeUnpin for VideoHandler
impl !UnwindSafe for VideoHandler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request