generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Schema changes for using schema as provisioning input (#3608)
Commits should describe what the intent is, hopefully.
- Loading branch information
Showing
15 changed files
with
97 additions
and
54 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
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
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
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package schema | ||
|
||
// ResourceType is a type of resource used to configure provisioners | ||
type ResourceType string | ||
|
||
const ( | ||
ResourceTypeUnknown ResourceType = "unknown" | ||
ResourceTypePostgres ResourceType = "postgres" | ||
ResourceTypeMysql ResourceType = "mysql" | ||
ResourceTypeModule ResourceType = "module" | ||
ResourceTypeSQLMigration ResourceType = "sql-migration" | ||
ResourceTypeTopic ResourceType = "topic" | ||
ResourceTypeSubscription ResourceType = "subscription" | ||
ResourceTypeRunner ResourceType = "runner" | ||
) | ||
|
||
type ProvisionedResource struct { | ||
// Kind is the kind of resource provisioned. | ||
Kind string | ||
// ID of the provisioned resource. | ||
ID string | ||
// Config is the subset of the schema element's configuration that is used to create the resource. | ||
// changes to this config are used to check if the resource needs to be updated. | ||
Config any | ||
} | ||
|
||
// Provisioned is a schema element that provisioner acts on to create a runtime resource. | ||
type Provisioned interface { | ||
// Returns the resources provisioned from this schema element. | ||
GetProvisioned() []*ProvisionedResource | ||
} |
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,6 @@ | ||
package schema | ||
|
||
// Runtime is data that is populated at runtime by an FTL subsystem. | ||
type Runtime interface { | ||
runtime() | ||
} |
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