provider

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2024 License: MIT Imports: 41 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OriginTypeAws           = "aws"
	OriginTypeObjectStorage = "object-storage"
	OriginTypeUrl           = "url"
)

Variables

This section is empty.

Functions

func CreateCdnResourceSchema

func CreateCdnResourceSchema() schema.Schema

func CreateOriginResourceSchema

func CreateOriginResourceSchema() schema.Schema

func CreateSslResourceSchema

func CreateSslResourceSchema() schema.Schema

func New

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

func NewCdnDataSource

func NewCdnDataSource() datasource.DataSource

func NewCdnResource

func NewCdnResource() resource.Resource

func NewCdnsDataSource

func NewCdnsDataSource() datasource.DataSource

func NewClient

func NewClient(endpoint string, token string, timeout time.Duration) (cdn77.ClientWithResponsesInterface, error)

func NewObjectStoragesDataSource

func NewObjectStoragesDataSource() datasource.DataSource

func NewOriginDataSource

func NewOriginDataSource() datasource.DataSource

func NewOriginResource

func NewOriginResource() resource.Resource

func NewOriginsDataSource

func NewOriginsDataSource() datasource.DataSource

func NewSslDataSource

func NewSslDataSource() datasource.DataSource

func NewSslResource

func NewSslResource() resource.Resource

func NewSslsDataSource

func NewSslsDataSource() datasource.DataSource

Types

type Cdn77Provider

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

func (*Cdn77Provider) Configure

func (*Cdn77Provider) DataSources

func (*Cdn77Provider) DataSources(context.Context) []func() datasource.DataSource

func (*Cdn77Provider) Metadata

func (*Cdn77Provider) Resources

func (*Cdn77Provider) Resources(context.Context) []func() resource.Resource

func (*Cdn77Provider) Schema

type Cdn77ProviderModel

type Cdn77ProviderModel struct {
	Endpoint types.String `tfsdk:"endpoint"`
	Token    types.String `tfsdk:"token"`
	Timeout  types.Int64  `tfsdk:"timeout"`
}

type CdnDataReader

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

func NewCdnDataSourceReader

func NewCdnDataSourceReader(ctx context.Context, client cdn77.ClientWithResponsesInterface) *CdnDataReader

func NewCdnResourceReader

func NewCdnResourceReader(ctx context.Context, client cdn77.ClientWithResponsesInterface) *CdnDataReader

func (*CdnDataReader) Read

func (d *CdnDataReader) Read(provider StateProvider, diags *diag.Diagnostics, state *tfsdk.State)

type CdnDataSource

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

func (*CdnDataSource) Configure

func (*CdnDataSource) Metadata

func (*CdnDataSource) Read

func (*CdnDataSource) Schema

type CdnModel

type CdnModel struct {
	Id                        types.Int64                `tfsdk:"id"`
	Cnames                    types.Set                  `tfsdk:"cnames"`
	CreationTime              types.String               `tfsdk:"creation_time"`
	Label                     types.String               `tfsdk:"label"`
	Note                      types.String               `tfsdk:"note"`
	OriginId                  types.String               `tfsdk:"origin_id"`
	OriginProtectionEnabled   types.Bool                 `tfsdk:"origin_protection_enabled"`
	Url                       types.String               `tfsdk:"url"`
	Cache                     *CdnModelCache             `tfsdk:"cache"`
	SecureToken               *CdnModelSecureToken       `tfsdk:"secure_token"`
	QueryString               *CdnModelQueryString       `tfsdk:"query_string"`
	Headers                   *CdnModelHeaders           `tfsdk:"headers"`
	HttpsRedirect             *CdnModelHttpsRedirect     `tfsdk:"https_redirect"`
	Mp4PseudoStreamingEnabled types.Bool                 `tfsdk:"mp4_pseudo_streaming_enabled"`
	WafEnabled                types.Bool                 `tfsdk:"waf_enabled"`
	Ssl                       *CdnModelSsl               `tfsdk:"ssl"`
	Stream                    *CdnModelStream            `tfsdk:"stream"`
	HotlinkProtection         *CdnModelHotlinkProtection `tfsdk:"hotlink_protection"`
	IpProtection              *CdnModelIpProtection      `tfsdk:"ip_protection"`
	GeoProtection             *CdnModelGeoProtection     `tfsdk:"geo_protection"`
	RateLimitEnabled          types.Bool                 `tfsdk:"rate_limit_enabled"`
	OriginHeaders             types.Map                  `tfsdk:"origin_headers"`
}

type CdnModelCache

type CdnModelCache struct {
	MaxAge                     types.Int64 `tfsdk:"max_age"`
	MaxAge404                  types.Int64 `tfsdk:"max_age_404"`
	RequestsWithCookiesEnabled types.Bool  `tfsdk:"requests_with_cookies_enabled"`
}

