data

package
v4.0.0-pre-2 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: MIT Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CSV = parsers.CSV

CSV - Unmarshal CSV

Deprecated: will be removed in a future version of gomplate. If you have a need for this, please open an issue!

View Source
var CSVByColumn = parsers.CSVByColumn

CSVByColumn - Unmarshal CSV in a Columnar form

Deprecated: will be removed in a future version of gomplate. If you have a need for this, please open an issue!

View Source
var CSVByRow = parsers.CSVByRow

CSVByRow - Unmarshal CSV in a row-oriented form

Deprecated: will be removed in a future version of gomplate. If you have a need for this, please open an issue!

View Source
var CUE = parsers.CUE

CUE - Unmarshal a CUE expression into the appropriate type

Deprecated: will be removed in a future version of gomplate. If you have a need for this, please open an issue!

View Source
var JSON = parsers.JSON

JSON - Unmarshal a JSON Object. Can be ejson-encrypted.

Deprecated: will be removed in a future version of gomplate. If you have a need for this, please open an issue!

View Source
var JSONArray = parsers.JSONArray

JSONArray - Unmarshal a JSON Array

Deprecated: will be removed in a future version of gomplate. If you have a need for this, please open an issue!

View Source
var TOML = parsers.TOML

TOML - Unmarshal a TOML Object

Deprecated: will be removed in a future version of gomplate. If you have a need for this, please open an issue!

View Source
var ToCSV = parsers.ToCSV

ToCSV -

Deprecated: will be removed in a future version of gomplate. If you have a need for this, please open an issue!

View Source
var ToCUE = parsers.ToCUE

ToCUE - Stringify a struct as CUE

Deprecated: will be removed in a future version of gomplate. If you have a need for this, please open an issue!

View Source
var ToJSON = parsers.ToJSON

ToJSON - Stringify a struct as JSON

Deprecated: will be removed in a future version of gomplate. If you have a need for this, please open an issue!

View Source
var ToJSONPretty = parsers.ToJSONPretty

ToJSONPretty - Stringify a struct as JSON (indented)

Deprecated: will be removed in a future version of gomplate. If you have a need for this, please open an issue!

View Source
var ToTOML = parsers.ToTOML

ToTOML - Stringify a struct as TOML

Deprecated: will be removed in a future version of gomplate. If you have a need for this, please open an issue!

View Source
var ToYAML = parsers.ToYAML

ToYAML - Stringify a struct as YAML

Deprecated: will be removed in a future version of gomplate. If you have a need for this, please open an issue!

View Source
var YAML = parsers.YAML

YAML - Unmarshal a YAML Object

Deprecated: will be removed in a future version of gomplate. If you have a need for this, please open an issue!

View Source
var YAMLArray = parsers.YAMLArray

YAMLArray - Unmarshal a YAML Array

Deprecated: will be removed in a future version of gomplate. If you have a need for this, please open an issue!

Functions

This section is empty.

Types

type Data deprecated

type Data struct {
	Ctx context.Context

	// TODO: remove this before 4.0
	Sources map[string]*Source

	// headers from the --datasource-header/-H option that don't reference datasources from the commandline
	ExtraHeaders map[string]http.Header
	// contains filtered or unexported fields
}

Data -

Deprecated: will be replaced in future

func FromConfig

func FromConfig(ctx context.Context, cfg *config.Config) *Data

FromConfig - internal use only!

func NewData deprecated

func NewData(datasourceArgs, headerArgs []string) (*Data, error)

NewData - constructor for Data

Deprecated: will be replaced in future

func (*Data) Datasource

func (d *Data) Datasource(alias string, args ...string) (interface{}, error)

Datasource -

func (*Data) DatasourceExists

func (d *Data) DatasourceExists(alias string) bool

DatasourceExists -

func (*Data) DatasourceReachable

func (d *Data) DatasourceReachable(alias string, args ...string) bool

DatasourceReachable - Determines if the named datasource is reachable with the given arguments. Reads from the datasource, and discards the returned data.

func (*Data) DefineDatasource

func (d *Data) DefineDatasource(alias, value string) (string, error)

DefineDatasource -

func (*Data) Include

func (d *Data) Include(alias string, args ...string) (string, error)

Include -

func (*Data) ListDatasources

func (d *Data) ListDatasources() []string

Show all datasources -

type Source deprecated

type Source struct {
	Alias  string
	URL    *url.URL
	Header http.Header // used for http[s]: URLs, nil otherwise
	// contains filtered or unexported fields
}

Source - a data source

Deprecated: will be replaced in future

func (*Source) String

func (s *Source) String() string

String is the method to format the flag's value, part of the flag.Value interface. The String method's output will be used in diagnostics.

Jump to

Keyboard shortcuts

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