Documentation ¶
Index ¶
- type AddUserToProjectRequest
- type CreateServiceAccountRequest
- type CreateServiceAccountResponse
- type DecryptSecretRequest
- type DecryptSecretResponse
- type DeleteServiceAccountRequest
- type GetProjectKeysReponse
- type HealthcheckResponse
- type ListProjectsResponse
- type LoginRequest
- type LoginResponse
- type NewProjectRequest
- type RegistrationRequest
- type RemoveUserFromProjectRequest
- type RotateKeyRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddUserToProjectRequest ¶
type AddUserToProjectRequest struct { Email string `json:"email"` PrivilegeLvl int `json:"privilege"` }
AddUserToProjectRequest is the expected payload for the user addition to project endpoint
func (*AddUserToProjectRequest) Validate ¶
func (a *AddUserToProjectRequest) Validate() error
Validate validates a user addition to project request
type CreateServiceAccountRequest ¶
type CreateServiceAccountRequest struct { ServiceAccountName string `json:"name"` PubKey string `json:"public_key"` }
CreateServiceAccountRequest is the expected payload for the service-account creation endpoint
func (*CreateServiceAccountRequest) Validate ¶
func (r *CreateServiceAccountRequest) Validate() error
Validate validates a service-account creation request
type CreateServiceAccountResponse ¶
type CreateServiceAccountResponse struct {
Token string `json:"token"`
}
CreateServiceAccountResponse is the response type of the service-account creation endpoint
type DecryptSecretRequest ¶
type DecryptSecretRequest struct {
Secret string `json:"secret"`
}
DecryptSecretRequest contains secret to decrypt
func (*DecryptSecretRequest) Validate ¶
func (a *DecryptSecretRequest) Validate() error
Validate validates a secret decryption request
type DecryptSecretResponse ¶
type DecryptSecretResponse struct {
Message string `json:"message"`
}
DecryptSecretResponse contains response message to a secret decryption request
type DeleteServiceAccountRequest ¶
type DeleteServiceAccountRequest struct {
ServiceAccountName string `json:"serviceAccountName"`
}
DeleteServiceAccountRequest is the expected payload for the service-account deletion endpoint
func (*DeleteServiceAccountRequest) Validate ¶
func (r *DeleteServiceAccountRequest) Validate() error
Validate validates a service-account deletion request
type GetProjectKeysReponse ¶
type GetProjectKeysReponse struct { Name string `json:"name"` MemberKeys []string `json:"member_keys"` ProjectKey string `json:"project_key"` DeployKeys []string `json:"deploy_keys"` }
GetProjectKeysReponse returns all the public key ids associated with a project
type HealthcheckResponse ¶
type HealthcheckResponse struct { Version string `json:"version,omitempty"` DeployTime string `json:"deployed_at"` }
HealthcheckResponse contains server health data
type ListProjectsResponse ¶
ListProjectsResponse is the response of the project list endpoint
type LoginRequest ¶
LoginRequest contains input for user login
func (*LoginRequest) Validate ¶
func (l *LoginRequest) Validate() error
Validate validates a login request payload
type LoginResponse ¶
type LoginResponse struct {
Token string `json:"token"`
}
LoginResponse contains the response to a login request
type NewProjectRequest ¶
type NewProjectRequest struct { Name string `json:"name"` Description string `json:"description"` KeyBits int `json:"bits"` }
NewProjectRequest is the expected payload for the of the project creation endpooint
func (*NewProjectRequest) Validate ¶
func (p *NewProjectRequest) Validate() error
Validate validates a project creation request
type RegistrationRequest ¶
type RegistrationRequest struct { Email string `json:"email"` Password string `json:"password"` PubKey string `json:"public_key"` }
RegistrationRequest contains input for user registration
func (*RegistrationRequest) Validate ¶
func (r *RegistrationRequest) Validate() error
Validate validates a registration request payload
type RemoveUserFromProjectRequest ¶
type RemoveUserFromProjectRequest struct {
Email string `json:"email"`
}
RemoveUserFromProjectRequest is the expected payload for the user removal from project endpoint
func (*RemoveUserFromProjectRequest) Validate ¶
func (a *RemoveUserFromProjectRequest) Validate() error
Validate validates a user removal from project request
type RotateKeyRequest ¶
type RotateKeyRequest struct {
PubKey string `json:"public_key"`
}
RotateKeyRequest contains input for key rotation
func (*RotateKeyRequest) Validate ¶
func (r *RotateKeyRequest) Validate() error
Validate validates a key rotation request