Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v1
uses: actions/checkout@v4

- name: Create Release
id: create_release
Expand Down
12 changes: 2 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,12 @@ jobs:

steps:
- name: Install Go
uses: actions/setup-go@v1
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}

- name: Checkout code
uses: actions/checkout@v1
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


- name: Cache modules
uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
Comment on lines -20 to -26
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uses: actions/checkout@v4

- name: Format
if: matrix.platform == 'ubuntu-latest'
Expand Down
3 changes: 2 additions & 1 deletion v2/ecl/managed_load_balancer/v1/certificates/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@ Example to delete a certificate
Example to upload a certificate file

uploadFileOpts := certificates.UploadFileOpts{
Type: "ca-cert",
Type: "ssl-key",
Content: "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCjAxMjM0NTY3ODlBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWmFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6MDEKMjM0NTY3ODlBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWmFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6MDEyMwo0NTY3ODlBQk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RUgpTVFVWV1hZWmFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6MDEyMzQ1Njc4OUFCQ0RFRkdISUpLTE1OT1BRUlNUClVWV1hZWmFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6MDEyMzQ1Njc4OUFCQ0RFRkdISUpLTE1OT1BRUlNUVVYKV1hZWmFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6MDEyMzQ1Njc4OUFCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWApZWmFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6MDEyMzQ1Njc4OUFCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaCmFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6MDEyMzQ1Njc4OUFCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaYWIKY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6MDEyMzQ1Njc4OUFCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaYWJjZAplZmdoaWprbG1ub3BxcnN0dXZ3eHl6VjAxMjM0NTY3ODlBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWmFiY2RlCmZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMgotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==",
Passphrase: "passphrase",
}

id := "497f6eca-6276-4993-bfeb-53cbbbba6f08"
Expand Down
37 changes: 25 additions & 12 deletions v2/ecl/managed_load_balancer/v1/certificates/requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,19 @@ type ListOpts struct {
ID string `q:"id"`

// - Name of the resource
// - This field accepts single-byte characters only
// - This field accepts UTF-8 characters up to 3 bytes
Name string `q:"name"`

// - Description of the resource
// - This field accepts single-byte characters only
// - This field accepts UTF-8 characters up to 3 bytes
Description string `q:"description"`

// - ID of the owner tenant of the resource
TenantID string `q:"tenant_id"`

// - If `true` is set, information of the certificate file are displayed
Details bool `q:"details"`

// - CA certificate file upload status of the certificate
CACertStatus string `q:"ca_cert_status"`

Expand Down Expand Up @@ -76,17 +79,18 @@ Create Certificate
type CreateOpts struct {

// - Name of the certificate
// - This field accepts single-byte characters only
// - This field accepts UTF-8 characters up to 3 bytes
Name string `json:"name,omitempty"`

// - Description of the certificate
// - This field accepts single-byte characters only
// - This field accepts UTF-8 characters up to 3 bytes
Description string `json:"description,omitempty"`

// - Tags of the certificate
// - Set JSON object up to 32,768 characters
// - Set JSON object up to 32,767 characters
// - Nested structure is permitted
// - This field accepts single-byte characters only
// - The whitespace around separators ( `","` and `":"` ) are ignored
// - This field accepts UTF-8 characters up to 3 bytes
Tags map[string]interface{} `json:"tags,omitempty"`
}

Expand Down Expand Up @@ -137,17 +141,18 @@ Update Certificate
type UpdateOpts struct {

// - Name of the certificate
// - This field accepts single-byte characters only
// - This field accepts UTF-8 characters up to 3 bytes
Name *string `json:"name,omitempty"`

// - Description of the certificate
// - This field accepts single-byte characters only
// - This field accepts UTF-8 characters up to 3 bytes
Description *string `json:"description,omitempty"`

// - Tags of the certificate
// - Set JSON object up to 32,768 characters
// - Set JSON object up to 32,767 characters
// - Nested structure is permitted
// - This field accepts single-byte characters only
// - The whitespace around separators ( `","` and `":"` ) are ignored
// - This field accepts UTF-8 characters up to 3 bytes
Tags *map[string]interface{} `json:"tags,omitempty"`
}

Expand Down Expand Up @@ -202,11 +207,19 @@ type UploadFileOpts struct {
Type string `json:"type"`

// - Content of the certificate file to be uploaded
// - Content must be Base64 encoded
// - The content must be Base64 encoded
// - The file size before encoding must be less than or equal to 16KB
// - The file format before encoding must be PEM
// - DER can be converted to PEM by using OpenSSL command
// - DER can be converted to PEM by using OpenSSL command
// - The following key algorithms are supported
// - RSA 1024, 2048, 3072 and 4096 bits
// - ECDSA P-256 (prime256v1, secp256r1), P-384 (secp384r1) and P-521 (secp521r1)
// - The content of `"ssl-cert"` and the content of `"ssl-key"` must be a pair (must be matched correctly)
Content string `json:"content"`

// - Passphrase of the certificate file to be uploaded
// - This parameter can be set when 'type' is `"ssl-key"`
Passphrase string `json:"passphrase,omitempty"`
}

// ToCertificateUploadFileMap builds a request body from UploadFileOpts.
Expand Down
23 changes: 23 additions & 0 deletions v2/ecl/managed_load_balancer/v1/certificates/results.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,29 @@ type FileInResponse struct {

// - File upload status of the certificate
Status string `json:"status"`

// - Information of the certificate file (JSON object format)
// - When List Certificates
// - If `details` is `true`, return object
// - When Create, Show, and Update Certificate
// - Always return object
// - For example, the following fields would be included
// - When ca_cert or ssl_cert
// - `"issuer"` (C, ST, L, O, OU and CN)
// - Fields included in the certificate file would be shown
// - `"subject"` (C, ST, L, O, OU and CN)
// - Fields included in the certificate file would be shown
// - `"not_before"` and `"not_after"`
// - Format: `"%Y-%m-%d %H:%M:%S"` (UTC)
// - `"key_algorithm"`
// - `"RSA-4096"` , `"EC-secp384r1"` , and so on
// - `"serial"`
// - `"fingerprint"` (SHA-256)
// - When ssl_key
// - `"key_algorithm"`
// - `"RSA-4096"` , `"EC-secp384r1"` , and so on
// - `"passphrase"` ( `true` or `false` )
Info map[string]interface{} `json:"info"`
}

// Certificate represents a certificate.
Expand Down
Loading
Loading