provider

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: MPL-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(version string) func() provider.Provider

func NewBranchResource added in v0.1.3

func NewBranchResource() resource.Resource

func NewDatabaseResource

func NewDatabaseResource() resource.Resource

func NewEndpointResource added in v0.1.3

func NewEndpointResource() resource.Resource

func NewProjectResource

func NewProjectResource() resource.Resource

func NewRoleResource

func NewRoleResource() resource.Resource

Types

type Branch

type Branch struct {
	Id           string  `json:"id"`
	ProjectId    string  `json:"project_id"`
	ParentId     *string `json:"parent_id"`
	Name         string  `json:"name"`
	Primary      bool    `json:"primary"`
	CurrentState string  `json:"current_state"`
}

type BranchCreateInput added in v0.1.3

type BranchCreateInput struct {
	Branch BranchCreateInputBranch `json:"branch"`
}

type BranchCreateInputBranch added in v0.1.3

type BranchCreateInputBranch struct {
	Name     string `json:"name"`
	ParentId string `json:"parent_id,omitempty"`
}

type BranchEndpointListOutput added in v0.1.3

type BranchEndpointListOutput struct {
	Endpoints []Endpoint `json:"endpoints"`
}

type BranchListOutput

type BranchListOutput struct {
	Branches []Branch `json:"branches"`
}

type BranchOutput

type BranchOutput struct {
	Branch Branch `json:"branch"`
}

type BranchResource added in v0.1.3

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

func (*BranchResource) Configure added in v0.1.3

func (*BranchResource) Create added in v0.1.3

func (*BranchResource) Delete added in v0.1.3

func (*BranchResource) ImportState added in v0.1.3

func (*BranchResource) Metadata added in v0.1.3

func (*BranchResource) Read added in v0.1.3

func (*BranchResource) Schema added in v0.1.3

func (*BranchResource) Update added in v0.1.3

type BranchResourceEndpointModel added in v0.1.3

type BranchResourceEndpointModel struct {
	Id                 types.String  `tfsdk:"id"`
	Host               types.String  `tfsdk:"host"`
	MinCu              types.Float64 `tfsdk:"min_cu"`
	MaxCu              types.Float64 `tfsdk:"max_cu"`
	ComputeProvisioner types.String  `tfsdk:"compute_provisioner"`
	SuspendTimeout     types.Int64   `tfsdk:"suspend_timeout"`
}

type BranchResourceModel added in v0.1.3

type BranchResourceModel struct {
	Id        types.String `tfsdk:"id"`
	Name      types.String `tfsdk:"name"`
	ParentId  types.String `tfsdk:"parent_id"`
	ProjectId types.String `tfsdk:"project_id"`
	Endpoint  types.Object `tfsdk:"endpoint"`
}

type BranchUpdateInput

type BranchUpdateInput struct {
	Branch BranchUpdateInputBranch `json:"branch"`
}

type BranchUpdateInputBranch

type BranchUpdateInputBranch struct {
	Name string `json:"name"`
}

type Database

type Database struct {
	Id        int64  `json:"id"`
	BranchId  string `json:"branch_id"`
	Name      string `json:"name"`
	OwnerName string `json:"owner_name"`
}

type DatabaseCreateInput

type DatabaseCreateInput struct {
	Database DatabaseCreateInputDatabase `json:"database"`
}

type DatabaseCreateInputDatabase

type DatabaseCreateInputDatabase struct {
	Name      string `json:"name"`
	OwnerName string `json:"owner_name"`
}

type DatabaseOutput

type DatabaseOutput struct {
	Database Database `json:"database"`
}

type DatabaseResource

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

func (*DatabaseResource) Configure

func (*DatabaseResource) Create

func (*DatabaseResource) Delete

func (*DatabaseResource) ImportState

func (*DatabaseResource) Metadata

func (*DatabaseResource) Read

func (*DatabaseResource) Schema

func (*DatabaseResource) Update

type DatabaseResourceModel

type DatabaseResourceModel struct {
	Id        types.Int64  `tfsdk:"id"`
	Name      types.String `tfsdk:"name"`
	OwnerName types.String `tfsdk:"owner_name"`
	BranchId  types.String `tfsdk:"branch_id"`
	ProjectId types.String `tfsdk:"project_id"`
}

type DatabaseUpdateInput

type DatabaseUpdateInput struct {
	Database DatabaseUpdateInputDatabase `json:"database"`
}

type DatabaseUpdateInputDatabase

