dev-docs: Go package docs (#958)

* Remove unused package

* Add Go package docs to most packages

Signed-off-by: Daniel Weiße <dw@edgeless.systems>
Signed-off-by: Fabian Kammel <fk@edgeless.systems>
Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
Co-authored-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
Co-authored-by: Fabian Kammel <fk@edgeless.systems>
This commit is contained in:
Daniel Weiße 2023-01-19 15:57:50 +01:00 committed by GitHub
parent b7740723ac
commit 690b50b29d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
118 changed files with 735 additions and 750 deletions

View file

@ -4,6 +4,11 @@ Copyright (c) Edgeless Systems GmbH
SPDX-License-Identifier: AGPL-3.0-only
*/
/*
Package cmd is the entrypoint of the Constellation CLI.
Business logic of the CLI shall be implemented in the internal/cmd package.
*/
package cmd
import (

View file

@ -0,0 +1,22 @@
/*
Copyright (c) Edgeless Systems GmbH
SPDX-License-Identifier: AGPL-3.0-only
*/
/*
Package cloudcmd provides executable command for the CLI.
This package focuses on the interaction with the cloud provider.
It separates the cloud provider specific code from the rest of the CLI, and
provides a common interface for all cloud providers.
Exported functions must not be cloud provider specific, but rather take a
cloudprovider.Provider as an argument.
User interaction happens in the cmd package, and should not happen or pass through
this package.
The backend to this package is currently provided by the terraform package.
*/
package cloudcmd

12
cli/internal/cmd/cmd.go Normal file
View file

@ -0,0 +1,12 @@
/*
Copyright (c) Edgeless Systems GmbH
SPDX-License-Identifier: AGPL-3.0-only
*/
/*
Package cmd provides the Constellation CLI.
It is responsible for the interaction with the user.
*/
package cmd

View file

@ -4,6 +4,11 @@ Copyright (c) Edgeless Systems GmbH
SPDX-License-Identifier: AGPL-3.0-only
*/
/*
Package image provides helping wrappers around a versionsapi fetcher.
It also enables local image overrides and download of raw images.
*/
package image
import (

View file

@ -4,6 +4,7 @@ Copyright (c) Edgeless Systems GmbH
SPDX-License-Identifier: AGPL-3.0-only
*/
// Package libvirt is used to start and stop containerized libvirt instances.
package libvirt
import (

View file

@ -4,6 +4,14 @@ Copyright (c) Edgeless Systems GmbH
SPDX-License-Identifier: AGPL-3.0-only
*/
/*
Package terraform handles creation/destruction of a Constellation cluster using Terraform.
Since Terraform does not provide a stable Go API, we use the `terraform-exec` package to interact with Terraform.
The Terraform templates are located in the "terraform" subdirectory. The templates are embedded into the CLI binary using `go:embed`.
On use the relevant template is extracted to the working directory and the user customized variables are written to a `terraform.tfvars` file.
*/
package terraform
import (