http

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const OriginType = "HTTP"

Variables

This section is empty.

Functions

This section is empty.

Types

type Origin

type Origin struct {
	// contains filtered or unexported fields
}

func (*Origin) GetTables

func (o *Origin) GetTables(_ context.Context) ([]*psqlfront.Table, error)

func (*Origin) ID

func (o *Origin) ID() string

func (*Origin) RefreshCache added in v0.3.0

func (o *Origin) RefreshCache(ctx context.Context, w psqlfront.CacheWriter) error

type OriginConfig

type OriginConfig struct {
	Schema string         `yaml:"schema"`
	Tables []*TableConfig `yaml:"tables"`
}

func (*OriginConfig) NewOrigin

func (cfg *OriginConfig) NewOrigin(id string) (psqlfront.Origin, error)

func (*OriginConfig) Restrict

func (cfg *OriginConfig) Restrict() error

func (*OriginConfig) Type

func (cfg *OriginConfig) Type() string

type TableConfig

type TableConfig struct {
	origin.BaseTableConfig `yaml:",inline"`

	URLString                string        `yaml:"url"`
	Format                   string        `yaml:"format"`
	IgnoreLines              int           `yaml:"ignore_lines"`
	TextEncoding             *string       `yaml:"text_encoding"`
	SchemaDetection          bool          `yaml:"schema_detection"`
	DetectedSchemaExpiration time.Duration `yaml:"detected_schema_expiration"`
	AllowUnicodeColumnName   bool          `yaml:"allow_unicode_column_name"`
	URL                      *url.URL      `yaml:"-"`
	LastSchemaDetection      time.Time     `yaml:"-"`
}

func (*TableConfig) DetectSchema added in v0.2.0

func (cfg *TableConfig) DetectSchema(ctx context.Context) error

func (*TableConfig) FetchRows added in v0.2.0

func (cfg *TableConfig) FetchRows(ctx context.Context) ([][]interface{}, error)

func (*TableConfig) Fetcher added in v0.2.0

func (cfg *TableConfig) Fetcher(ctx context.Context) ([][]string, error)

func (*TableConfig) Restrict added in v0.2.0

func (cfg *TableConfig) Restrict(schema string) error

Jump to

Keyboard shortcuts

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