Skip to content

Commit

Permalink
Fix remaining linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
AkshaySainiDell committed Apr 25, 2024
1 parent b2216d5 commit 4029c29
Show file tree
Hide file tree
Showing 5 changed files with 111 additions and 3 deletions.
5 changes: 5 additions & 0 deletions service.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ func (gc *GatewayClient) DeployService(deploymentName, deploymentDesc, serviceTe
return &deploymentResponse, nil
}

// UpdateService updates an existing service in the ScaleIO Gateway.
func (gc *GatewayClient) UpdateService(deploymentID, deploymentName, deploymentDesc, nodes, nodename string) (*types.ServiceResponse, error) {
defer TimeSpent("UpdateService", time.Now())

Expand Down Expand Up @@ -433,6 +434,7 @@ func contains(list []string, str string) bool {
return false
}

// GetServiceDetailsByID retrieves service details by deployment ID.
func (gc *GatewayClient) GetServiceDetailsByID(deploymentID string, newToken bool) (*types.ServiceResponse, error) {
defer TimeSpent("GetServiceDetailsByID", time.Now())

Expand Down Expand Up @@ -525,6 +527,7 @@ func (gc *GatewayClient) GetServiceDetailsByID(deploymentID string, newToken boo
return &deploymentResponse, nil
}

// GetServiceDetailsByFilter retrieves service details based on a filter and value.
func (gc *GatewayClient) GetServiceDetailsByFilter(filter, value string) ([]types.ServiceResponse, error) {
defer TimeSpent("GetServiceDetailsByFilter", time.Now())

Expand Down Expand Up @@ -572,6 +575,7 @@ func (gc *GatewayClient) GetServiceDetailsByFilter(filter, value string) ([]type
return deploymentResponse, nil
}

// GetAllServiceDetails retrieves all service details from the GatewayClient.
func (gc *GatewayClient) GetAllServiceDetails() ([]types.ServiceResponse, error) {
defer TimeSpent("DeploGetServiceDetailsByIDyService", time.Now())

Expand Down Expand Up @@ -611,6 +615,7 @@ func (gc *GatewayClient) GetAllServiceDetails() ([]types.ServiceResponse, error)
return deploymentResponse, nil
}

// DeleteService deletes a service by its ID, along with servers in inventory and managed state.
func (gc *GatewayClient) DeleteService(serviceID, serversInInventory, serversManagedState string) (*types.ServiceResponse, error) {
var deploymentResponse types.ServiceResponse

Expand Down
3 changes: 3 additions & 0 deletions types/v1/serviceTypes.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package goscaleio

// ServiceFailedResponse represents the response when a service fails.
type ServiceFailedResponse struct {
DetailMessage string `json:"detailMessage,omitempty"`
Status int `json:"status,omitempty"`
Expand All @@ -10,6 +11,7 @@ type ServiceFailedResponse struct {
Messages []Messages `json:"messages,omitempty"`
}

// DeploymentPayload represents the payload for deploying a service.
type DeploymentPayload struct {
DeploymentName string `json:"deploymentName,omitempty"`
DeploymentDescription string `json:"deploymentDescription,omitempty"`
Expand All @@ -19,6 +21,7 @@ type DeploymentPayload struct {
Status string `json:"status,omitempty"`
}

// ServiceResponse represents the response from a service operation.
type ServiceResponse struct {
ID string `json:"id,omitempty"`
DeploymentName string `json:"deploymentName,omitempty"`
Expand Down
Loading

0 comments on commit 4029c29

Please sign in to comment.