types

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CIDRBlocksEqual

func CIDRBlocksEqual(cidr1, cidr2 string) bool

CIDRBlocksEqual returns whether or not two CIDR blocks are equal: - Both CIDR blocks parse to an IP address and network - The string representation of the IP addresses are equal - The string representation of the networks are equal This function is especially useful for IPv6 CIDR blocks which have multiple valid representations.

func CanonicalCIDRBlock

func CanonicalCIDRBlock(cidr string) string

CanonicalCIDRBlock returns the canonical representation of a CIDR block. This function is especially useful for hash functions for sets which include IPv6 CIDR blocks.

func IsZero

func IsZero[T any](v *T) bool

IsZero returns true if `v` is `nil` or points to the zero value of `T`.

func ValidateCIDRBlock

func ValidateCIDRBlock(cidr string) error

ValidateCIDRBlock validates that the specified CIDR block is valid: - The CIDR block parses to an IP address and network - The CIDR block is the CIDR block for the network

Types

type Option

type Option[T any] []T

func None

func None[T any]() Option[T]

None returns an Option with no value.

func Some

func Some[T any](v T) Option[T]

Some returns an Option containing a value.

func (Option[T]) IsNone

func (o Option[T]) IsNone() bool

IsNone returns whether the Option has no value.

func (Option[T]) IsSome

func (o Option[T]) IsSome() bool

IsSome returns whether the Option has a value.

func (Option[T]) MustUnwrap

func (o Option[T]) MustUnwrap() T

MustUnwrap returns the contained value or panics.

func (Option[T]) UnwrapOr

func (o Option[T]) UnwrapOr(v T) T

UnwrapOr returns the contained value or the specified default.

func (Option[T]) UnwrapOrDefault

func (o Option[T]) UnwrapOrDefault() T

UnwrapOrDefault returns the contained value or the default value for T.

func (Option[T]) UnwrapOrElse

func (o Option[T]) UnwrapOrElse(f func() T) T

UnwrapOrElse returns the contained value or computes a value from f.

type ServicePackageFrameworkDataSource

type ServicePackageFrameworkDataSource struct {
	Factory func(context.Context) (datasource.DataSourceWithConfigure, error)
	Name    string
	Tags    *ServicePackageResourceTags
}

ServicePackageFrameworkDataSource represents a Terraform Plugin Framework data source implemented by a service package.

type ServicePackageFrameworkResource

type ServicePackageFrameworkResource struct {
	Factory func(context.Context) (resource.ResourceWithConfigure, error)
	Name    string
	Tags    *ServicePackageResourceTags
}

ServicePackageFrameworkResource represents a Terraform Plugin Framework resource implemented by a service package.

type ServicePackageResourceTags

type ServicePackageResourceTags struct {
	IdentifierAttribute string // The attribute for the identifier for UpdateTags etc.
	ResourceType        string // Extra resourceType parameter value for UpdateTags etc.
}

ServicePackageResourceTags represents resource-level tagging information.

type ServicePackageSDKDataSource

type ServicePackageSDKDataSource struct {
	Factory  func() *schema.Resource
	TypeName string
	Name     string
	Tags     *ServicePackageResourceTags
}

ServicePackageSDKDataSource represents a Terraform Plugin SDK data source implemented by a service package.

type ServicePackageSDKResource

type ServicePackageSDKResource struct {
	Factory  func() *schema.Resource
	TypeName string
	Name     string
	Tags     *ServicePackageResourceTags
}

ServicePackageSDKResource represents a Terraform Plugin SDK resource implemented by a service package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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