Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

foundationCommon

中文 | English

Anybackup Scenario Language

foundationCommon is a shared foundation module repository for Anybackup V9. It provides common frameworks, SDKs, and utility libraries for Go and Python, serving as the base capability layer for upper-level Anybackup services and plugins.

For the full project, visit the Anybackup main repository.

1. Overview

This repository is the foundation common module repository for the AnyBackup V9 project, providing common frameworks, SDKs, and utility libraries for Go and Python to support other business modules with underlying capabilities.

2. Project Structure

2.1 Repository Structure

foundationCommon/
├── go/                          # Go modules
│   ├── framework_*/             # Framework libraries
│   ├── service_*/               # Service modules
│   ├── app_*/                   # Application plugins
│   ├── greed/                   # Common utility library
│   ├── backup-core/             # Backup core library
│   └── flora_panzer_golanglog/  # Logging library
├── py/                          # Python modules
│   ├── framework_Common/        # Common Python module
│   ├── framework_i18n-sdk-py/   # i18n SDK
│   ├── abthrift/                # Thrift protocol definitions
│   └── buildframework/          # Build framework
├── scripts/                     # Scripts
├── README.md                    # English README
├── README.zh-CN.md              # Chinese README
├── LICENSE                      # License file
└── NOTICE                       # Notice file

2.2 Module Description

Go Framework Libraries

Module Path Description Module README
framework_gin go/framework_gin/ Gin Web Framework N/A
framework_xorm go/framework_xorm/ XORM Database ORM README_CN
framework_bbolt go/framework_bbolt/ BoltDB Embedded Database N/A
framework_gepms go/framework_gepms/ High-performance Network Library (gnet) N/A
framework_gmsm go/framework_gmsm/ Chinese Cryptographic Algorithms (SM2/SM3/SM4) N/A
framework_gotext go/framework_gotext/ Internationalization Library N/A
framework_hub go/framework_hub/ Pub/Sub Pattern Library N/A
framework_kmc-sdk go/framework_kmc-sdk/ KMC Encryption SDK N/A
framework_key-mgm go/framework_key-mgm/ Key Management Module N/A
framework_golight go/framework_golight/ Lightweight Framework N/A
framework_gomonkey go/framework_gomonkey/ Monkey Patching Library N/A
framework_nats.go go/framework_nats.go/ NATS Message Queue Client N/A
framework_gofpdf go/framework_gofpdf/ PDF Generation Library N/A
framework_wordZero go/framework_wordZero/ Word Document Processing Library README_ZH
framework_i18n-sdk-go go/framework_i18n-sdk-go/ Internationalization SDK (Go) N/A

Go Service Modules

Module Path Description Module README
service_resource-center_* go/service_resource-center_*/ Resource Center Services N/A
service_hyperbackup_* go/service_hyperbackup_*/ HyperBackup Services N/A
service_nats-server go/service_nats-server/ NATS Message Service N/A

Go Application Plugins

Module Path Description Module README
app_kubernetes_* go/app_kubernetes_*/ Kubernetes Plugins N/A
app_VMCommon_* go/app_VMCommon_*/ Virtual Machine Common Plugins N/A
app_dbhyperplugins_* go/app_dbhyperplugins_*/ Database Backup Plugins N/A
app_dataplatformhyperplugins_* go/app_dataplatformhyperplugins_*/ Data Platform Plugins N/A
app_activedirectory_* go/app_activedirectory_*/ Active Directory Plugins N/A
app_Exchange_* go/app_Exchange_*/ Exchange Plugins N/A
app_anyshare_* go/app_anyshare_*/ AnyShare Plugins N/A
app_onedrive_* go/app_onedrive_*/ OneDrive Plugins N/A
app_hosthyperplugins_* go/app_hosthyperplugins_*/ Host Backup Plugins N/A
app_MachineHyperPlugins_* go/app_MachineHyperPlugins_*/ Physical Machine Backup Plugins N/A
app_datamgmhyperplugins go/app_datamgmhyperplugins/ Data Management Plugins N/A

Go Common Utilities

Module Path Description Module README
greed go/greed/ Common Utility Library (Config, Log, Crypto, ETCD, Kafka, NATS, etc.) N/A
backup-core go/backup-core/ Backup Core Library N/A
flora_panzer_golanglog go/flora_panzer_golanglog/ Logging Library (logrus wrapper) N/A

Python Modules

Module Path Description Module README
framework_Common py/framework_Common/ Common Python Module with exception definitions, error codes, etc. N/A
framework_i18n-sdk-py py/framework_i18n-sdk-py/ Internationalization SDK with multi-language support N/A
abthrift py/abthrift/ Thrift Protocol Definitions with service interface definitions N/A

3. Requirements

Runtime Environment

This repository does not provide standalone services directly. It serves as a foundation library or dependency component for AnyBackup. The runtime requirements for each module are as follows:

  • Operating System: CentOS 7+ / Ubuntu 18.04+
  • CPU Architecture: x86_64 (amd64)
  • Go Runtime: Go 1.17+ (for components using Go modules)
  • Python Runtime: Python 3.6+ (for components using Python modules)

Development Environment

  • Operating System: CentOS 7+ / Ubuntu 18.04+ / Windows 10+ / macOS
  • Go Version: Go 1.17+
  • Python Version: Python 3.6+
  • Build Tools: make, cmake (Apollo build framework)
  • Package Managers: go mod, pip

4. Build Guide

Building Go Modules

Each Go module has a go.mod file and can be built directly:

cd go/<module_name>
go mod tidy
go build

Building Python Modules

Use the Apollo build framework:

cd py

# Build all modules
make build

# Build framework_Common
make build COMMON=1

# Package abthrift
make build THRIFT=1

# Clean build artifacts
make clean

Build artifacts location:

  • framework_Common: py/framework_Common/ci/package/Linux_el7_x64/Release/Common.tar.gz

5. Development Guide

Code Conventions

  • Go code follows Effective Go guidelines
  • Python code follows PEP 8 style guide
  • All source files must include copyright header

Adding New Modules

  1. Create a module folder in the appropriate directory
  2. Add go.mod (Go) or setup.py (Python)
  3. Update the module description table in this README

License

About

provides common frameworks, SDKs, and utility libraries for Go and Python, serving as the base capability layer for upper-level Anybackup services and plugins.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages