OpenStack-SDK-Go/Architecture
This is a proposed architecture for the Go SDK.
Directory/Package Layout
- doc - contains documentation for the SDK. Not a Go package.
- [service] - The name of a service such as compute or identity.
- [version] - The implementation for a service would be in the version number directory.
- utils or misc - utility functionality.
The root directory for the project would be the openstack package implementing a wrapper/helper library. The idea is that you can use high level functionality to easily get to a service or you have low level access if that is needed.
openstack package
The top level package would have the ability to get easy access to a service. For example,
service := openstack.service('compute', 'region-name').(Compute)
In this case the openstack struct would retrieve Compute, using the service catalog name, for a particular region. From the service catalog it would know which version to retrieve.
Inside the the openstack struct would be a registry mapping services, version, and implementation. This can be overridden via extensions that are registered.