github.com/chnsz/golangsdk@v0.0.0-20240506093406-85a3fbfa605b/openstack/servicestage/v2/applications/results.go (about)

     1  package applications
     2  
     3  import "github.com/chnsz/golangsdk/pagination"
     4  
     5  // Application is the structure that represents the detail of the ServiceStage application.
     6  type Application struct {
     7  	// The application ID.
     8  	ID string `json:"id"`
     9  	// The application name.
    10  	Name string `json:"name"`
    11  	// The application description.
    12  	Description string `json:"description"`
    13  	// The creator.
    14  	Creator string `json:"creator"`
    15  	// Thec project ID.
    16  	ProjectId string `json:"project_id"`
    17  	// The enterprise project ID.
    18  	EnterpriseProjectId string `json:"enterprise_project_id"`
    19  	// The creation time.
    20  	CreatedAt int `json:"create_time"`
    21  	// The update time.
    22  	UpdatedAt int `json:"update_time"`
    23  	// Whether to enable the unified model.
    24  	UnifiedModel string `json:"unified_model"`
    25  }
    26  
    27  // ApplicationPage is a single page maximum result representing a query by offset page.
    28  type ApplicationPage struct {
    29  	pagination.OffsetPageBase
    30  }
    31  
    32  // ExtractApplications is a method to extract the list of application details for ServiceStage service.
    33  func ExtractApplications(r pagination.Page) ([]Application, error) {
    34  	var s []Application
    35  	r.(ApplicationPage).Result.ExtractIntoSlicePtr(&s, "applications")
    36  	return s, nil
    37  }
    38  
    39  // ConfigResp is the structure that represents all configurations in the specified environment.
    40  type ConfigResp struct {
    41  	// The application ID.
    42  	ApplicationId string `json:"application_id"`
    43  	// The environment ID.
    44  	EnvironmentId string `json:"environment_id"`
    45  	// The configurations of the application.
    46  	Configuration Configuration `json:"configuration"`
    47  }