Commit a9d595ab authored by Lukas Burgey's avatar Lukas Burgey
Browse files

Add comment to exported types

parent 8ab551df
......@@ -2,12 +2,14 @@ package api
import "fmt"
// SSHKey describes an SSH public key, possibly with a local filepath.
type SSHKey struct {
Name string `json:"name"`
Key string `json:"key"`
File string
// Service is a FEUDAL service, for which the user can request a deployment.
type Service struct {
ID int `json:"id,omitempty"`
Name string `json:"name"`
......@@ -18,21 +20,24 @@ func (s Service) String() string {
return fmt.Sprintf("%s: %s", s.Name, s.Description)
// from the user
// Credential is a user provided credential.
type Credential struct {
ID int `json:"id,omitempty"`
Name string `json:"name"`
// CredentialState describes the state of an Credential.
type CredentialState struct {
State string `json:"state"`
Target string `json:"state_target"`
Credential Credential `json:"credential"`
// credentials from the client
// Credentials ifor the user as provided by the client.
type Credentials map[string]string
// A DepState describes the a state of a Deployment.
// We use it to check if the user is able to use the service already
type DepState struct {
ID int `json:"id,omitempty"`
State string `json:"state"`
......@@ -41,6 +46,7 @@ type DepState struct {
CredentialStates []CredentialState `json:"credential_states"`
// A Deployment is used to track the users deployment requests
type Deployment struct {
ID int `json:"id,omitempty"`
State string `json:"state"`
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment