samplerest

package
v0.0.0-...-87ad648 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigSchema = map[string]*schema.Attribute{
	"email":        {Type: schema.TypeString},
	"password":     {Type: schema.TypeString},
	"other_config": {Type: schema.TypeBool},
}

Functions

func ConfigInstance

func ConfigInstance() interface{}

func Plugin

func Plugin(ctx context.Context) *plugin.Plugin

Types

type OneModel

type OneModel struct {
	ID          int
	Column1     string
	Column2     int
	CreatedAt   time.Time
	QueryString string
	QueryJson   map[string]any
}

type SampleRESTConfig

type SampleRESTConfig struct {
	Email       *string `cty:"email"`
	Password    *string `cty:"password"`
	OtherConfig *bool   `cty:"other_config"`
}

This uses go-cty: https://github.com/zclconf/go-cty/blob/main/docs/gocty.md#converting-to-and-from-structs

func GetConfig

func GetConfig(connection *plugin.Connection) SampleRESTConfig

GetConfig :: retrieve and cast connection config from query data

func (SampleRESTConfig) String

func (c SampleRESTConfig) String() string

Jump to

Keyboard shortcuts

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