type DatabaseUpdateInputDatabase struct {
	Name      string `json:"name"`
	OwnerName string `json:"owner_name"`
}

type Endpoint

type Endpoint struct {
	Id                    string  `json:"id"`
	Host                  string  `json:"host"`
	BranchId              string  `json:"branch_id"`
	ProjectId             string  `json:"project_id"`
	RegionId              string  `json:"region_id"`
	AutoscalingLimitMinCu float64 `json:"autoscaling_limit_min_cu"`
	AutoscalingLimitMaxCu float64 `json:"autoscaling_limit_max_cu"`
	ComputeProvisioner    string  `json:"provisioner"`
	SuspendTimeoutSeconds int64   `json:"suspend_timeout_seconds"`
	Type                  string  `json:"type"`
	CurrentState          string  `json:"current_state"`
}

type EndpointCreateInput added in v0.1.3

type EndpointCreateInput struct {
	Endpoint EndpointCreateInputEndpoint `json:"endpoint"`
}

type EndpointCreateInputEndpoint added in v0.1.3

type EndpointCreateInputEndpoint struct {
	BranchId              string  `json:"branch_id"`
	Type                  string  `json:"type"`
	AutoscalingLimitMinCu float64 `json:"autoscaling_limit_min_cu"`
	AutoscalingLimitMaxCu float64 `json:"autoscaling_limit_max_cu"`
	SuspendTimeoutSeconds int64   `json:"suspend_timeout_seconds"`
}

type EndpointOutput

type EndpointOutput struct {
	Endpoint Endpoint `json:"endpoint"`
}

type EndpointResource added in v0.1.3

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

func (*EndpointResource) Configure added in v0.1.3

func (*EndpointResource) Create added in v0.1.3

func (*EndpointResource) Delete added in v0.1.3

func (*EndpointResource) ImportState added in v0.1.3

func (*EndpointResource) Metadata added in v0.1.3

func (*EndpointResource) Read added in v0.1.3

func (*EndpointResource) Schema added in v0.1.3

func (*EndpointResource) Update added in v0.1.3

type EndpointResourceModel added in v0.1.3

type EndpointResourceModel struct {
	Id                 types.String  `tfsdk:"id"`
	BranchId           types.String  `tfsdk:"branch_id"`
	ProjectId          types.String  `tfsdk:"project_id"`
	Type               types.String  `tfsdk:"type"`
	Host               types.String  `tfsdk:"host"`
	MinCu              types.Float64 `tfsdk:"min_cu"`
	MaxCu              types.Float64 `tfsdk:"max_cu"`
	ComputeProvisioner types.String  `tfsdk:"compute_provisioner"`
	SuspendTimeout     types.Int64   `tfsdk:"suspend_timeout"`
}

type EndpointUpdateInput

type EndpointUpdateInput struct {
	Endpoint EndpointUpdateInputEndpoint `json:"endpoint"`
}

type EndpointUpdateInputEndpoint

type EndpointUpdateInputEndpoint struct {
	AutoscalingLimitMinCu float64 `json:"autoscaling_limit_min_cu"`
	AutoscalingLimitMaxCu float64 `json:"autoscaling_limit_max_cu"`
	SuspendTimeoutSeconds int64   `json:"suspend_timeout_seconds"`
}

type NeonProvider

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

func (*NeonProvider) Configure

func (*NeonProvider) DataSources

func (p *NeonProvider) DataSources(ctx context.Context) []func() datasource.DataSource

func (*NeonProvider) Metadata

func (*NeonProvider) Resources

func (p *NeonProvider) Resources(ctx context.Context) []func() resource.Resource

func (*NeonProvider) Schema

type NeonProviderModel

type NeonProviderModel struct {
	Token types.String `tfsdk:"token"`
}

type Operation

type Operation struct {
	Id         string `json:"id"`
	Action     string `json:"action"`
	Status     string `json:"status"`
	EndpointId string `json:"endpoint_id"`
	BranchId   string `json:"branch_id"`
	ProjectId  string `json:"project_id"`
}

type OperationListOutput

type OperationListOutput struct {
	Operations []Operation `json:"operations"`
}

type Project

type Project struct {
	Id             string `json:"id"`
	Name           string `json:"name"`
	PlatformId     string `json:"platform_id"`
	RegionId       string `json:"region_id"`
	PgVersion      int64  `json:"pg_version"`
	StorePasswords bool   `json:"store_passwords"`
}

type ProjectCreateInput

type ProjectCreateInput struct {
	Project ProjectCreateInputProject `json:"project"`
}

type ProjectCreateInputProject

type ProjectCreateInputProject struct {
	Name                    string                                           `json:"name"`
	RegionId                string                                           `json:"region_id"`
	PgVersion               int64                                            `json:"pg_version"`
	StorePasswords          bool                                             `json:"store_passwords"`
	Branch                  ProjectCreateInputProjectBranch                  `json:"branch"`
	DefaultEndpointSettings ProjectCreateInputProjectDefaultEndpointSettings `json:"default_endpoint_settings"`
}

type ProjectCreateInputProjectBranch

type ProjectCreateInputProjectBranch struct {
	Name string `json:"name"`
}

type ProjectCreateInputProjectDefaultEndpointSettings added in v0.1.3

type ProjectCreateInputProjectDefaultEndpointSettings struct {
	AutoscalingLimitMinCu float64 `json:"autoscaling_limit_min_cu"`
	AutoscalingLimitMaxCu float64 `json:"autoscaling_limit_max_cu"`
	SuspendTimeoutSeconds int64   `json:"suspend_timeout_seconds"`
}

type ProjectCreateOutput

type ProjectCreateOutput struct {
	Project   Project    `json:"project"`
	Roles     []Role     `json:"roles"`
	Databases []Database `json:"databases"`
	Branch    Branch     `json:"branch"`
	Endpoints []Endpoint `json:"endpoints"`
}

type ProjectOutput

type ProjectOutput struct {
	Project Project `json:"project"`
}

type ProjectResource

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

func (*ProjectResource) Configure

func (*ProjectResource) Create

func (*ProjectResource) Delete

func (*ProjectResource) ImportState

func (*ProjectResource) Metadata

func (*ProjectResource) Read

func (*ProjectResource) Schema

func (*ProjectResource) Update

type ProjectResourceBranchEndpointModel

type ProjectResourceBranchEndpointModel struct {
	Id                 types.String  `tfsdk:"id"`
	Host               types.String  `tfsdk:"host"`
	MinCu              types.Float64 `tfsdk:"min_cu"`
	MaxCu              types.Float64 `tfsdk:"max_cu"`
	ComputeProvisioner types.String  `tfsdk:"compute_provisioner"`
	SuspendTimeout     types.Int64   `tfsdk:"suspend_timeout"`
}

type ProjectResourceBranchModel

type ProjectResourceBranchModel struct {
	Id       types.String `tfsdk:"id"`
	Name     types.String `tfsdk:"name"`
	Endpoint types.Object `tfsdk:"endpoint"`
}

type ProjectResourceModel

type ProjectResourceModel struct {
	Id         types.String `tfsdk:"id"`
	Name       types.String `tfsdk:"name"`
	PlatformId types.String `tfsdk:"platform_id"`
	RegionId   types.String `tfsdk:"region_id"`
	PgVersion  types.Int64  `tfsdk:"pg_version"`
	Branch     types.Object `tfsdk:"branch"`
}

type ProjectUpdateInput

type ProjectUpdateInput struct {
	Project ProjectUpdateInputProject `json:"project"`
}

type ProjectUpdateInputProject

type ProjectUpdateInputProject struct {
	Name string `json:"name"`
}

type Role

type Role struct {
	Name     string `json:"name"`
	Password string `json:"password"`
	BranchId string `json:"branch_id"`
}

type RoleCreateInput

type RoleCreateInput struct {
	Role RoleCreateInputRole `json:"role"`
}

type RoleCreateInputRole

type RoleCreateInputRole struct {
	Name string `json:"name"`
}

type RoleOutput

type RoleOutput struct {
	Role Role `json:"role"`
}

type RolePasswordOutput added in v0.1.4

type RolePasswordOutput struct {
	Password string `json:"password"`
}

type RoleResource

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

func (*RoleResource) Configure

func (*RoleResource) Create

func (*RoleResource) Delete

func (*RoleResource) ImportState

func (*RoleResource) Metadata

func (*RoleResource) Read

func (*RoleResource) Schema

func (*RoleResource) Update

type RoleResourceModel

type RoleResourceModel struct {
	Id        types.String `tfsdk:"id"`
	Name      types.String `tfsdk:"name"`
	Password  types.String `tfsdk:"password"`
	BranchId  types.String `tfsdk:"branch_id"`
	ProjectId types.String `tfsdk:"project_id"`
}

Jump to

Keyboard shortcuts

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