bunnyshell.com/sdk@v0.16.0/docs/ComponentGitAPI.md (about)

     1  # \ComponentGitAPI
     2  
     3  All URIs are relative to *https://api.environments.bunnyshell.com*
     4  
     5  Method | HTTP request | Description
     6  ------------- | ------------- | -------------
     7  [**ComponentGitList**](ComponentGitAPI.md#ComponentGitList) | **Get** /v1/components/gitinfo | List git info for service components matching any selected filters
     8  [**ComponentGitView**](ComponentGitAPI.md#ComponentGitView) | **Get** /v1/components/{id}/gitinfo | View git info for a specific service component
     9  
    10  
    11  
    12  ## ComponentGitList
    13  
    14  > PaginatedComponentGitCollection ComponentGitList(ctx).Page(page).Organization(organization).Project(project).Environment(environment).Name(name).Repository(repository).Branch(branch).Execute()
    15  
    16  List git info for service components matching any selected filters
    17  
    18  
    19  
    20  ### Example
    21  
    22  ```go
    23  package main
    24  
    25  import (
    26      "context"
    27      "fmt"
    28      "os"
    29      openapiclient "bunnyshell.com/sdk"
    30  )
    31  
    32  func main() {
    33      page := int32(56) // int32 | The collection page number (optional) (default to 1)
    34      organization := "organization_example" // string | Filter by organization (optional)
    35      project := "project_example" // string | Filter by project (optional)
    36      environment := "environment_example" // string | Filter by environment (optional)
    37      name := "name_example" // string | Filter by name (optional)
    38      repository := "repository_example" // string | Filter by repository (optional)
    39      branch := "branch_example" // string | Filter by branch (optional)
    40  
    41      configuration := openapiclient.NewConfiguration()
    42      apiClient := openapiclient.NewAPIClient(configuration)
    43      resp, r, err := apiClient.ComponentGitAPI.ComponentGitList(context.Background()).Page(page).Organization(organization).Project(project).Environment(environment).Name(name).Repository(repository).Branch(branch).Execute()
    44      if err != nil {
    45          fmt.Fprintf(os.Stderr, "Error when calling `ComponentGitAPI.ComponentGitList``: %v\n", err)
    46          fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    47      }
    48      // response from `ComponentGitList`: PaginatedComponentGitCollection
    49      fmt.Fprintf(os.Stdout, "Response from `ComponentGitAPI.ComponentGitList`: %v\n", resp)
    50  }
    51  ```
    52  
    53  ### Path Parameters
    54  
    55  
    56  
    57  ### Other Parameters
    58  
    59  Other parameters are passed through a pointer to a apiComponentGitListRequest struct via the builder pattern
    60  
    61  
    62  Name | Type | Description  | Notes
    63  ------------- | ------------- | ------------- | -------------
    64   **page** | **int32** | The collection page number | [default to 1]
    65   **organization** | **string** | Filter by organization | 
    66   **project** | **string** | Filter by project | 
    67   **environment** | **string** | Filter by environment | 
    68   **name** | **string** | Filter by name | 
    69   **repository** | **string** | Filter by repository | 
    70   **branch** | **string** | Filter by branch | 
    71  
    72  ### Return type
    73  
    74  [**PaginatedComponentGitCollection**](PaginatedComponentGitCollection.md)
    75  
    76  ### Authorization
    77  
    78  [JWT](../README.md#JWT), [ApiKeyAuth](../README.md#ApiKeyAuth)
    79  
    80  ### HTTP request headers
    81  
    82  - **Content-Type**: Not defined
    83  - **Accept**: application/hal+json, application/problem+json
    84  
    85  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
    86  [[Back to Model list]](../README.md#documentation-for-models)
    87  [[Back to README]](../README.md)
    88  
    89  
    90  ## ComponentGitView
    91  
    92  > ComponentGitItem ComponentGitView(ctx, id).Execute()
    93  
    94  View git info for a specific service component
    95  
    96  
    97  
    98  ### Example
    99  
   100  ```go
   101  package main
   102  
   103  import (
   104      "context"
   105      "fmt"
   106      "os"
   107      openapiclient "bunnyshell.com/sdk"
   108  )
   109  
   110  func main() {
   111      id := "id_example" // string | Resource identifier
   112  
   113      configuration := openapiclient.NewConfiguration()
   114      apiClient := openapiclient.NewAPIClient(configuration)
   115      resp, r, err := apiClient.ComponentGitAPI.ComponentGitView(context.Background(), id).Execute()
   116      if err != nil {
   117          fmt.Fprintf(os.Stderr, "Error when calling `ComponentGitAPI.ComponentGitView``: %v\n", err)
   118          fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
   119      }
   120      // response from `ComponentGitView`: ComponentGitItem
   121      fmt.Fprintf(os.Stdout, "Response from `ComponentGitAPI.ComponentGitView`: %v\n", resp)
   122  }
   123  ```
   124  
   125  ### Path Parameters
   126  
   127  
   128  Name | Type | Description  | Notes
   129  ------------- | ------------- | ------------- | -------------
   130  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   131  **id** | **string** | Resource identifier | 
   132  
   133  ### Other Parameters
   134  
   135  Other parameters are passed through a pointer to a apiComponentGitViewRequest struct via the builder pattern
   136  
   137  
   138  Name | Type | Description  | Notes
   139  ------------- | ------------- | ------------- | -------------
   140  
   141  
   142  ### Return type
   143  
   144  [**ComponentGitItem**](ComponentGitItem.md)
   145  
   146  ### Authorization
   147  
   148  [JWT](../README.md#JWT), [ApiKeyAuth](../README.md#ApiKeyAuth)
   149  
   150  ### HTTP request headers
   151  
   152  - **Content-Type**: Not defined
   153  - **Accept**: application/hal+json, application/problem+json
   154  
   155  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   156  [[Back to Model list]](../README.md#documentation-for-models)
   157  [[Back to README]](../README.md)
   158