Documentation ¶
Index ¶
- Constants
- func DataSourceConfigure(_ context.Context, req datasource.ConfigureRequest, ...) *lidarr.APIClient
- func ImportStatePassthroughIntID(ctx context.Context, attrPath path.Path, req resource.ImportStateRequest, ...)
- func ParseClientError(action, name string, err error) string
- func ParseNotFoundError(kind, field, search string) string
- func ReadFields(ctx context.Context, fieldContainer interface{}, fieldLists Fields) []*lidarr.Field
- func ResourceConfigure(_ context.Context, req resource.ConfigureRequest, ...) *lidarr.APIClient
- func WriteFields(ctx context.Context, fieldContainer interface{}, fields []*lidarr.Field, ...)
- type Fields
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.
View Source
const SensitiveValue = "********"
Variables ¶
This section is empty.
Functions ¶
func DataSourceConfigure ¶ added in v1.5.0
func DataSourceConfigure(_ context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) *lidarr.APIClient
DataSourceConfigure is a helper function to set the client for a specific data source.
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 ParseNotFoundError ¶ added in v1.10.0
func ReadFields ¶ added in v1.5.1
ReadFields takes in input a field container and populates a lidarr.Field slice.
func ResourceConfigure ¶ added in v1.5.0
func ResourceConfigure(_ context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse) *lidarr.APIClient
ResourceConfigure is a helper function to set the client for a specific resource.
Types ¶
type Fields ¶ added in v1.5.1
type Fields struct { Bools []string BoolsExceptions []string Ints []string IntsExceptions []string Strings []string StringsExceptions []string Floats []string FloatsExceptions []string IntSlices []string IntSlicesExceptions []string StringSlices []string StringSlicesExceptions []string }
Fields contains all the field lists of a specific resource per type.
Click to show internal directories.
Click to hide internal directories.