type CdnModelGeoProtection

type CdnModelGeoProtection struct {
	Countries types.Set    `tfsdk:"countries"`
	Type      types.String `tfsdk:"type"`
}

type CdnModelHeaders

type CdnModelHeaders struct {
	CorsEnabled                 types.Bool   `tfsdk:"cors_enabled"`
	CorsTimingEnabled           types.Bool   `tfsdk:"cors_timing_enabled"`
	CorsWildcardEnabled         types.Bool   `tfsdk:"cors_wildcard_enabled"`
	HostHeaderForwardingEnabled types.Bool   `tfsdk:"host_header_forwarding_enabled"`
	ContentDispositionType      types.String `tfsdk:"content_disposition_type"`
}

type CdnModelHotlinkProtection

type CdnModelHotlinkProtection struct {
	Domains            types.Set    `tfsdk:"domains"`
	Type               types.String `tfsdk:"type"`
	EmptyRefererDenied types.Bool   `tfsdk:"empty_referer_denied"`
}

type CdnModelHttpsRedirect

type CdnModelHttpsRedirect struct {
	Code    types.Int64 `tfsdk:"code"`
	Enabled types.Bool  `tfsdk:"enabled"`
}

type CdnModelIpProtection

type CdnModelIpProtection struct {
	Ips  types.Set    `tfsdk:"ips"`
	Type types.String `tfsdk:"type"`
}

type CdnModelQueryString

type CdnModelQueryString struct {
	Parameters types.Set    `tfsdk:"parameters"`
	IgnoreType types.String `tfsdk:"ignore_type"`
}

type CdnModelSecureToken

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

type CdnModelSsl

type CdnModelSsl struct {
	Type  types.String `tfsdk:"type"`
	SslId types.String `tfsdk:"ssl_id"`
}

type CdnModelStream

type CdnModelStream struct {
	OriginUrl types.String `tfsdk:"origin_url"`
	Password  types.String `tfsdk:"password"`
	QueryKey  types.String `tfsdk:"query_key"`
	Protocol  types.String `tfsdk:"protocol"`
	Port      types.Int64  `tfsdk:"port"`
	Path      types.String `tfsdk:"path"`
}

type CdnResource

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

func (*CdnResource) ConfigValidators

func (*CdnResource) ConfigValidators(context.Context) []resource.ConfigValidator

func (*CdnResource) Configure

func (*CdnResource) Create

func (*CdnResource) Delete

func (*CdnResource) ImportState added in v1.1.0

func (*CdnResource) Metadata

func (*CdnResource) Read

func (*CdnResource) Schema

func (*CdnResource) Update

type CdnSummaryModel

type CdnSummaryModel struct {
	Id                        types.Int64  `tfsdk:"id"`
	Cnames                    types.Set    `tfsdk:"cnames"`
	CreationTime              types.String `tfsdk:"creation_time"`
	Label                     types.String `tfsdk:"label"`
	Note                      types.String `tfsdk:"note"`
	OriginId                  types.String `tfsdk:"origin_id"`
	Url                       types.String `tfsdk:"url"`
	Mp4PseudoStreamingEnabled types.Bool   `tfsdk:"mp4_pseudo_streaming_enabled"`
}

type CdnSwitchableAttrsConfigValidator

type CdnSwitchableAttrsConfigValidator struct{}

func NewCdnNullableListsConfigValidator

func NewCdnNullableListsConfigValidator() *CdnSwitchableAttrsConfigValidator

func (CdnSwitchableAttrsConfigValidator) Description

func (CdnSwitchableAttrsConfigValidator) MarkdownDescription

func (CdnSwitchableAttrsConfigValidator) Validate

func (CdnSwitchableAttrsConfigValidator) ValidateDataSource

func (CdnSwitchableAttrsConfigValidator) ValidateResource

type CdnsDataSource

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

func (*CdnsDataSource) Configure

func (*CdnsDataSource) Metadata

func (*CdnsDataSource) Read

func (*CdnsDataSource) Schema

type CdnsModel

type CdnsModel struct {
	Cdns []CdnSummaryModel `tfsdk:"cdns"`
}

type ObjectStorageModel

type ObjectStorageModel struct {
	Id     types.String `tfsdk:"id"`
	Host   types.String `tfsdk:"host"`
	Label  types.String `tfsdk:"label"`
	Port   types.Int64  `tfsdk:"port"`
	Scheme types.String `tfsdk:"scheme"`
}

type ObjectStoragesDataSource

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

func (*ObjectStoragesDataSource) Configure

func (*ObjectStoragesDataSource) Metadata

func (*ObjectStoragesDataSource) Read

func (*ObjectStoragesDataSource) Schema

type ObjectStoragesModel

