This repository has been archived by the owner on Aug 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore!: Update SDK to v0.14.1 (#422)
Co-authored-by: Kemal Hadimli <[email protected]>
- Loading branch information
Showing
6 changed files
with
1,540 additions
and
51 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 |
---|---|---|
@@ -1,37 +1,15 @@ | ||
package client | ||
|
||
import "github.com/cloudquery/cq-provider-sdk/cqproto" | ||
|
||
// Provider Configuration | ||
|
||
type Config struct { | ||
Subscriptions []string `hcl:"subscriptions,optional"` | ||
|
||
requestedFormat cqproto.ConfigFormat | ||
} | ||
|
||
func NewConfig(f cqproto.ConfigFormat) *Config { | ||
return &Config{ | ||
requestedFormat: f, | ||
} | ||
} | ||
|
||
func (c Config) Example() string { | ||
switch c.requestedFormat { | ||
case cqproto.ConfigHCL: | ||
return `configuration { | ||
// Optional. if you not specified, cloudquery tries to access all subscriptions available to tenant | ||
// subscriptions = ["<YOUR_SUBSCRIPTION_ID_HERE>"] | ||
}` | ||
default: | ||
return ` | ||
func (Config) Example() string { | ||
return ` | ||
Optional. if you not specified, cloudquery tries to access all subscriptions available to tenant | ||
subscriptions: | ||
- "<YOUR_SUBSCRIPTION_ID_HERE>" | ||
` | ||
} | ||
} | ||
|
||
func (c Config) Format() cqproto.ConfigFormat { | ||
return c.requestedFormat | ||
} |
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.