Help us shape the future of Go! Take the 2026 Go Developer Survey

logginghttps

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2026 License: MPL-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultFormatVersion     = 2
	DefaultResponseCondition = ""
	DefaultProcessingRegion  = "none"
	// DefaultGzipLevel is a sentinel meaning "gzip_level not configured". A real
	// value is 0-9, so -1 lets the provider distinguish an unset level from an
	// explicit 0 (valid "no compression"). An unset level is never written,
	// because the API rejects requests that set both compression_codec and
	// gzip_level, and it auto-manages the level otherwise (e.g. 3 for gzip).
	DefaultGzipLevel         = -1
	DefaultCompressionCodec  = ""
	DefaultContentType       = ""
	DefaultHeaderName        = ""
	DefaultHeaderValue       = ""
	DefaultJSONFormat        = "0"
	DefaultMessageType       = "blank"
	DefaultMethod            = "POST"
	DefaultPeriod            = 5
	DefaultRequestMaxBytes   = 0
	DefaultRequestMaxEntries = 0
	DefaultTLSHostname       = ""
)

Variables

This section is empty.

Functions

func BuildComputeCreateInput

func BuildComputeCreateInput(serviceID string, version int, m ComputeNestedModel) *fastly.CreateHTTPSInput

BuildComputeCreateInput is BuildCreateInput for Compute services: it never sets format, format_version, placement, or response_condition, since those only affect generated VCL and Compute services don't have any.

func BuildComputeUpdateInput

func BuildComputeUpdateInput(serviceID string, version int, m ComputeNestedModel) *fastly.UpdateHTTPSInput

BuildComputeUpdateInput is BuildUpdateInput for Compute services: it never sets format, format_version, placement, or response_condition, since those only affect generated VCL and Compute services don't have any.

func BuildCreateInput

func BuildCreateInput(serviceID string, version int, m NestedModel) *fastly.CreateHTTPSInput

func BuildUpdateInput

func BuildUpdateInput(serviceID string, version int, m NestedModel) *fastly.UpdateHTTPSInput

func ClearVCLOnlyCreateFields

func ClearVCLOnlyCreateFields(input *fastly.CreateHTTPSInput)

ClearVCLOnlyCreateFields nils out format, format_version, placement, and response_condition on a CreateHTTPSInput. The standalone fastly_service_logging_https resource shares one schema across both service types, so this is called instead of BuildComputeCreateInput to strip the VCL-only fields once the service is confirmed to be Compute.

func ClearVCLOnlyUpdateFields

func ClearVCLOnlyUpdateFields(input *fastly.UpdateHTTPSInput)

ClearVCLOnlyUpdateFields is ClearVCLOnlyCreateFields for UpdateHTTPSInput.

func CommonAttributes

func CommonAttributes() map[string]schema.Attribute

CommonAttributes returns the full HTTPS logging attribute set — the shared attributes plus the VCL-only ones (format, format_version, placement, response_condition). Used by the standalone fastly_service_logging_https resource (which can attach to either service type) and the VCL nested block (NestedBlockSchema). Compute services use ComputeAttributes instead.

func ComputeAttributes

func ComputeAttributes() map[string]schema.Attribute

ComputeAttributes returns the HTTPS logging attribute set for Compute services, omitting the VCL-only attributes exposed by CommonAttributes.

func ComputeEqual

func ComputeEqual(a, b []ComputeNestedModel) bool

func ComputeNestedBlockSchema

func ComputeNestedBlockSchema() schema.ListNestedBlock

ComputeNestedBlockSchema returns the HTTPS logging nested block schema for Compute services (service_compute_auto.logging_https), omitting the VCL-only attributes.

func ComputeReconcile

func ComputeReconcile(ctx context.Context, client *fastly.Client, serviceID string, version int, desired []ComputeNestedModel) error

func Equal

func Equal(a, b []NestedModel) bool

func NestedBlockSchema

func NestedBlockSchema() schema.ListNestedBlock

NestedBlockSchema returns the HTTPS logging nested block schema for VCL services (service_cdn_auto.logging_https), including the VCL-only attributes.

func NewListResource

func NewListResource() list.ListResource

func NewResource

func NewResource() resource.Resource

func NewTLSObject

func NewTLSObject(caCert, clientCert, clientKey, hostname types.String) types.Object

func Reconcile

func Reconcile(ctx context.Context, client *fastly.Client, serviceID string, version int, desired []NestedModel) error

func ResetVCLOnlyToDefaults

func ResetVCLOnlyToDefaults(m *NestedModel)

ResetVCLOnlyToDefaults restores the VCL-only fields to their schema defaults after a flatten. On a Compute service they are never sent, so the API's own values are discarded rather than reported as a diff against the plan.

