All URIs are relative to https://api.cloudsmith.io/v1
Method | HTTP request | Description |
---|---|---|
FilesAbort | Post /files/{owner}/{repo}/{identifier}/abort/ | Abort a multipart file upload. |
FilesComplete | Post /files/{owner}/{repo}/{identifier}/complete/ | Complete a multipart file upload. |
FilesCreate | Post /files/{owner}/{repo}/ | Request URL(s) to upload new package file upload(s) to. |
FilesInfo | Get /files/{owner}/{repo}/{identifier}/info/ | Get upload information to perform a multipart file upload. |
FilesValidate | Post /files/{owner}/{repo}/validate/ | Validate parameters used for create. |
FilesAbort(ctx, owner, repo, identifier).Data(data).Execute()
Abort a multipart file upload.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/cloudsmith-io/cloudsmith-api-go"
)
func main() {
owner := "owner_example" // string |
repo := "repo_example" // string |
identifier := "identifier_example" // string |
data := *openapiclient.NewPackageFileUploadRequest("Filename_example") // PackageFileUploadRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.FilesApi.FilesAbort(context.Background(), owner, repo, identifier).Data(data).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FilesApi.FilesAbort``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
owner | string | ||
repo | string | ||
identifier | string |
Other parameters are passed through a pointer to a apiFilesAbortRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
data | PackageFileUploadRequest | |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PackageFileUpload FilesComplete(ctx, owner, repo, identifier).Data(data).Execute()
Complete a multipart file upload.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/cloudsmith-io/cloudsmith-api-go"
)
func main() {
owner := "owner_example" // string |
repo := "repo_example" // string |
identifier := "identifier_example" // string |
data := *openapiclient.NewPackageFileUploadRequest("Filename_example") // PackageFileUploadRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FilesApi.FilesComplete(context.Background(), owner, repo, identifier).Data(data).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FilesApi.FilesComplete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `FilesComplete`: PackageFileUpload
fmt.Fprintf(os.Stdout, "Response from `FilesApi.FilesComplete`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
owner | string | ||
repo | string | ||
identifier | string |
Other parameters are passed through a pointer to a apiFilesCompleteRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
data | PackageFileUploadRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PackageFileUpload FilesCreate(ctx, owner, repo).Data(data).Execute()
Request URL(s) to upload new package file upload(s) to.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/cloudsmith-io/cloudsmith-api-go"
)
func main() {
owner := "owner_example" // string |
repo := "repo_example" // string |
data := *openapiclient.NewPackageFileUploadRequest("Filename_example") // PackageFileUploadRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FilesApi.FilesCreate(context.Background(), owner, repo).Data(data).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FilesApi.FilesCreate``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `FilesCreate`: PackageFileUpload
fmt.Fprintf(os.Stdout, "Response from `FilesApi.FilesCreate`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
owner | string | ||
repo | string |
Other parameters are passed through a pointer to a apiFilesCreateRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
data | PackageFileUploadRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PackageFilePartsUpload FilesInfo(ctx, owner, repo, identifier).Filename(filename).PartNumber(partNumber).Execute()
Get upload information to perform a multipart file upload.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/cloudsmith-io/cloudsmith-api-go"
)
func main() {
owner := "owner_example" // string |
repo := "repo_example" // string |
identifier := "identifier_example" // string |
filename := "filename_example" // string | The filename of the file being uploaded
partNumber := int64(56) // int64 | The part number to be uploaded next (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FilesApi.FilesInfo(context.Background(), owner, repo, identifier).Filename(filename).PartNumber(partNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FilesApi.FilesInfo``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `FilesInfo`: PackageFilePartsUpload
fmt.Fprintf(os.Stdout, "Response from `FilesApi.FilesInfo`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
owner | string | ||
repo | string | ||
identifier | string |
Other parameters are passed through a pointer to a apiFilesInfoRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
filename | string | The filename of the file being uploaded | partNumber | int64 | The part number to be uploaded next |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FilesValidate(ctx, owner, repo).Data(data).Execute()
Validate parameters used for create.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/cloudsmith-io/cloudsmith-api-go"
)
func main() {
owner := "owner_example" // string |
repo := "repo_example" // string |
data := *openapiclient.NewPackageFileUploadRequest("Filename_example") // PackageFileUploadRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.FilesApi.FilesValidate(context.Background(), owner, repo).Data(data).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FilesApi.FilesValidate``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
owner | string | ||
repo | string |
Other parameters are passed through a pointer to a apiFilesValidateRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
data | PackageFileUploadRequest | |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]