helpers

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2023 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Create                            = "create"
	Read                              = "read"
	Update                            = "update"
	Delete                            = "delete"
	List                              = "list"
	ClientError                       = "Client Error"
	ResourceError                     = "Resource Error"
	DataSourceError                   = "Data Source Error"
	UnexpectedImportIdentifier        = "Unexpected Import Identifier"
	UnexpectedResourceConfigureType   = "Unexpected Resource Configure Type"
	UnexpectedDataSourceConfigureType = "Unexpected DataSource Configure Type"
)

define constant for error management.

Variables

View Source
var ErrDataNotFound = errors.New("data source not found")

Functions

func DataSourceConfigure added in v1.5.0

DataSourceConfigure is a helper function to set the client for a specific data source.

func ErrDataNotFoundError added in v1.5.0

func ErrDataNotFoundError(kind, field, search string) error

func ImportStatePassthroughIntID added in v1.5.0

func ImportStatePassthroughIntID(ctx context.Context, attrPath path.Path, req resource.ImportStateRequest, resp *resource.ImportStateResponse)

ImportStatePassthroughIntID is a helper function to set the import identifier to a given state attribute path. The attribute must accept a int value. extends https://github.com/hashicorp/terraform-plugin-framework/blob/main/resource/import_state.go.

func ParseClientError added in v1.5.0

func ParseClientError(action, name string, err error) string

func ReadBoolField added in v1.5.0

func ReadBoolField(name string, fieldCase interface{}) *lidarr.Field

func ReadFloatField added in v1.5.0

func ReadFloatField(name string, fieldCase interface{}) *lidarr.Field

func ReadIntField added in v1.5.0

func ReadIntField(name string, fieldCase interface{}) *lidarr.Field

func ReadIntSliceField added in v1.5.0

func ReadIntSliceField(ctx context.Context, name string, fieldCase interface{}) *lidarr.Field

func ReadStringField added in v1.5.0

func ReadStringField(name string, fieldCase interface{}) *lidarr.Field

func ReadStringSliceField added in v1.5.0

func ReadStringSliceField(ctx context.Context, name string, fieldCase interface{}) *lidarr.Field

func ResourceConfigure added in v1.5.0

ResourceConfigure is a helper function to set the client for a specific resource.

func WriteBoolField added in v1.5.0

func WriteBoolField(fieldOutput *lidarr.Field, fieldCase interface{})

func WriteFloatField added in v1.5.0

func WriteFloatField(fieldOutput *lidarr.Field, fieldCase interface{})

func WriteIntField added in v1.5.0

func WriteIntField(fieldOutput *lidarr.Field, fieldCase interface{})

func WriteIntSliceField added in v1.5.0

func WriteIntSliceField(ctx context.Context, fieldOutput *lidarr.Field, fieldCase interface{})

func WriteStringField added in v1.5.0

func WriteStringField(fieldOutput *lidarr.Field, fieldCase interface{})

func WriteStringSliceField added in v1.5.0

func WriteStringSliceField(ctx context.Context, fieldOutput *lidarr.Field, fieldCase interface{})

Types

This section is empty.

Jump to

Keyboard shortcuts

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