Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Credential ¶
type Credential struct { ID int `json:"id,omitempty"` Type string `json:"type,omitempty"` Name string `json:"name"` Value string `json:"value"` }
Credential is currently a ssh key, but may be a password hash in the future
type Input ¶
type Input struct { // StateTarget is the state which is to be reached by this deployment task // StateTarget is either Deployed or NotDeployed StateTarget State `json:"state_target"` // User describes the user of this deployment task User User `json:"user"` // Credentials the credentials to deploy // maps the credential type to the according credentials // // This is now located in Input.User.Credentials // This field will therefore be removed in the future! Credentials UserCredentials `json:"credentials,omitempty"` // Questionnaire is an answered questionnaire // Maps a question name to the answer of the user // The keys (question names) *must* be identical to those of the Output.Questionnaire // containing the questions Questionnaire map[string]string `json:"questionnaire,omitempty"` }
Input of the deployment script
func UnmarshalInput ¶
UnmarshalInput decodes a json encoded input
type Output ¶
type Output struct { // State of the deployment, after the script execution // when State == Questionnaire then Output.Questionnaire *must* be set // when State == Deployed then Output.Credentials *can* be set State State `json:"state"` // Message for the user Msg string `json:"message"` // Questionnaire requested by the script // Ignored when State is not Questionnaire // Maps a question name to a description of the question Questionnaire map[string]string `json:"questionnaire,omitempty"` // Credentials for the user // Ignored when State is not Deployed // Maps a credential name to a credential value Credentials map[string]string `json:"credentials,omitempty"` // UserCredentialStates are the State s of the credentials found in Input.User.Credentials. // // This field is not mandatory. The client will assume that all credentials have the State // Output.State if this field is not given. UserCredentialStates UserCredentialStates `json:"user_credential_states,omitempty"` }
Output of the deployment script
func UnmarshalOutput ¶
UnmarshalOutput decodes a json encoded output
type State ¶
type State string
State is a string enum The enum values for State are listed below
const ( // Deployed value for State Deployed State = "deployed" // NotDeployed value for State NotDeployed State = "not_deployed" // Rejected value for State // the user can never be deployed Rejected State = "rejected" // Failed value for State // the deployment can be retried Failed State = "failed" // Questionnaire value for State // the user has to fill the questionnaire // with the questionnaire data the deployment can be retried Questionnaire State = "questionnaire" )
type User ¶
type User struct { UserInfo UserInfo `json:"userinfo"` Credentials UserCredentials `json:"credentials"` }
User contains information concerning the user of a deployment
type UserCredentialStates ¶
UserCredentialStates serves to inform the backend about the per credential states after the script run
type UserCredentials ¶
type UserCredentials map[string][]Credential
UserCredentials maps a credential type to the credentials of this type
Click to show internal directories.
Click to hide internal directories.