Skip to content

Latest commit

 

History

History
58 lines (40 loc) · 2.18 KB

ARCHITECTURE.md

File metadata and controls

58 lines (40 loc) · 2.18 KB

Architecture

Knowing where to find things in the repo can be difficult. This document aims to help you find your way.

The cmd directory contains the source code for the CLI. The CLI is built using the cobra framework.

The CLI is split into several files:

The pkg directory contains the source code for the R2 package — the library enabling the CLI to communicate with R2.

  • pkg/client.go contains all R2 client-level operations (e.g. configuration, bucket creation, etc.)
  • pkg/bucket.go contains all bucket-level operations (e.g. listing objects, fetching objects, etc.)
  • pkg/helpers.go contains miscellaneous helper functions used throughout the CLI

The workflows directory contains the GitHub Actions workflows used for this repo.

The assets directory contains the assets used for the repo.

The install script is used to install the latest release of the CLI.

Thanks

Thanks to Alex Kladov for his blog post on the importance of having an ARCHITECTURE.md file.