type ObjectStoragesModel struct {
	Clusters []ObjectStorageModel `tfsdk:"clusters"`
}

type OriginConfigValidator

type OriginConfigValidator struct{}

func NewOriginTypeConfigValidator

func NewOriginTypeConfigValidator() *OriginConfigValidator

func (OriginConfigValidator) Description

func (v OriginConfigValidator) Description(ctx context.Context) string

func (OriginConfigValidator) MarkdownDescription

func (OriginConfigValidator) MarkdownDescription(_ context.Context) string

func (OriginConfigValidator) Validate

func (OriginConfigValidator) ValidateDataSource

func (OriginConfigValidator) ValidateResource

type OriginDataReader

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

func NewOriginDataSourceReader

func NewOriginDataSourceReader(ctx context.Context, client cdn77.ClientWithResponsesInterface) *OriginDataReader

func NewOriginResourceReader

func NewOriginResourceReader(ctx context.Context, client cdn77.ClientWithResponsesInterface) *OriginDataReader

func (*OriginDataReader) Read

func (d *OriginDataReader) Read(provider StateProvider, diags *diag.Diagnostics, state *tfsdk.State)

type OriginDataSource

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

func (*OriginDataSource) Configure

func (*OriginDataSource) Metadata

func (*OriginDataSource) Read

func (*OriginDataSource) Schema

type OriginModel

type OriginModel struct {
	Id                 types.String `tfsdk:"id"`
	Type               types.String `tfsdk:"type"`
	Label              types.String `tfsdk:"label"`
	Note               types.String `tfsdk:"note"`
	AwsAccessKeyId     types.String `tfsdk:"aws_access_key_id"`
	AwsAccessKeySecret types.String `tfsdk:"aws_access_key_secret"`
	AwsRegion          types.String `tfsdk:"aws_region"`
	Acl                types.String `tfsdk:"acl"`
	ClusterId          types.String `tfsdk:"cluster_id"`
	AccessKeyId        types.String `tfsdk:"access_key_id"`
	AccessKeySecret    types.String `tfsdk:"access_key_secret"`
	BucketName         types.String `tfsdk:"bucket_name"`
	Scheme             types.String `tfsdk:"scheme"`
	Host               types.String `tfsdk:"host"`
	Port               types.Int64  `tfsdk:"port"`
	BaseDir            types.String `tfsdk:"base_dir"`
}

type OriginResource

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

func (*OriginResource) ConfigValidators

func (*OriginResource) ConfigValidators(_ context.Context) []resource.ConfigValidator

func (*OriginResource) Configure

func (*OriginResource) Create

func (*OriginResource) Delete

func (*OriginResource) ImportState added in v1.1.0

func (*OriginResource) Metadata

func (*OriginResource) Read

func (*OriginResource) Schema

func (*OriginResource) Update

type OriginsDataSource

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

func (*OriginsDataSource) Configure

func (*OriginsDataSource) Metadata

func (*OriginsDataSource) Read

func (*OriginsDataSource) Schema

type OriginsModel

type OriginsModel struct {
	Origins []OriginModel `tfsdk:"origins"`
}

type SslDataReader

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

func NewSslDataSourceReader

func NewSslDataSourceReader(ctx context.Context, client cdn77.ClientWithResponsesInterface) *SslDataReader

func NewSslResourceReader

func NewSslResourceReader(ctx context.Context, client cdn77.ClientWithResponsesInterface) *SslDataReader

func (*SslDataReader) Read

func (d *SslDataReader) Read(provider StateProvider, diags *diag.Diagnostics, state *tfsdk.State)

type SslDataSource

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

func (*SslDataSource) Configure

func (*SslDataSource) Metadata

func (*SslDataSource) Read

func (*SslDataSource) Schema

type SslModel

type SslModel struct {
	Id          types.String `tfsdk:"id"`
	Certificate types.String `tfsdk:"certificate"`
	PrivateKey  types.String `tfsdk:"private_key"`
	Subjects    types.Set    `tfsdk:"subjects"`
	ExpiresAt   types.String `tfsdk:"expires_at"`
}

type SslResource

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

func (*SslResource) Configure

func (*SslResource) Create

func (*SslResource) Delete

func (*SslResource) ImportState added in v1.1.0

func (*SslResource) Metadata

func (*SslResource) Read

func (*SslResource) Schema

func (*SslResource) Update

type SslsDataSource

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

func (*SslsDataSource) Configure

func (*SslsDataSource) Metadata

func (*SslsDataSource) Read

func (*SslsDataSource) Schema

type SslsModel

type SslsModel struct {
	Ssls []SslModel `tfsdk:"ssls"`
}

type StateProvider

type StateProvider interface {
	Get(ctx context.Context, target any) diag.Diagnostics
}

Jump to

Keyboard shortcuts

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