model

package
v0.1.18 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JsonBytesEqual added in v0.1.10

func JsonBytesEqual(a, b []byte) (bool, error)

JsonBytesEqual compares the JSON in two byte slices for equality

Types

type Certificate

type Certificate struct {
	Id               types.Int64  `tfsdk:"id"`
	CertId           types.Int64  `tfsdk:"cert_id"`
	Certificate      types.String `tfsdk:"certificate"`
	CertificateChain types.String `tfsdk:"certificate_chain"`
	PrivateKey       types.String `tfsdk:"private_key"`
	//Email            types.String `tfsdk:"email"`
	Description types.String `tfsdk:"description"`
	PkHash      types.String `tfsdk:"pk_hash"`
	Tenant      types.String `tfsdk:"tenant"`
	Domain      types.String `tfsdk:"domain"`
	Status      types.String `tfsdk:"status"`
	Type        types.String `tfsdk:"type"`
}

certificate maps Certificate schema data.

type CertificateBuilder

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

func NewCertificateBuilder added in v0.1.8

func NewCertificateBuilder() *CertificateBuilder

func (*CertificateBuilder) Build

func (b *CertificateBuilder) Build() Certificate

func (*CertificateBuilder) Certificate

func (b *CertificateBuilder) Certificate(value string) *CertificateBuilder

func (*CertificateBuilder) CertificateChain

func (b *CertificateBuilder) CertificateChain(value string) *CertificateBuilder

func (*CertificateBuilder) CertificateId

func (b *CertificateBuilder) CertificateId(value int64) *CertificateBuilder

func (*CertificateBuilder) Description

func (b *CertificateBuilder) Description(description string) *CertificateBuilder

func (*CertificateBuilder) Domain

func (b *CertificateBuilder) Domain(description string) *CertificateBuilder

func (*CertificateBuilder) PkHash

func (b *CertificateBuilder) PkHash(value string) *CertificateBuilder

func (*CertificateBuilder) PrivateKey

func (b *CertificateBuilder) PrivateKey(value string) *CertificateBuilder

func (*CertificateBuilder) Status

func (b *CertificateBuilder) Status(description string) *CertificateBuilder

func (*CertificateBuilder) Tenant

func (b *CertificateBuilder) Tenant(description string) *CertificateBuilder

func (*CertificateBuilder) Type

func (b *CertificateBuilder) Type(description string) *CertificateBuilder

type CertificateDataModel

type CertificateDataModel struct {
	CertId           types.Int64  `tfsdk:"cert_id"`
	Certificate      types.String `tfsdk:"certificate"`
	CertificateChain types.String `tfsdk:"certificate_chain"`
	//Email            types.String `tfsdk:"email"`
	Description types.String `tfsdk:"description"`
	PkHash      types.String `tfsdk:"pk_hash"`
	Tenant      types.String `tfsdk:"tenant"`
	Domain      types.String `tfsdk:"domain"`
	Status      types.String `tfsdk:"status"`
	Type        types.String `tfsdk:"type"`
}

certificateModel maps Certificate schema data.

type CertificateTemplate added in v0.1.15

type CertificateTemplate struct {
	CertificateTemplateId          types.Int64    `tfsdk:"certificate_template_id"`
	Country                        types.String   `tfsdk:"country"`
	Tenant                         types.String   `tfsdk:"tenant"`
	State                          types.String   `tfsdk:"state"`
	Locality                       types.String   `tfsdk:"locality"`
	OrganizationName               types.String   `tfsdk:"organization_name"`
	CommonName                     types.String   `tfsdk:"common_name"`
	SANs                           []types.String `tfsdk:"sans"`
	AutoManagedCertificateTemplate types.Bool     `tfsdk:"auto_managed_certificate_template"`
	LastCertificateID              types.Int64    `tfsdk:"last_certificate_id"`
	CsrIds                         types.List     `tfsdk:"csr_ids"`
}

CertificateTemplate maps CertificateTemplate schema data.