func ResourceAttributes

func ResourceAttributes() map[string]schema.Attribute

func ValidateConditionReferences

func ValidateConditionReferences(endpoints []NestedModel, conditionNames map[string]struct{}) error

ValidateConditionReferences rejects a response_condition naming a condition block absent from config.

func ValidateNoVCLOnlyAttributesForCompute

func ValidateNoVCLOnlyAttributesForCompute(ctx context.Context, cfg tfsdk.Config) diag.Diagnostics

ValidateNoVCLOnlyAttributesForCompute returns an error diagnostic if format, format_version, placement, or response_condition are explicitly configured on a Compute service. The standalone fastly_service_logging_https resource has one schema shared by both service types — unlike the nested blocks, which have distinct VCL (NestedBlockSchema) and Compute (ComputeNestedBlockSchema) schemas — so this is the only way to catch the mistake before it silently sends unsupported VCL-only attributes to a Compute service.

Types

type ComputeNestedModel

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

ComputeNestedModel is the HTTPS logging model for the Compute nested block (service_compute_auto.logging_https). It omits format, format_version, placement, and response_condition, which only apply to VCL services.

func ComputeMatchOrder

func ComputeMatchOrder(items, order []ComputeNestedModel) []ComputeNestedModel

func ComputeReadForVersion

func ComputeReadForVersion(ctx context.Context, client *fastly.Client, serviceID string, version int) ([]ComputeNestedModel, error)

func FlattenToComputeNestedModel

func FlattenToComputeNestedModel(h *fastly.HTTPS) ComputeNestedModel

FlattenToComputeNestedModel is FlattenToNestedModel for Compute services: it carries over only the attributes ComputeNestedModel exposes.

func (ComputeNestedModel) ModelsEqual

func (c ComputeNestedModel) ModelsEqual(other ComputeNestedModel) bool

func (ComputeNestedModel) TLSCACert

func (n ComputeNestedModel) TLSCACert() types.String

func (ComputeNestedModel) TLSClientCert

func (n ComputeNestedModel) TLSClientCert() types.String

func (ComputeNestedModel) TLSClientKey

func (n ComputeNestedModel) TLSClientKey() types.String

func (ComputeNestedModel) TLSHostname

func (n ComputeNestedModel) TLSHostname() types.String

type ListResource

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

func (*ListResource) Configure

func (*ListResource) List

func (l *ListResource) List(ctx context.Context, req list.ListRequest, stream *list.ListResultsStream)

func (*ListResource) ListResourceConfigSchema

func (*ListResource) Metadata

type Model

type Model struct {
	NestedModel
	ID      types.String `tfsdk:"id"`
	Service types.String `tfsdk:"service_id"`
	Version types.Int64  `tfsdk:"version"`
}

func (Model) TLSCACert

func (n Model) TLSCACert() types.String

func (Model) TLSClientCert

func (n Model) TLSClientCert() types.String

func (Model) TLSClientKey

func (n Model) TLSClientKey() types.String

func (Model) TLSHostname

func (n Model) TLSHostname() types.String

type NestedModel

type NestedModel struct {
	Format            types.String `tfsdk:"format"`
	FormatVersion     types.Int64  `tfsdk:"format_version"`
	Placement         types.String `tfsdk:"placement"`
	ResponseCondition types.String `tfsdk:"response_condition"`
	// contains filtered or unexported fields
}

NestedModel is the HTTPS logging model for the standalone fastly_service_logging_https resource and the VCL nested block (service_cdn_auto.logging_https).

func FlattenToNestedModel

func FlattenToNestedModel(h *fastly.HTTPS) NestedModel

func MatchOrder

func MatchOrder(items, order []NestedModel) []NestedModel

func ReadForVersion

func ReadForVersion(ctx context.Context, client *fastly.Client, serviceID string, version int) ([]NestedModel, error)

func (NestedModel) ModelsEqual

func (n NestedModel) ModelsEqual(other NestedModel) bool

func (NestedModel) TLSCACert

func (n NestedModel) TLSCACert() types.String

func (NestedModel) TLSClientCert

func (n NestedModel) TLSClientCert() types.String

func (NestedModel) TLSClientKey

func (n NestedModel) TLSClientKey() types.String

func (NestedModel) TLSHostname

func (n NestedModel) TLSHostname() types.String

type Resource

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

func (*Resource) Configure

func (*Resource) Create

func (*Resource) Delete

func (*Resource) ImportState

func (*Resource) Metadata

func (*Resource) Read

func (*Resource) Schema

func (*Resource) Update

Jump to

Keyboard shortcuts

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