Documentation ¶
Index ¶
- Constants
- Variables
- func DataSourceConfigure(ctx context.Context, req datasource.ConfigureRequest, ...) *prowlarr.APIClient
- func ErrDataNotFoundError(kind, field, search string) error
- func ImportStatePassthroughIntID(ctx context.Context, attrPath path.Path, req resource.ImportStateRequest, ...)
- func ParseClientError(action, name string, err error) string
- func ReadFields(ctx context.Context, fieldContainer interface{}, fieldLists Fields) []*prowlarr.Field
- func ResourceConfigure(ctx context.Context, req resource.ConfigureRequest, ...) *prowlarr.APIClient
- func WriteFields(ctx context.Context, fieldContainer interface{}, fields []*prowlarr.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.
Variables ¶
View Source
var ErrDataNotFound = errors.New("data source not found")
Functions ¶
func DataSourceConfigure ¶ added in v1.4.0
func DataSourceConfigure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) *prowlarr.APIClient
DataSourceConfigure is a helper function to set the client for a specific data source.
func ErrDataNotFoundError ¶ added in v1.4.0
func ImportStatePassthroughIntID ¶ added in v1.4.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.4.0
func ReadFields ¶ added in v1.4.0
func ReadFields(ctx context.Context, fieldContainer interface{}, fieldLists Fields) []*prowlarr.Field
ReadFields takes in input a field container and populates a prowlarr.Field slice.
func ResourceConfigure ¶ added in v1.4.0
func ResourceConfigure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse) *prowlarr.APIClient
ResourceConfigure is a helper function to set the client for a specific resource.
Types ¶
type Fields ¶ added in v1.4.0
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 Sensitive []string }
Fields contains all the field lists of a specific resource per type.
Click to show internal directories.
Click to hide internal directories.