oapigen

package
v0.0.0-...-f9bd827 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package oapigen generates tables from OpenAPI documents.

Package oapigen generates tables from OpenAPI documents.

Package oapigen generates tables from OpenAPI documents.

Index

Constants

This section is empty.

Variables

View Source
var ConfigSchema = map[string]*schema.Attribute{
	"version": {
		Type:     schema.TypeInt,
		Required: true,
	},
	"documents": {
		Type:     schema.TypeList,
		Elem:     &schema.Attribute{Type: schema.TypeString},
		Required: true,
	},
	"prefix": {
		Type:     schema.TypeString,
		Required: true,
	},
}

ConfigSchema defines the config params for the oapigen plugin.

Functions

func ConfigInstance

func ConfigInstance() interface{}

ConfigInstance returns a Config pointer.

func Plugin

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

Plugin defines the oapigen plugin.

func PluginTables

func PluginTables(ctx context.Context, d *plugin.TableMapData) (map[string]*plugin.Table, error)

PluginTables defines all the tables from the OpenaAPI documents.

Types

type Config

type Config struct {
	Version   int      `cty:"version"`
	Documents []string `cty:"documents" steampipe:"watch"`
	Prefix    *string  `cty:"prefix"`
}

Config is a go type to represent the plugin config.

func GetConfig

func GetConfig(connection *plugin.Connection) Config

GetConfig :: retrieve and cast connection config from query data

Jump to

Keyboard shortcuts

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