-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add skip_init_quotas param * Add github actions with tests and linters (#162) Co-authored-by: Voloshina Tatyana <[email protected]> --------- Co-authored-by: Voloshina Tatyana <[email protected]>
- Loading branch information
Showing
17 changed files
with
359 additions
and
329 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Golangci-lint | ||
on: | ||
pull_request: | ||
|
||
jobs: | ||
golangci-lint: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: '1.14' | ||
|
||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: v1.49.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Unit Tests | ||
on: | ||
pull_request: | ||
|
||
jobs: | ||
unittests: | ||
name: tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: '1.14' | ||
|
||
- name: Run test | ||
run: go test -v ./... |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,36 +4,36 @@ the Resell v2 API. | |
Example of getting keypairs in the current domain | ||
allKeypairs, _, err = keypairs.List(context, resellClient) | ||
if err != nil { | ||
log.Fatal(err) | ||
} | ||
for _, myKeypair := range allKeypairs { | ||
fmt.Println(myKeypair) | ||
} | ||
allKeypairs, _, err = keypairs.List(context, resellClient) | ||
if err != nil { | ||
log.Fatal(err) | ||
} | ||
for _, myKeypair := range allKeypairs { | ||
fmt.Println(myKeypair) | ||
} | ||
Example of creating keypairs in all regions with the same options | ||
newKeypairOptions := keypairs.KeypairOpts{ | ||
Name: "my_keypair", | ||
PublicKey: "ssh-rsa public_key_part [email protected]", | ||
UserID: "82a026cae2104e92b999dbe00cdb9435", | ||
} | ||
newKeypairs, _, err := keypairs.Create(ctx, resellClient, newKeypairOptions) | ||
if err != nil { | ||
log.Fatal(err) | ||
} | ||
for _, newKeypair := range newKeypairs { | ||
fmt.Printf("%v\n", newKeypair) | ||
} | ||
newKeypairOptions := keypairs.KeypairOpts{ | ||
Name: "my_keypair", | ||
PublicKey: "ssh-rsa public_key_part [email protected]", | ||
UserID: "82a026cae2104e92b999dbe00cdb9435", | ||
} | ||
newKeypairs, _, err := keypairs.Create(ctx, resellClient, newKeypairOptions) | ||
if err != nil { | ||
log.Fatal(err) | ||
} | ||
for _, newKeypair := range newKeypairs { | ||
fmt.Printf("%v\n", newKeypair) | ||
} | ||
Example of deleting a single keypair of a user | ||
keypairName := "my_keypair" | ||
userID := 82a026cae2104e92b999dbe00cdb9435"" | ||
_, err = keypairs.Delete(ctx, resellClient, keypairName, userID) | ||
if err != nil { | ||
log.Fatal(err) | ||
} | ||
keypairName := "my_keypair" | ||
userID := 82a026cae2104e92b999dbe00cdb9435"" | ||
_, err = keypairs.Delete(ctx, resellClient, keypairName, userID) | ||
if err != nil { | ||
log.Fatal(err) | ||
} | ||
*/ | ||
package keypairs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.