package gapi-ocaml

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module GapiMediaResourceSource

Sourcetype destination =
  1. | TargetFile of string
  2. | StringBuffer of Buffer.t
  3. | ArrayBuffer of (char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t
Sourcetype download = {
  1. destination : destination;
  2. range_spec : string;
}
Sourceval range_spec : (download, string) GapiLens.t
Sourceval create_out_channel : download -> Netchannels.out_obj_channel
Sourceval create_in_channel : ?discard_on_close:bool -> download -> Netchannels.in_obj_channel
Sourceval generate_download_headers : download -> GapiCore.Header.t list
Sourceval generate_range_spec : (int64 option * int64 option) list -> string
Sourcetype source =
  1. | File of string
  2. | String of string
  3. | Buffer of (char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t
Sourcetype t = {
  1. source : source;
  2. name : string;
  3. content_type : string;
  4. content_length : int64;
}
Sourceval source : (t, source) GapiLens.t
Sourceval name : (t, string) GapiLens.t
Sourceval content_type : (t, string) GapiLens.t
Sourceval content_length : (t, int64) GapiLens.t
Sourcetype state =
  1. | Request
  2. | Uploading
  3. | Done
  4. | Error
Sourcetype upload_state = {
  1. state : state;
  2. resource : t;
  3. chunk_size : int;
  4. current_offset : int64;
}
Sourceval resource : (upload_state, t) GapiLens.t
Sourceval chunk_size : (upload_state, int) GapiLens.t
Sourceval current_offset : (upload_state, int64) GapiLens.t
Sourceval create_file_resource : ?content_type:string -> string -> t
Sourceval setup_upload : ?chunk_size:int -> t -> upload_state
Sourceval setup_file_upload : ?chunk_size:int -> string -> upload_state
Sourceval generate_upload_headers : GapiCore.HttpMethod.t -> upload_state -> GapiCore.Header.t list
Sourceval update_upload_state : string -> upload_state -> upload_state