lg_resource

package
v0.0.0-...-5a7c6cd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2023 License: MPL-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClusterResource

func NewClusterResource() resource.Resource

func NewExampleResource

func NewExampleResource() resource.Resource

func NewFunctionResource

func NewFunctionResource() resource.Resource

func NewRevisionResource

func NewRevisionResource() resource.Resource

func NewWorkloadResource

func NewWorkloadResource() resource.Resource

Types

type ClusterResource

type ClusterResource struct {
	// contains filtered or unexported fields
}

ClusterResource defines the resource implementation.

func (*ClusterResource) Configure

func (*ClusterResource) Create

func (*ClusterResource) Delete

func (*ClusterResource) ImportState

func (*ClusterResource) Metadata

func (*ClusterResource) Read

func (*ClusterResource) Schema

func (*ClusterResource) Update

type ClusterResourceModel

type ClusterResourceModel struct {
	// Why use a separate name field instead of getting the name of the cluster terraform resource?
	// See: https://github.com/hashicorp/terraform/issues/17579
	Name types.String `tfsdk:"name"`

	CloudProvider types.String `tfsdk:"cloud_provider"`
	Region        types.String `tfsdk:"region"`

	Description types.String `tfsdk:"description"`
}

ClusterResourceModel describes the resource data model.

type ExampleResource

type ExampleResource struct {
	// contains filtered or unexported fields
}

ExampleResource defines the resource implementation.

func (*ExampleResource) Configure

func (*ExampleResource) Create

func (*ExampleResource) Delete

func (*ExampleResource) ImportState

func (*ExampleResource) Metadata

func (*ExampleResource) Read

func (*ExampleResource) Schema

func (*ExampleResource) Update

type ExampleResourceModel

type ExampleResourceModel struct {
	// Why use a separate name field instead of getting the name of the cluster terraform resource?
	// See: https://github.com/hashicorp/terraform/issues/17579
	Name types.String `tfsdk:"name"`

	ClusterProvider types.String `tfsdk:"cluster_provider"`
	Region          types.String `tfsdk:"region"`
	Description     types.String `tfsdk:"description"`
}

ExampleResourceModel describes the resource data model.

type FunctionResource

type FunctionResource struct {
	// contains filtered or unexported fields
}

FunctionResource defines the resource implementation.

func (*FunctionResource) Configure

func (*FunctionResource) Create

func (*FunctionResource) Delete

func (*FunctionResource) ImportState

func (*FunctionResource) Metadata

func (*FunctionResource) Read

func (*FunctionResource) Schema

func (*FunctionResource) Update

type FunctionResourceModel

type FunctionResourceModel struct {
	Name types.String `tfsdk:"name"`

	Cluster  types.String `tfsdk:"cluster"`
	Workload types.String `tfsdk:"workload"`

	// traffic configurations
	TrafficKey types.String `tfsdk:"traffic_key"`
	// function configurations
	SandboxConfig *SandboxConfig `tfsdk:"sandbox_config"`
	Domain        types.String   `tfsdk:"domain"`
	Description   types.String   `tfsdk:"description"`
}

FunctionResourceModel describes the resource data model.

type HttpGet

type HttpGet struct {
	Path        types.String  `tfsdk:"path"`
	Scheme      types.String  `tfsdk:"scheme"`
	HttpHeaders []*HttpHeader `tfsdk:"http_headers"`
}

func Model2HttpGet

func Model2HttpGet(model *models.HTTPGetAction) *HttpGet

func NewHttpGet

func NewHttpGet() *HttpGet

type HttpHeader

type HttpHeader struct {
	Name  types.String `tfsdk:"name"`
	Value types.String `tfsdk:"value"`
}

func Model2HttpHeader

func Model2HttpHeader(model *models.HTTPHeader) *HttpHeader

func NewHttpHeader

func NewHttpHeader() *HttpHeader

type Probe

type Probe struct {
	HttpGet *HttpGet `tfsdk:"http_get"`
}

func Model2Probe

func Model2Probe(model *models.Probe) *Probe

func NewProbe

func NewProbe() *Probe

type RevisionResource

type RevisionResource struct {
	// contains filtered or unexported fields
}

RevisionResource defines the resource implementation.

func (*RevisionResource) Configure

func (*RevisionResource) Create

func (*RevisionResource) Delete

func (*RevisionResource) ImportState

func (*RevisionResource) Metadata

func (*RevisionResource) Read

func (*RevisionResource) Schema

func (*RevisionResource) Update

type RevisionResourceModel

type RevisionResourceModel struct {
	Name types.String `tfsdk:"name"`

	Cluster  types.String `tfsdk:"cluster"`
	Workload types.String `tfsdk:"workload"`
	Function types.String `tfsdk:"function"`

	// Package Examples:
	// * s3key::/path/key.zip
	// * local::folder/file.zip or local::folder/sub-folder
	Package       types.String   `tfsdk:"package"`
	TrafficValue  types.String   `tfsdk:"traffic_value"`
	SandboxConfig *SandboxConfig `tfsdk:"sandbox_config"`
}

RevisionResourceModel describes the resource data model.

func NewRevisionResourceModel

func NewRevisionResourceModel() *RevisionResourceModel

type S3PullSecret

type S3PullSecret struct {
	AccessKey string `json:"accessKey"`
	SecretKey string `json:"secretKey"`
	Endpoint  string `json:"endpoint"`
	Token     string `json:"token"`
}

type SandboxConfig

type SandboxConfig struct {
	StartupProbe *Probe     `tfsdk:"startup_probe"`
	Command      types.List `tfsdk:"command"`
}

func Model2SandBoxConfig

func Model2SandBoxConfig(ctx context.Context, diags *diag.Diagnostics, model *models.SandboxConfig) *SandboxConfig

func NewSandboxConfig

func NewSandboxConfig() *SandboxConfig

type WorkloadResource

type WorkloadResource struct {
	// contains filtered or unexported fields
}

WorkloadResource defines the resource implementation.

func (*WorkloadResource) Configure

func (*WorkloadResource) Create

func (*WorkloadResource) Delete

func (*WorkloadResource) ImportState

func (*WorkloadResource) Metadata

func (*WorkloadResource) Read

func (*WorkloadResource) Schema

func (*WorkloadResource) Update

type WorkloadResourceModel

type WorkloadResourceModel struct {
	Name    types.String `tfsdk:"name"`
	Cluster types.String `tfsdk:"cluster"`

	Type          types.String `tfsdk:"type"`
	Image         types.String `tfsdk:"image"`
	DefaultDomain types.String `tfsdk:"default_domain"`

	Description types.String `tfsdk:"description"`
}

WorkloadResourceModel describes the resource data model.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL