Documentation ¶
Index ¶
- Constants
- func New(version string) func() provider.Provider
- func NewCache() datasource.DataSource
- func NewDatabase() datasource.DataSource
- func NewEncoreDataSource(typeRef TypeRef, name, desc string, fragments ...string) datasource.DataSource
- func NewGateway() datasource.DataSource
- func NewPubSubSubscription() datasource.DataSource
- func NewPubSubTopic() datasource.DataSource
- func NewService() datasource.DataSource
- type AWSAppLoadBalancer
- type AWSAppLoadBalancerListener
- type AWSDeadLetterQueue
- type AWSFargateCluster
- type AWSFargateService
- type AWSFargateTaskDefinition
- type AWSK8sCluster
- type AWSParameterGroup
- type AWSRedisCluster
- type AWSRedisParameterGroup
- type AWSRole
- type AWSSNSSubscription
- type AWSSNSTopic
- type AWSSQLServer
- type AWSSQSQueue
- type AWSSecurityGroup
- type AWSSubnet
- type AWSSubnetGroup
- type AWSVPC
- type ComputeInstance
- type EncoreDataSource
- func (d *EncoreDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, ...)
- func (d *EncoreDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, ...)
- func (d *EncoreDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *EncoreDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, ...)
- type EncoreProvider
- func (p *EncoreProvider) Configure(ctx context.Context, req provider.ConfigureRequest, ...)
- func (p *EncoreProvider) DataSources(ctx context.Context) []func() datasource.DataSource
- func (p *EncoreProvider) Metadata(ctx context.Context, req provider.MetadataRequest, ...)
- func (p *EncoreProvider) Resources(ctx context.Context) []func() resource.Resource
- func (p *EncoreProvider) Schema(ctx context.Context, req provider.SchemaRequest, resp *provider.SchemaResponse)
- type EncoreProviderModel
- type Error
- type GCPCloudRun
- type GCPDeadLetterQueue
- type GCPK8sCluster
- type GCPK8sNodePool
- type GCPNetwork
- type GCPPubSubSubscription
- type GCPPubSubTopic
- type GCPRedisCluster
- type GCPSQLServer
- type GCPSSLCert
- type GCPServerlessVpcConnector
- type GCPServiceAccount
- type Gateway
- type Ingress
- type K8sCluster
- type K8sClusterIP
- type K8sContainer
- type K8sData
- type K8sDeployment
- type K8sIngress
- type K8sNamespace
- type K8sServiceAccount
- type K8sWorkloadIdentity
- type Need
- type NeedsData
- type OAuthData
- type PlatformClient
- type PlatformClientImpl
- func (p *PlatformClientImpl) AppSlug() string
- func (p *PlatformClientImpl) Auth(ctx context.Context, authKey string) error
- func (p *PlatformClientImpl) Call(ctx context.Context, method, path string, reqParams, respParams interface{}) (err error)
- func (p *PlatformClientImpl) Do(req *http.Request) (*http.Response, error)
- func (p *PlatformClientImpl) GQL() *graphql.Client
- type RedisCluster
- type RedisKeyspace
- type Route
- type SQLDatabase
- type SQLDatabaseName
- type SQLServer
- type SatisfierQuery
- type Service
- type TerraformDescription
- type TypeRef
- type WrappedAWSSNSTopic
- type WrappedGCPPubSubTopic
Constants ¶
View Source
const DefaultBaseURL = "https://api.encore.dev"
Variables ¶
This section is empty.
Functions ¶
func NewCache ¶ added in v0.1.3
func NewCache() datasource.DataSource
func NewDatabase ¶ added in v0.1.3
func NewDatabase() datasource.DataSource
func NewEncoreDataSource ¶
func NewEncoreDataSource(typeRef TypeRef, name, desc string, fragments ...string) datasource.DataSource
func NewGateway ¶ added in v0.1.3
func NewGateway() datasource.DataSource
func NewPubSubSubscription ¶
func NewPubSubSubscription() datasource.DataSource
func NewPubSubTopic ¶
func NewPubSubTopic() datasource.DataSource
func NewService ¶ added in v0.1.3
func NewService() datasource.DataSource
Types ¶
type AWSAppLoadBalancer ¶ added in v0.1.3
type AWSAppLoadBalancer struct { Arn string Listeners []AWSAppLoadBalancerListener }
func (*AWSAppLoadBalancer) GetDocs ¶ added in v0.1.3
func (a *AWSAppLoadBalancer) GetDocs() map[string]string
type AWSAppLoadBalancerListener ¶ added in v0.1.3
func (*AWSAppLoadBalancerListener) GetDocs ¶ added in v0.1.3
func (a *AWSAppLoadBalancerListener) GetDocs() map[string]string
type AWSDeadLetterQueue ¶ added in v0.1.3
type AWSDeadLetterQueue struct {
Arn string
}
func (*AWSDeadLetterQueue) GetDocs ¶ added in v0.1.3
func (a *AWSDeadLetterQueue) GetDocs() (attrDesc map[string]string)
type AWSFargateCluster ¶ added in v0.1.3
type AWSFargateCluster struct {
Arn string
}
func (*AWSFargateCluster) GetDocs ¶ added in v0.1.3
func (a *AWSFargateCluster) GetDocs() map[string]string
type AWSFargateService ¶ added in v0.1.3
type AWSFargateService struct { Arn string Cluster AWSFargateCluster Subnets []AWSSubnet SecurityGroups []AWSSecurityGroup }
func (*AWSFargateService) GetDocs ¶ added in v0.1.3
func (a *AWSFargateService) GetDocs() map[string]string
type AWSFargateTaskDefinition ¶ added in v0.1.3
type AWSFargateTaskDefinition struct { Arn string Service AWSFargateService TaskRole AWSRole ExecutionRole AWSRole VPC AWSVPC }
func (*AWSFargateTaskDefinition) GetDocs ¶ added in v0.1.3
func (a *AWSFargateTaskDefinition) GetDocs() map[string]string
type AWSK8sCluster ¶ added in v0.1.3
type AWSK8sCluster struct { Arn string Subnets []AWSSubnet SecurityGroup AWSSecurityGroup Role AWSRole VPC AWSVPC }
func (*AWSK8sCluster) GetDocs ¶ added in v0.1.3
func (a *AWSK8sCluster) GetDocs() map[string]string
type AWSParameterGroup ¶ added in v0.1.3
type AWSParameterGroup struct {
Arn string
}
func (*AWSParameterGroup) GetDocs ¶ added in v0.1.3
func (a *AWSParameterGroup) GetDocs() map[string]string
type AWSRedisCluster ¶ added in v0.1.3
type AWSRedisCluster struct { Arn string VPC AWSVPC SubnetGroup AWSSubnetGroup SecurityGroup AWSSecurityGroup ParameterGroup AWSParameterGroup }
func (*AWSRedisCluster) GetDocs ¶ added in v0.1.3
func (r *AWSRedisCluster) GetDocs() map[string]string
type AWSRedisParameterGroup ¶ added in v0.1.3
type AWSRedisParameterGroup struct {
Arn string
}
func (*AWSRedisParameterGroup) GetDocs ¶ added in v0.1.3
func (r *AWSRedisParameterGroup) GetDocs() map[string]string
type AWSSNSSubscription ¶ added in v0.1.3
type AWSSNSSubscription struct { Arn string WrappedAWSSNSTopic `graphql:"topic"` Queue AWSSQSQueue }
func (*AWSSNSSubscription) GetDocs ¶ added in v0.1.3
func (a *AWSSNSSubscription) GetDocs() (attrDesc map[string]string)
type AWSSNSTopic ¶
type AWSSNSTopic struct {
Arn string
}
func (*AWSSNSTopic) GetDocs ¶
func (a *AWSSNSTopic) GetDocs() (attrDesc map[string]string)
type AWSSQLServer ¶ added in v0.1.3
type AWSSQLServer struct { Arn string VPC AWSVPC SubnetGroup AWSSubnetGroup SecurityGroup AWSSecurityGroup ParameterGroup AWSParameterGroup }
func (*AWSSQLServer) GetDocs ¶ added in v0.1.3
func (a *AWSSQLServer) GetDocs() map[string]string
type AWSSQSQueue ¶
type AWSSQSQueue struct { Arn string DeadLetter AWSDeadLetterQueue `graphql:"dlq"` }
func (*AWSSQSQueue) GetDocs ¶
func (a *AWSSQSQueue) GetDocs() (attrDesc map[string]string)
type AWSSecurityGroup ¶ added in v0.1.3
type AWSSecurityGroup struct {
ID string
}
func (*AWSSecurityGroup) GetDocs ¶ added in v0.1.3
func (a *AWSSecurityGroup) GetDocs() map[string]string
type AWSSubnetGroup ¶ added in v0.1.3
func (*AWSSubnetGroup) GetDocs ¶ added in v0.1.3
func (r *AWSSubnetGroup) GetDocs() map[string]string
type ComputeInstance ¶ added in v0.1.3
type ComputeInstance struct { GcpCloudRun GCPCloudRun `graphql:"... on GCPCloudRun"` AwsFargateTaskDefinition AWSFargateTaskDefinition `graphql:"... on AWSFargateTaskDefinition"` K8sContainer `graphql:"... on K8sContainer"` }
func (*ComputeInstance) GetDocs ¶ added in v0.1.3
func (a *ComputeInstance) GetDocs() map[string]string
type EncoreDataSource ¶
type EncoreDataSource struct {
// contains filtered or unexported fields
}
func (*EncoreDataSource) Configure ¶
func (d *EncoreDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
func (*EncoreDataSource) Metadata ¶
func (d *EncoreDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
func (*EncoreDataSource) Read ¶
func (d *EncoreDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
func (*EncoreDataSource) Schema ¶
func (d *EncoreDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
type EncoreProvider ¶
type EncoreProvider struct {
// contains filtered or unexported fields
}
EncoreProvider defines the provider implementation.
func (*EncoreProvider) Configure ¶
func (p *EncoreProvider) Configure(ctx context.Context, req provider.ConfigureRequest, resp *provider.ConfigureResponse)
func (*EncoreProvider) DataSources ¶
func (p *EncoreProvider) DataSources(ctx context.Context) []func() datasource.DataSource
func (*EncoreProvider) Metadata ¶
func (p *EncoreProvider) Metadata(ctx context.Context, req provider.MetadataRequest, resp *provider.MetadataResponse)
func (*EncoreProvider) Resources ¶
func (p *EncoreProvider) Resources(ctx context.Context) []func() resource.Resource
func (*EncoreProvider) Schema ¶
func (p *EncoreProvider) Schema(ctx context.Context, req provider.SchemaRequest, resp *provider.SchemaResponse)
type EncoreProviderModel ¶
type EncoreProviderModel struct { APIKey types.String `tfsdk:"auth_key"` EnvName types.String `tfsdk:"env"` }
EncoreProviderModel describes the provider data model.
type Error ¶
type Error struct { HTTPStatus string `json:"-"` HTTPCode int `json:"-"` Code string Detail json.RawMessage }
type GCPCloudRun ¶ added in v0.1.3
type GCPCloudRun struct { SelfLink string `tf:"id"` ServerlessVpcConnector GCPServerlessVpcConnector `graphql:"serverlessVPCConnector"` ServiceAccount GCPServiceAccount }
func (*GCPCloudRun) GetDocs ¶ added in v0.1.3
func (a *GCPCloudRun) GetDocs() map[string]string
type GCPDeadLetterQueue ¶ added in v0.1.3
type GCPDeadLetterQueue struct { SelfLink string `tf:"id"` WrappedGCPPubSubTopic `graphql:"topic"` }
func (*GCPDeadLetterQueue) GetDocs ¶ added in v0.1.3
func (a *GCPDeadLetterQueue) GetDocs() (attrDesc map[string]string)
type GCPK8sCluster ¶ added in v0.1.3
type GCPK8sCluster struct { SelfLink string `tf:"id"` Network GCPNetwork ServiceAccount GCPServiceAccount NodePools []GCPK8sNodePool }
func (*GCPK8sCluster) GetDocs ¶ added in v0.1.3
func (a *GCPK8sCluster) GetDocs() map[string]string
type GCPK8sNodePool ¶ added in v0.1.3
type GCPK8sNodePool struct {
SelfLink string `tf:"id"`
}
func (*GCPK8sNodePool) GetDocs ¶ added in v0.1.3
func (a *GCPK8sNodePool) GetDocs() map[string]string
type GCPNetwork ¶ added in v0.1.3
type GCPNetwork struct {
SelfLink string `tf:"id"`
}
func (*GCPNetwork) GetDocs ¶ added in v0.1.3
func (a *GCPNetwork) GetDocs() map[string]string
type GCPPubSubSubscription ¶
type GCPPubSubSubscription struct { SelfLink string `tf:"id"` WrappedGCPPubSubTopic `graphql:"topic"` DeadLetter GCPDeadLetterQueue `graphql:"dlq"` }
func (*GCPPubSubSubscription) GetDocs ¶
func (a *GCPPubSubSubscription) GetDocs() (attrDesc map[string]string)
type GCPPubSubTopic ¶
type GCPPubSubTopic struct {
SelfLink string `tf:"id"`
}
func (*GCPPubSubTopic) GetDocs ¶
func (a *GCPPubSubTopic) GetDocs() (attrDesc map[string]string)
type GCPRedisCluster ¶ added in v0.1.3
type GCPRedisCluster struct { SelfLink string `tf:"id"` Network GCPNetwork }
func (*GCPRedisCluster) GetDocs ¶ added in v0.1.3
func (r *GCPRedisCluster) GetDocs() map[string]string
type GCPSQLServer ¶ added in v0.1.3
type GCPSQLServer struct { SelfLink string `tf:"id"` Network GCPNetwork SslCert GCPSSLCert }
func (*GCPSQLServer) GetDocs ¶ added in v0.1.3
func (a *GCPSQLServer) GetDocs() map[string]string
type GCPSSLCert ¶ added in v0.1.3
type GCPSSLCert struct {
Fingerprint string
}
func (*GCPSSLCert) GetDocs ¶ added in v0.1.3
func (a *GCPSSLCert) GetDocs() map[string]string
type GCPServerlessVpcConnector ¶ added in v0.1.3
type GCPServerlessVpcConnector struct { SelfLink string `tf:"id"` Network GCPNetwork }
func (*GCPServerlessVpcConnector) GetDocs ¶ added in v0.1.3
func (a *GCPServerlessVpcConnector) GetDocs() map[string]string
type GCPServiceAccount ¶ added in v0.1.3
type GCPServiceAccount struct {
SelfLink string `tf:"id"`
}
func (*GCPServiceAccount) GetDocs ¶ added in v0.1.3
func (a *GCPServiceAccount) GetDocs() map[string]string
type Gateway ¶ added in v0.1.3
type Gateway struct { ComputeInstance `graphql:"compute"` Route `graphql:"route"` Ingress `graphql:"ingress"` }
type Ingress ¶ added in v0.1.3
type Ingress struct { K8sIngress K8sIngress `graphql:"... on K8sIngress"` AwsAlb AWSAppLoadBalancer `graphql:"... on AWSAppLoadBalancer"` }
type K8sCluster ¶ added in v0.1.3
type K8sCluster struct { GcpGke GCPK8sCluster `graphql:"... on GCPK8sCluster"` AwsEks AWSK8sCluster `graphql:"... on AWSK8sCluster"` }
func (*K8sCluster) GetDocs ¶ added in v0.1.3
func (a *K8sCluster) GetDocs() map[string]string
type K8sClusterIP ¶ added in v0.1.3
type K8sClusterIP struct {
K8sData `graphql:"data"`
}
type K8sContainer ¶ added in v0.1.3
type K8sContainer struct {
K8sDeployment K8sDeployment `graphql:"deployment"`
}
func (*K8sContainer) GetDocs ¶ added in v0.1.3
func (a *K8sContainer) GetDocs() map[string]string
type K8sDeployment ¶ added in v0.1.3
type K8sDeployment struct { K8sData `graphql:"data"` Namespace K8sNamespace ServiceAccount K8sServiceAccount }
func (*K8sDeployment) GetDocs ¶ added in v0.1.3
func (a *K8sDeployment) GetDocs() map[string]string
type K8sIngress ¶ added in v0.1.3
type K8sIngress struct {
K8sData `graphql:"data"`
}
type K8sNamespace ¶ added in v0.1.3
type K8sNamespace struct { K8sData `graphql:"data"` K8sCluster `graphql:"cluster"` }
type K8sServiceAccount ¶ added in v0.1.3
type K8sServiceAccount struct { K8sData `graphql:"data"` K8sWorkloadIdentity `graphql:"workloadIdentity"` }
type K8sWorkloadIdentity ¶ added in v0.1.3
type K8sWorkloadIdentity struct { GcpServiceAccount GCPServiceAccount `graphql:"... on GCPServiceAccount"` AwsRole AWSRole `graphql:"... on AWSRole"` }
func (*K8sWorkloadIdentity) GetDocs ¶ added in v0.1.3
func (a *K8sWorkloadIdentity) GetDocs() map[string]string
type Need ¶
type Need struct { ID string TypeRef TypeRef EncoreName string Satisfier *SatisfierQuery }
type NeedsData ¶
type NeedsData struct {
// contains filtered or unexported fields
}
func NewNeedsData ¶
func NewNeedsData(client PlatformClient, envName string, ds []func() datasource.DataSource) *NeedsData
type PlatformClient ¶
type PlatformClient interface { Auth(ctx context.Context, authKey string) error Call(ctx context.Context, method, path string, reqParams, respParams interface{}) error GQL() *graphql.Client AppSlug() string }
func NewPlatformClient ¶
func NewPlatformClient(version string) PlatformClient
type PlatformClientImpl ¶ added in v0.1.3
type PlatformClientImpl struct {
// contains filtered or unexported fields
}
func (*PlatformClientImpl) AppSlug ¶ added in v0.1.3
func (p *PlatformClientImpl) AppSlug() string
func (*PlatformClientImpl) Auth ¶ added in v0.1.3
func (p *PlatformClientImpl) Auth(ctx context.Context, authKey string) error
func (*PlatformClientImpl) Call ¶ added in v0.1.3
func (p *PlatformClientImpl) Call(ctx context.Context, method, path string, reqParams, respParams interface{}) (err error)
Call makes a call to the API endpoint given by method and path. If reqParams and respParams are non-nil they are JSON-marshalled/unmarshalled.
func (*PlatformClientImpl) GQL ¶ added in v0.1.3
func (p *PlatformClientImpl) GQL() *graphql.Client
type RedisCluster ¶ added in v0.1.3
type RedisCluster struct { AwsRedis AWSRedisCluster `graphql:"... on AWSRedisCluster"` GcpRedis GCPRedisCluster `graphql:"... on GCPRedisCluster"` }
func (*RedisCluster) GetDocs ¶ added in v0.1.3
func (r *RedisCluster) GetDocs() map[string]string
type RedisKeyspace ¶ added in v0.1.3
type RedisKeyspace struct {
RedisCluster `graphql:"cluster"`
}
type Route ¶ added in v0.1.3
type Route struct {
K8sClusterIP K8sClusterIP `graphql:"... on K8sClusterIP"`
}
type SQLDatabase ¶ added in v0.1.3
type SQLDatabase struct { SQLDatabaseName `graphql:"data"` SQLServer `graphql:"server"` }
type SQLDatabaseName ¶ added in v0.1.3
type SQLDatabaseName struct {
Name string `tf:"database_name"`
}
func (*SQLDatabaseName) GetDocs ¶ added in v0.1.3
func (a *SQLDatabaseName) GetDocs() map[string]string
type SQLServer ¶ added in v0.1.3
type SQLServer struct { AwsRds AWSSQLServer `graphql:"... on AWSSQLServer"` GcpCloudSQL GCPSQLServer `graphql:"... on GCPSQLServer"` }
type SatisfierQuery ¶ added in v0.1.3
type SatisfierQuery struct { Type string `graphql:"__typename"` AWSSNSSubscription AWSSNSSubscription `graphql:"... on AWSSNSSubscription" tf:"aws_sns"` GCPPubSubSubscription GCPPubSubSubscription `graphql:"... on GCPPubSubSubscription" tf:"gcp_pubsub"` AWSSNSTopic AWSSNSTopic `graphql:"... on AWSSNSTopic" tf:"aws_sns"` GCPPubSubTopic GCPPubSubTopic `graphql:"... on GCPPubSubTopic" tf:"gcp_pubsub"` SQLDatabase `graphql:"... on SQLDatabase"` RedisKeyspace `graphql:"... on RedisKeyspace"` Service `graphql:"... on Service"` Gateway `graphql:"... on Gateway"` }
func (*SatisfierQuery) GetDocs ¶ added in v0.1.3
func (a *SatisfierQuery) GetDocs() (attrDesc map[string]string)
type Service ¶ added in v0.1.3
type Service struct { ComputeInstance `graphql:"compute"` Route `graphql:"route"` }
type TerraformDescription ¶ added in v0.1.3
type WrappedAWSSNSTopic ¶ added in v0.1.3
type WrappedAWSSNSTopic struct {
Topic AWSSNSTopic `graphql:"... on AWSSNSTopic"`
}
func (*WrappedAWSSNSTopic) GetDocs ¶ added in v0.1.3
func (a *WrappedAWSSNSTopic) GetDocs() (attrDesc map[string]string)
type WrappedGCPPubSubTopic ¶ added in v0.1.3
type WrappedGCPPubSubTopic struct {
Topic GCPPubSubTopic `graphql:"... on GCPPubSubTopic"`
}
Click to show internal directories.
Click to hide internal directories.