Skip to content

Support lib for applications relying on GCP Cloud Storage

License

Notifications You must be signed in to change notification settings

extenda/hiiretail-gcp-storage-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Extenda Hii Retail GCP Storage client

A Google Cloud Platform Storage client implemented for JDK 21+ (Virtual threads).

Quality Gate Status Coverage Code Smells

🔩 Configuration

The library supports changing these settings, via environmental variables:

  • SERVICE_PROJECT_ID

    The value of your GCP project id. Using test-project if not set.

  • STORAGE_EMULATOR_HOST

    The host url to the emulator. Can also be set as system property, e.g. in tests.

Docker compose example

services:
  cloudstorage:
    image: oittaa/gcp-storage-emulator
    command: >
      start
        --default-bucket=test-bucket
        --host 0.0.0.0
        --port 9023
    environment:
      STORAGE_DIR: cloudstorage
    volumes:
      - ./cloudstorage:/cloudstorage
    ports:
      - "9023:9023"

📔 Usage

<dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>com.google.cloud</groupId>
      <artifactId>libraries-bom</artifactId>
      <version>${version.google-cloud}</version>
      <type>pom</type>
      <scope>import</scope>
    </dependency>
  </dependencies>
</dependencyManagement>

<dependencies>
  <dependency>
    <groupId>com.google.cloud</groupId>
    <artifactId>google-cloud-storage</artifactId>
  </dependency>
</dependencies>

The library uses SLF4J as logging API, so make sure you have log4j[2] or logback or other compatible implementation on the classpath.

📜 Usage

TBD

🔧 Local development environment

  • JDK 21+
  • Python / pre-commit

Building

$ mvn clean package
$ mvn verify

Install and run the pre-commit hooks before you submit code:

$ pre-commit install -t pre-commit -t commit-msg

💁 Contribution

Contributions to the project are welcome, but must adhere to a few guidelines:

  • Conventional commits should be followed
  • Install and use a editorconfig plugin to use the project supplied settings

About

Support lib for applications relying on GCP Cloud Storage

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages