Example Programs

OBS Go SDK provides abundant example programs for your reference and use. You can obtain example programs from the OBS Go SDK development package. For example, files in eSDK_Storage_OBS_<Version ID>_Go/src/examples obtained by decompressing eSDK_Storage_OBS_<Version ID>_Go.zip are example programs. Alternatively, you can click code package names provided in the following table to obtain corresponding example programs.

The following table lists the example programs.

Sample Code

Description

bucket_operations_sample

Shows how bucket-related APIs are used.

object_operations_sample

Shows how object-related APIs are used.

download_sample

Shows how an object is downloaded.

create_folder_sample

Shows how a folder is created.

delete_objects_sample

Shows how objects are deleted in batches.

list_objects_sample

Shows how objects are listed.

list_versions_sample

Shows how multiple object versions are listed.

list_objects_in_folder_sample

Shows how objects in a folder are listed.

object_meta_sample

Shows how object metadata is customized.

simple_multipart_upload_sample

Shows how multipart upload is performed.

restore_object_sample

Shows how Archive objects are downloaded.

concurrent_copy_part_sample

Shows how the parts of a large object are concurrently copied.

concurrent_download_object_sample

Shows how the parts of a large object are concurrently downloaded.

concurrent_upload_part_sample

Shows how the parts of a large object are concurrently uploaded.

temporary_signature_sample

Shows how URLs are used for temporary authentication.