Documentation ¶
Index ¶
- Variables
- type PathType
- func (t PathType) Equal(o attr.Type) bool
- func (t PathType) String() string
- func (t PathType) ValueFromString(_ context.Context, in basetypes.StringValue) (basetypes.StringValuable, diag.Diagnostics)
- func (t PathType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)
- func (t PathType) ValueType(_ context.Context) attr.Value
- type PathValue
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // PathPCIValueRegEx is the regular expression for a PCI hardware mapping path. PathPCIValueRegEx = regexp.MustCompile(`^[a-f0-9]{4,}:[a-f0-9]{2}:[a-f0-9]{2}(\.[a-f0-9])?$`) // PathUSBValueRegEx is the regular expression for a USB hardware mapping path. PathUSBValueRegEx = regexp.MustCompile(`^\d+-(\d+)(\.\d+)?$`) )
View Source
var ErrValueConversion = func(format string, attrs ...any) error { return function.NewFuncError(fmt.Sprintf(format, attrs...)) }
ErrValueConversion indicates an error while converting a value for a hardware mapping path.
Functions ¶
This section is empty.
Types ¶
type PathType ¶
type PathType struct { basetypes.StringType Type proxmoxtypes.Type }
PathType is a type that represents a path of a hardware mapping.
func (PathType) ValueFromString ¶
func (t PathType) ValueFromString(_ context.Context, in basetypes.StringValue) ( basetypes.StringValuable, diag.Diagnostics, )
ValueFromString converts a string value to a StringValuable.
func (PathType) ValueFromTerraform ¶
ValueFromTerraform converts a Terraform value to a StringValuable.
type PathValue ¶
type PathValue struct {
basetypes.StringValue
}
PathValue is a type that represents the value of a hardware mapping path.
func NewPathPointerValue ¶
NewPathPointerValue returns a new PathValue from a string pointer.
func (PathValue) IsProxmoxType ¶
func (v PathValue) IsProxmoxType(hmType proxmoxtypes.Type) bool
IsProxmoxType checks whether the value match the given hardware mapping type.
Click to show internal directories.
Click to hide internal directories.