Documentation ¶
Index ¶
- Variables
- func ExtractId(oldID string) string
- func ExtractRegion(oldID string) string
- func GetDBClientFromMeta(meta interface{}, d *schema.ResourceData) (*sqlx.DB, clients.Region, error)
- func SetDefaultRegion(region string) error
- func TransformIdWithRegion(region string, oldID string) string
- type ProviderMeta
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultRegion string
Functions ¶
func ExtractRegion ¶ added in v0.7.0
Function to get the region from the region + ID string
func GetDBClientFromMeta ¶ added in v0.5.0
func SetDefaultRegion ¶ added in v0.5.0
func TransformIdWithRegion ¶
Helper function to prepend region to the ID
Types ¶
type ProviderMeta ¶ added in v0.5.0
type ProviderMeta struct { // DB is a map that associates each supported region with its corresponding // database client. This allows for region-specific database operations. DB map[clients.Region]*clients.DBClient // Frontegg represents the client used to interact with the Frontegg API, // which may involve authentication, token management, etc. Frontegg *clients.FronteggClient // CloudAPI is the client used for interactions with the cloud API CloudAPI *clients.CloudAPIClient // DefaultRegion specifies the default region to be used when no specific // region is provided in the resources and data sources. DefaultRegion clients.Region // RegionsEnabled is a map indicating which regions are currently enabled // for use. This can be used to quickly check the availability in different regions. RegionsEnabled map[clients.Region]bool // Frontegg Roles is a map that associates each Frontegg role with its corresponding ID. // This is used to map role names to role IDs when creating/updating users. FronteggRoles map[string]string }
ProviderMeta holds essential configuration and client information required across various parts of the provider. It acts as a central repository of shared data, particularly for database connections, API clients, and regional settings.
func GetProviderMeta ¶ added in v0.5.0
func GetProviderMeta(meta interface{}) (*ProviderMeta, error)
Click to show internal directories.
Click to hide internal directories.