Skip to content

halon-extras/s3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

S3 Object Storage client

An S3 object storage client implementation written in HSL

Installation

Follow the instructions in our manual to add our package repository and then run the below command.

Ubuntu

apt-get install halon-extras-s3

RHEL

yum install halon-extras-s3

Exported functions

These functions needs to be imported from the extras://s3 module path.

s3_put($endpoint, $secretkey, $accesskey, $bucket, $name, $fp, $options = [])

Params

  • endpoint string - the endpoint (including https://)
  • secretkey string - the secretkey
  • accesskey string - the accesskey
  • bucket string - the bucket
  • name string - the name
  • fp File - the mail file
  • options array - an options array
    • http-background array - http-background options
      • id string - the http-background id

Returns

The s3_put functions returns the result of the http_background call.

Example (EOD)

import { s3_put } from "extras://s3";

echo s3_put(
            $endpoint,
            $secretkey,
            $accesskey,
            $bucket,
            "hello.txt",
            File::String("Hello World")
        );

s3_get($endpoint, $secretkey, $accesskey, $bucket, $name, $options = [])

Params

  • endpoint string - the endpoint (including https://)
  • secretkey string - the secretkey
  • accesskey string - the accesskey
  • bucket string - the bucket
  • name string - the name
  • options array - an options array
    • http-background array - http-background options
      • id string - the http-background id

Returns

The s3_get functions returns the result of the http_background call.

Example (EOD)

import { s3_get } from "extras://s3";

echo s3_get(
            $endpoint,
            $secretkey,
            $accesskey,
            $bucket,
            "hello.txt"
        );

s3_delete($endpoint, $secretkey, $accesskey, $bucket, $name, $options = [])

Params

  • endpoint string - the endpoint (including https://)
  • secretkey string - the secretkey
  • accesskey string - the accesskey
  • bucket string - the bucket
  • name string - the name
  • options array - an options array
    • http-background array - http-background options
      • id string - the http-background id

Returns

The s3_delete functions returns the result of the http_background call.

Example (EOD)

import { s3_delete } from "extras://s3";

echo s3_delete(
            $endpoint,
            $secretkey,
            $accesskey,
            $bucket,
            "hello.txt"
        );

About

A S3 Object Storage client

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors