provider

package
v0.0.0-test Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: MPL-2.0 Imports: 34 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 NewDatabaseResource

func NewDatabaseResource() resource.Resource

func NewPrivilegeGrantResource

func NewPrivilegeGrantResource() resource.Resource

func NewRoleGrantResource

func NewRoleGrantResource() resource.Resource

func NewRoleResource

func NewRoleResource() resource.Resource

func NewTableResource

func NewTableResource() resource.Resource

func NewUserResource

func NewUserResource() resource.Resource

func NewViewResource

func NewViewResource() resource.Resource

Types

type ClickHouseProvider

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

func (*ClickHouseProvider) Configure

func (*ClickHouseProvider) DataSources

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

func (*ClickHouseProvider) Metadata

func (*ClickHouseProvider) Resources

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

func (*ClickHouseProvider) Schema

type ClickHouseProviderModel

type ClickHouseProviderModel struct {
	Username types.String `tfsdk:"username"`
	Password types.String `tfsdk:"password"`
	Host     types.String `tfsdk:"host"`
	Port     types.Int64  `tfsdk:"port"`
	Protocol types.String `tfsdk:"protocol"`
}

ClickHouseProviderModel describes the provider data model.

type ColumnModel

type ColumnModel struct {
	Name     string `tfsdk:"name"`
	Type     string `tfsdk:"type"`
	Nullable bool   `tfsdk:"nullable"`
	Comment  string `tfsdk:"comment"`
}

type CompositeNamePlanModifier

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

func NewCompositePlanModifier

func NewCompositePlanModifier(p []path.Path, sep string) CompositeNamePlanModifier

func NewCompositePlanModifierFromStr

func NewCompositePlanModifierFromStr(p []string, sep string) CompositeNamePlanModifier

func (CompositeNamePlanModifier) Description

func (CompositeNamePlanModifier) MarkdownDescription

func (m CompositeNamePlanModifier) MarkdownDescription(_ context.Context) string

func (CompositeNamePlanModifier) PlanModifyString

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.String `tfsdk:"id"`
	Name    types.String `tfsdk:"name"`
	Engine  types.String `tfsdk:"engine"`
	Comment types.String `tfsdk:"comment"`
}

type GrantRecord

type GrantRecord struct {
	Database        string   `tfsdk:"database"`
	Table           string   `tfsdk:"table"`
	Columns         []string `tfsdk:"columns"`
	WithGrantOption bool     `tfsdk:"with_grant_option"`
}

type IdentifiedWithValidator

type IdentifiedWithValidator struct{}

func (IdentifiedWithValidator) Description

func (IdentifiedWithValidator) MarkdownDescription

func (v IdentifiedWithValidator) MarkdownDescription(context.Context) string

func (IdentifiedWithValidator) ValidateMap

type PrivilegeGrantResource

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

func (*PrivilegeGrantResource) Configure

func (*PrivilegeGrantResource) Create

func (*PrivilegeGrantResource) Delete

func (*PrivilegeGrantResource) ImportState

func (*PrivilegeGrantResource) Metadata

func (*PrivilegeGrantResource) Read

func (*PrivilegeGrantResource) Schema

func (*PrivilegeGrantResource) Update

type PrivilegeGrantResourceModel

type PrivilegeGrantResourceModel struct {
	ID         types.String  `tfsdk:"id"`
	Grantee    string        `tfsdk:"grantee"`
	AccessType string        `tfsdk:"access_type"`
	Grants     []GrantRecord `tfsdk:"grants"`
}

type RoleGrantResource

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

func (*RoleGrantResource) Configure

func (*RoleGrantResource) Create

func (*RoleGrantResource) Delete

func (*RoleGrantResource) ImportState

func (*RoleGrantResource) Metadata

func (*RoleGrantResource) Read

func (*RoleGrantResource) Schema

func (*RoleGrantResource) Update

type RoleGrantResourceModel

type RoleGrantResourceModel struct {
	ID              types.String `tfsdk:"id"`
	Grantee         string       `tfsdk:"grantee"`
	Role            string       `tfsdk:"role"`
	WithAdminOption bool         `tfsdk:"with_admin_option"`
}

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 string       `tfsdk:"name"`
}

type TableResource

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

func (*TableResource) Configure

func (*TableResource) Create

func (*TableResource) Delete

func (*TableResource) ImportState

func (*TableResource) Metadata

func (*TableResource) Read

func (*TableResource) Schema

func (*TableResource) Update

type TableResourceModel

type TableResourceModel struct {
	Database string       `tfsdk:"database"`
	Name     string       `tfsdk:"name"`
	FullName types.String `tfsdk:"full_name"`
	ID       types.String `tfsdk:"id"`

	Columns []ColumnModel `tfsdk:"columns"`

	Engine           string     `tfsdk:"engine"`
	EngineParameters types.List `tfsdk:"engine_parameters"`

	PartitionBy types.String `tfsdk:"partition_by"`
	OrderBy     []string     `tfsdk:"order_by"`
	PrimaryKey  types.List   `tfsdk:"primary_key"`
	Settings    types.Map    `tfsdk:"settings"`

	Comment string `tfsdk:"comment"`
}

type UserResource

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

UserResource defines the resource implementation.

func (*UserResource) Configure

func (*UserResource) Create

func (*UserResource) Delete

func (*UserResource) ImportState

func (*UserResource) Metadata

func (*UserResource) Read

func (*UserResource) Schema

func (*UserResource) Update

type UserResourceModel

type UserResourceModel struct {
	ID              types.String      `tfsdk:"id"`
	Name            string            `tfsdk:"name"`
	IdentifiedWith  identifiedWith    `tfsdk:"identified_with"`
	Hosts           *userAllowedHosts `tfsdk:"hosts"`
	DefaultDatabase types.String      `tfsdk:"default_database"`
}

func (UserResourceModel) ToClickHouseClientUser

func (user UserResourceModel) ToClickHouseClientUser() (chclient.ClickHouseUser, error)

type ViewResource

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

func (*ViewResource) Configure

func (*ViewResource) Create

func (*ViewResource) Delete

func (*ViewResource) ImportState

func (*ViewResource) Metadata

func (*ViewResource) Read

func (*ViewResource) Schema

func (*ViewResource) Update

type ViewResourceModel

type ViewResourceModel struct {
	ID       types.String `tfsdk:"id"`
	Database string       `tfsdk:"database"`
	Name     string       `tfsdk:"name"`
	FullName types.String `tfsdk:"full_name"`
	Query    string       `tfsdk:"query"`
}

Jump to

Keyboard shortcuts

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