type CertificateTemplateBuilder added in v0.1.15

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

func NewCertificateTemplateBuilder added in v0.1.15

func NewCertificateTemplateBuilder() *CertificateTemplateBuilder

func (*CertificateTemplateBuilder) AddCsrIds added in v0.1.15

func (*CertificateTemplateBuilder) AddSANs added in v0.1.15

func (*CertificateTemplateBuilder) AutoManagedCertificateTemplate added in v0.1.15

func (b *CertificateTemplateBuilder) AutoManagedCertificateTemplate(value bool) *CertificateTemplateBuilder

func (*CertificateTemplateBuilder) Build added in v0.1.15

func (*CertificateTemplateBuilder) CertificateTemplateId added in v0.1.15

func (b *CertificateTemplateBuilder) CertificateTemplateId(value int64) *CertificateTemplateBuilder

func (*CertificateTemplateBuilder) CommonName added in v0.1.15

func (*CertificateTemplateBuilder) Country added in v0.1.15

func (*CertificateTemplateBuilder) LastCertificateID added in v0.1.15

func (b *CertificateTemplateBuilder) LastCertificateID(value *int64) *CertificateTemplateBuilder

func (*CertificateTemplateBuilder) Locality added in v0.1.15

func (*CertificateTemplateBuilder) OrganizationName added in v0.1.15

func (b *CertificateTemplateBuilder) OrganizationName(value *string) *CertificateTemplateBuilder

func (*CertificateTemplateBuilder) State added in v0.1.15

func (*CertificateTemplateBuilder) Tenant added in v0.1.15

type CertificateTemplateDataModel added in v0.1.15

type CertificateTemplateDataModel struct {
	CertificateTemplateId          types.Int64  `tfsdk:"certificate_template_id"`
	Country                        types.String `tfsdk:"country"`
	Tenant                         types.String `tfsdk:"tenant"`
	State                          types.String `tfsdk:"state"`
	Locality                       types.String `tfsdk:"locality"`
	OrganizationName               types.String `tfsdk:"organization_name"`
	CommonName                     types.String `tfsdk:"common_name"`
	SANs                           types.List   `tfsdk:"sans"`
	AutoManagedCertificateTemplate types.Bool   `tfsdk:"auto_managed_certificate_template"`
	LastCertificateID              types.Int64  `tfsdk:"last_certificate_id"`
	CsrIds                         types.List   `tfsdk:"csr_ids"`
}

CertificateTemplateModel maps CertificateTemplate schema data.

type HostIndexString added in v0.1.10

type HostIndexString struct {
	basetypes.StringValue
}

func (HostIndexString) Equal added in v0.1.10

func (v HostIndexString) Equal(o attr.Value) bool

HostIndexString custom value methods

func (HostIndexString) StringSemanticEquals added in v0.1.10

func (v HostIndexString) StringSemanticEquals(_ context.Context, newValuable basetypes.StringValuable) (bool, diag.Diagnostics)

StringSemanticEquals returns true if the given string value is semantically equal to the current string value

func (HostIndexString) Type added in v0.1.10

func (v HostIndexString) Type(ctx context.Context) attr.Type

type HostIndexType added in v0.1.10

type HostIndexType struct {
	basetypes.StringType
}

func (HostIndexType) Equal added in v0.1.10

func (t HostIndexType) Equal(o attr.Type) bool

HostIndexType custom type methods

func (HostIndexType) String added in v0.1.10

func (t HostIndexType) String() string

func (HostIndexType) ValueFromString added in v0.1.10

func (HostIndexType) ValueFromTerraform added in v0.1.10

