bwan

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const SchemaStruct = schema.ValueType(-1)

Variables

This section is empty.

Functions

func ApplyBinder

func ApplyBinder(bm []FieldBinder, v reflect.Value, do func(key string, v interface{}) error) error

func ApplyBinderInput

func ApplyBinderInput[T any](bm []FieldBinder, get func(k string) (interface{}, bool)) (T, error)

func ApplyBinderInputResourceData

func ApplyBinderInputResourceData[T any](bm []FieldBinder, d *schema.ResourceData) (T, error)

func ApplyBinderMap

func ApplyBinderMap(bm []FieldBinder, v reflect.Value) (map[string]interface{}, error)

func ApplyBinderResourceData

func ApplyBinderResourceData(bm []FieldBinder, d *schema.ResourceData, v interface{}) error

func Provider

func Provider() *schema.Provider

Provider - Netskope APIv2 Provider

func ReflectSchema

func ReflectSchema(v interface{}, cfg Cfg) (map[string]*schema.Schema, []FieldBinder, []FieldBinder)

func ToSnakeCase

func ToSnakeCase(field reflect.StructField) string

Types

type BinderFunc

type BinderFunc func(v reflect.Value) (interface{}, error)

type Cfg

type Cfg map[string]struct {
	schema.Schema
}

type FieldBinder

type FieldBinder struct {
	MapKey    string
	FieldName string
	Func      BinderFunc
}

Jump to

Keyboard shortcuts

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