func (t HostIndexType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

func (HostIndexType) ValueType added in v0.1.10

func (t HostIndexType) ValueType(ctx context.Context) attr.Value

type NetworkIpDataModel added in v0.1.15

type NetworkIpDataModel struct {
	Ipv4 []types.String `tfsdk:"ipv4"`
	Ipv6 []types.String `tfsdk:"ipv6"`
}

IP ALLOW List model

type PubOpModel

type PubOpModel struct {
	PublishId            types.String   `tfsdk:"publish_id"`
	CreationTimeMilli    types.Int64    `tfsdk:"creation_time_milli"`
	OwnerOrgId           types.String   `tfsdk:"owner_org_id"`
	LastUpdateTimeMilli  types.Int64    `tfsdk:"last_update_time_milli"`
	RevisionId           types.String   `tfsdk:"revision_id"`
	Target               types.String   `tfsdk:"target"`
	Username             types.String   `tfsdk:"username"`
	PublishState         types.String   `tfsdk:"publish_state"`
	PublishStatus        types.String   `tfsdk:"publish_status"`
	OperationType        types.String   `tfsdk:"operation_type"`
	StatusLine           []types.String `tfsdk:"status_line"`
	IsActive             types.Bool     `tfsdk:"is_active"`
	ValidatorsErrDetails types.String   `tfsdk:"validators_err_details"`
}

PubOpModel maps publishing operation schema data.

type QwiltSitesDataSourceModel

type QwiltSitesDataSourceModel struct {
	Site     []SiteModel       `tfsdk:"site"`
	Revision []SiteConfigModel `tfsdk:"revision"`
	PubOp    []PubOpModel      `tfsdk:"publish_op"`
	Filter   types.Object      `tfsdk:"filter"`
}

QwiltSitesDataSourceModel maps the data source schema data.

type QwiltSitesFilterModel

type QwiltSitesFilterModel struct {
	SiteId            types.String `tfsdk:"site_id"`
	RevisionId        types.String `tfsdk:"revision_id"`
	PublishId         types.String `tfsdk:"publish_id"`
	TruncateHostIndex types.Bool   `tfsdk:"truncate_host_index"`
}

QwiltSitesFilterModel

type Settings

type Settings struct {
	// CDN
	EnvType   string `tfsdk:"env_type"`
	Username  string `tfsdk:"username"`
	Password  string `tfsdk:"password"`
	XApiToken string `tfsdk:"token"`
}

type Site

type Site struct {
	Id                           types.String `tfsdk:"id"`
	SiteId                       types.String `tfsdk:"site_id"`
	OwnerOrgId                   types.String `tfsdk:"owner_org_id"`
	SiteDnsCnameDelegationTarget types.String `tfsdk:"site_dns_cname_delegation_target"`
	SiteName                     types.String `tfsdk:"site_name"`
	RoutingMethod                types.String `tfsdk:"routing_method"`
	LastUpdateTimeMilli          types.Int64  `tfsdk:"last_update_time_milli"`
}

type SiteActivation

type SiteActivation struct {
	Id                      types.String `tfsdk:"id"`
	SiteId                  types.String `tfsdk:"site_id"`
	RevisionId              types.String `tfsdk:"revision_id"`
	CertificateId           types.Int64  `tfsdk:"certificate_id"`
	CertificateTemplateId   types.Int64  `tfsdk:"certificate_template_id"`
	PublishId               types.String `tfsdk:"publish_id"`
	CreationTimeMilli       types.Int64  `tfsdk:"creation_time_milli"`
	OwnerOrgId              types.String `tfsdk:"owner_org_id"`
	LastUpdateTimeMilli     types.Int64  `tfsdk:"last_update_time_milli"`
	Target                  types.String `tfsdk:"target"`
	Username                types.String `tfsdk:"username"`
	PublishState            types.String `tfsdk:"publish_state"`
	PublishStatus           types.String `tfsdk:"publish_status"`
	PublishAcceptanceStatus types.String `tfsdk:"publish_acceptance_status"`
	OperationType           types.String `tfsdk:"operation_type"`
	//StatusLine          []types.String `tfsdk:"status_line"`
	IsActive           types.Bool   `tfsdk:"is_active"`
	ValidateErrDetails types.String `tfsdk:"validators_err_details"`
}

type SiteActivationBuilder

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

func NewSiteActivationBuilder added in v0.1.8

func NewSiteActivationBuilder() *SiteActivationBuilder

func (*SiteActivationBuilder) AcceptanceStatus

func (b *SiteActivationBuilder) AcceptanceStatus(value string) *SiteActivationBuilder

func (*SiteActivationBuilder) Build

func (*SiteActivationBuilder) CertificateId

func (b *SiteActivationBuilder) CertificateId(value int64) *SiteActivationBuilder

func (*SiteActivationBuilder) CreationTimeMilli added in v0.1.10

func (b *SiteActivationBuilder) CreationTimeMilli(value int) *SiteActivationBuilder

func (*SiteActivationBuilder) Ctx

func (*SiteActivationBuilder) IsActive

func (b *SiteActivationBuilder) IsActive(value bool) *SiteActivationBuilder

func (*SiteActivationBuilder) LastUpdateTimeMilli

func (b *SiteActivationBuilder) LastUpdateTimeMilli(value int) *SiteActivationBuilder

func (*SiteActivationBuilder) OperationType

func (b *SiteActivationBuilder) OperationType(value string) *SiteActivationBuilder

func (*SiteActivationBuilder) OwnerOrgId added in v0.1.10

func (b *SiteActivationBuilder) OwnerOrgId(value string) *SiteActivationBuilder

func (*SiteActivationBuilder) PublishId

func (b *SiteActivationBuilder) PublishId(value string) *SiteActivationBuilder

func (*SiteActivationBuilder) PublishState

func (b *SiteActivationBuilder) PublishState(value string) *SiteActivationBuilder

func (*SiteActivationBuilder) PublishStatus

func (b *SiteActivationBuilder) PublishStatus(value string) *SiteActivationBuilder

func (*SiteActivationBuilder) RevisionId

func (b *SiteActivationBuilder) RevisionId(value string) *SiteActivationBuilder

func (*SiteActivationBuilder) SiteId

func (*SiteActivationBuilder) Target

func (b *SiteActivationBuilder) StatusLine(values []string) *SiteActivationBuilder {
	typesStrSlice := make([]types.String, len(values))
	for i, s := range values {
		typesStrSlice[i] = types.StringValue(s)
	}
	b.activation.StatusLine = typesStrSlice
	return b
}

func (*SiteActivationBuilder) Username

func (*SiteActivationBuilder) ValidateErrDetails

func (b *SiteActivationBuilder) ValidateErrDetails(value json.RawMessage) *SiteActivationBuilder

type SiteBuilder

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

func NewSiteBuilder added in v0.1.8

func NewSiteBuilder() *SiteBuilder

func (*SiteBuilder) Build

func (b *SiteBuilder) Build() Site

func (*SiteBuilder) LastUpdateTimeMilli

func (b *SiteBuilder) LastUpdateTimeMilli(value int) *SiteBuilder

func (*SiteBuilder) OwnerOrgId

func (b *SiteBuilder) OwnerOrgId(value string) *SiteBuilder

func (*SiteBuilder) RoutingMethod

func (b *SiteBuilder) RoutingMethod(value string) *SiteBuilder

func (*SiteBuilder) SiteDnsCnameDelegationTarget

func (b *SiteBuilder) SiteDnsCnameDelegationTarget(value string) *SiteBuilder

func (*SiteBuilder) SiteId

func (b *SiteBuilder) SiteId(value string) *SiteBuilder

func (*SiteBuilder) SiteName

func (b *SiteBuilder) SiteName(value string) *SiteBuilder

func (*SiteBuilder) WithCtx

func (b *SiteBuilder) WithCtx(ctx context.Context) *SiteBuilder

type SiteConfigBuilder

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

SiteConfigBuilder is a builder for SiteConfiguration

func NewSiteConfigBuilder added in v0.1.8

func NewSiteConfigBuilder() *SiteConfigBuilder

SiteConfigBuilder methods

func (*SiteConfigBuilder) Build

func (*SiteConfigBuilder) LastUpdateTimeMilli

func (b *SiteConfigBuilder) LastUpdateTimeMilli(value int) *SiteConfigBuilder

func (*SiteConfigBuilder) WithChangeDescription

func (b *SiteConfigBuilder) WithChangeDescription(desc string) *SiteConfigBuilder

func (*SiteConfigBuilder) WithCtx

func (*SiteConfigBuilder) WithHostIndex

func (b *SiteConfigBuilder) WithHostIndex(hostIndex json.RawMessage, indent bool) *SiteConfigBuilder

func (*SiteConfigBuilder) WithOwnerOrgId

func (b *SiteConfigBuilder) WithOwnerOrgId(ownerOrgId string) *SiteConfigBuilder

func (*SiteConfigBuilder) WithRevisionId

func (b *SiteConfigBuilder) WithRevisionId(revision string) *SiteConfigBuilder

func (*SiteConfigBuilder) WithRevisionNum

func (b *SiteConfigBuilder) WithRevisionNum(revision int) *SiteConfigBuilder

func (*SiteConfigBuilder) WithSiteId

func (b *SiteConfigBuilder) WithSiteId(siteId string) *SiteConfigBuilder

type SiteConfigModel

type SiteConfigModel struct {
	SiteId              types.String `tfsdk:"site_id"`
	RevisionId          types.String `tfsdk:"revision_id"`
	RevisionNum         types.Int64  `tfsdk:"revision_num"`
	OwnerOrgId          types.String `tfsdk:"owner_org_id"`
	CreationTimeMilli   types.Int64  `tfsdk:"creation_time_milli"`
	LastUpdateTimeMilli types.Int64  `tfsdk:"last_update_time_milli"`
	CreatedUser         types.String `tfsdk:"created_user"`
	HostIndex           types.String `tfsdk:"host_index"`
	ChangeDescription   types.String `tfsdk:"change_description"`
}

SiteConfigModel maps site configuration schema data.

type SiteConfiguration

type SiteConfiguration struct {
	Id                  types.String    `tfsdk:"id"`
	SiteId              types.String    `tfsdk:"site_id"`
	RevisionId          types.String    `tfsdk:"revision_id"`
	RevisionNum         types.Int64     `tfsdk:"revision_num"`
	OwnerOrgId          types.String    `tfsdk:"owner_org_id"`
	HostIndex           HostIndexString `tfsdk:"host_index"`
	ChangeDescription   types.String    `tfsdk:"change_description"`
	LastUpdateTimeMilli types.Int64     `tfsdk:"last_update_time_milli"`
}

SiteConfiguration maps site configuration schema data.

type SiteModel

type SiteModel struct {
	SiteId                         types.String `tfsdk:"site_id"`
	OwnerOrgId                     types.String `tfsdk:"owner_org_id"`
	CreationTimeMilli              types.Int64  `tfsdk:"creation_time_milli"`
	LastUpdateTimeMilli            types.Int64  `tfsdk:"last_update_time_milli"`
	CreatedUser                    types.String `tfsdk:"created_user"`
	LastUpdatedUser                types.String `tfsdk:"last_updated_user"`
	SiteDnsCnameDelegationTarget   types.String `tfsdk:"site_dns_cname_delegation_target"`
	SiteName                       types.String `tfsdk:"site_name"`
	ApiVersion                     types.String `tfsdk:"api_version"`
	ServiceType                    types.String `tfsdk:"service_type"`
	RoutingMethod                  types.String `tfsdk:"routing_method"`
	ShouldProvisionToThirdPartyCdn types.Bool   `tfsdk:"should_provision_to_third_party_cdn"`
	ServiceId                      types.String `tfsdk:"service_id"`
	IsSelfServiceBlocked           types.Bool   `tfsdk:"is_self_service_blocked"`
	IsDeleted                      types.Bool   `tfsdk:"is_deleted"`
}

SiteModel maps Site schema data.

Jump to

Keyboard shortcuts

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