hasura

package
v2.30.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BigQueryRunSQLInput added in v2.20.0

type BigQueryRunSQLInput PGRunSQLInput

type BigQueryRunSQLOutput added in v2.20.0

type BigQueryRunSQLOutput PGRunSQLOutput

type BigQuerySourceOps added in v2.20.0

type BigQuerySourceOps interface {
	BigQueryRunSQL(input BigQueryRunSQLInput) (response *BigQueryRunSQLOutput, err error)
}

type CatalogStateOperations

type CatalogStateOperations interface {
	Set(key string, state interface{}) (io.Reader, error)
	Get() (io.Reader, error)
}

type CitusRunSQLInput

type CitusRunSQLInput PGRunSQLInput

type CitusRunSQLOutput

type CitusRunSQLOutput PGRunSQLOutput

type CitusSourceOps

type CitusSourceOps interface {
	CitusRunSQL(input CitusRunSQLInput) (response *CitusRunSQLOutput, err error)
}

type Client

type Client struct {
	V1Metadata V1Metadata
	V1Query    V1Query
	V2Query    V2Query
	PGDump     PGDump
	V1Graphql  V1Graphql
	V1Version  V1Version
}

type CockroachRunSQLInput added in v2.18.0

type CockroachRunSQLInput PGRunSQLInput

type CockroachRunSQLOutput added in v2.18.0

type CockroachRunSQLOutput PGRunSQLOutput

type CockroachSourceOps added in v2.18.0

type CockroachSourceOps interface {
	CockroachRunSQL(input CockroachRunSQLInput) (response *CockroachRunSQLOutput, err error)
}

type CommonMetadataOperations

type CommonMetadataOperations interface {
	ExportMetadata() (metadata io.Reader, err error)
	ClearMetadata() (io.Reader, error)
	ReloadMetadata() (io.Reader, error)
	DropInconsistentMetadata() (io.Reader, error)
	ReplaceMetadata(metadata io.Reader) (io.Reader, error)
	GetInconsistentMetadata() (*GetInconsistentMetadataResponse, error)
	GetInconsistentMetadataRaw() (io.Reader, error)
	SendCommonMetadataOperation(requestBody interface{}) (httpcResponse *httpc.Response, body io.Reader, error error)
}

CommonMetadataOperations represents Metadata API's which are not source type specific

type GenericSend

type GenericSend func(requestBody interface{}) (httpcResponse *httpc.Response, responseBody io.Reader, error error)

type GetInconsistentMetadataResponse

type GetInconsistentMetadataResponse struct {
	IsConsistent        bool          `json:"is_consistent"`
	InconsistentObjects []interface{} `json:"inconsistent_objects"`
}

type IntrospectionSchema

type IntrospectionSchema interface{}

type MSSQLRunSQLInput

type MSSQLRunSQLInput PGRunSQLInput

type MSSQLRunSQLOutput

type MSSQLRunSQLOutput struct {
	ResultType RunSQLResultType `json:"result_type" yaml:"result_type"`
	Result     [][]interface{}  `json:"result" yaml:"result"`
}

type MSSQLSourceOps

type MSSQLSourceOps interface {
	MSSQLRunSQL(input MSSQLRunSQLInput) (response *MSSQLRunSQLOutput, err error)
}

type PGDump

type PGDump interface {
	Send(request PGDumpRequest) (responseBody io.Reader, error error)
}

type PGDumpRequest

type PGDumpRequest struct {
	Opts        []string `json:"opts"`
	CleanOutput bool     `json:"clean_output"`
	SourceName  string   `json:"source,omitempty"`
}

type PGRunSQLInput

type PGRunSQLInput struct {
	SQL                      string `json:"sql" yaml:"sql"`
	Source                   string `json:"source,omitempty" yaml:"source,omitempty"`
	Cascade                  bool   `json:"cascade,omitempty" yaml:"cascade,omitempty"`
	ReadOnly                 bool   `json:"read_only,omitempty" yaml:"read_only,omitempty"`
	CheckMetadataConsistency *bool  `json:"check_metadata_consistency,omitempty" yaml:"check_metadata_consistency,omitempty"`
}

type PGRunSQLOutput

type PGRunSQLOutput struct {
	ResultType RunSQLResultType `json:"result_type" yaml:"result_type"`
	Result     [][]string       `json:"result" yaml:"result"`
}

type PGSourceOps

type PGSourceOps interface {
	PGRunSQL(input PGRunSQLInput) (response *PGRunSQLOutput, err error)
}

type RequestBody

type RequestBody struct {
	Type    string      `json:"type"`
	Version uint        `json:"version,omitempty"`
	Args    interface{} `json:"args"`
}

type RunSQLResultType

type RunSQLResultType string
const (
	CommandOK RunSQLResultType = "CommandOk"
	TuplesOK  RunSQLResultType = "TuplesOk"
)

type SourceKind

type SourceKind string
const (
	SourceKindPG        SourceKind = "postgres"
	SourceKindMSSQL     SourceKind = "mssql"
	SourceKindCitus     SourceKind = "citus"
	SourceKindCockroach SourceKind = "cockroach"
	SourceKindBigQuery  SourceKind = "bigquery"
)

type V1Graphql

type V1Graphql interface {
	GetIntrospectionSchema() (IntrospectionSchema, error)
}

type V1Metadata

type V1Metadata interface {
	CommonMetadataOperations
	V2CommonMetadataOperations
	CatalogStateOperations
	Send(requestBody interface{}) (httpcResponse *httpc.Response, body io.Reader, error error)
}

type V1Query

type V1Query interface {
	CommonMetadataOperations
	PGSourceOps
	Send(requestBody interface{}) (httpcResponse *httpc.Response, body io.Reader, error error)
	Bulk([]RequestBody) (io.Reader, error)
}

type V1Version added in v2.18.0

type V1Version interface {
	GetVersion() (*V1VersionResponse, error)
}

type V1VersionResponse added in v2.18.0

type V1VersionResponse struct {
	Version    string  `json:"version,omitempty"`
	ServerType *string `json:"server_type,omitempty"`
}

type V2CommonMetadataOperations

type V2CommonMetadataOperations interface {
	V2ReplaceMetadata(args V2ReplaceMetadataArgs) (*V2ReplaceMetadataResponse, error)
}

type V2Query

type V2Query interface {
	PGSourceOps
	MSSQLSourceOps
	CitusSourceOps
	CockroachSourceOps
	BigQuerySourceOps
	Send(requestBody interface{}) (httpcResponse *httpc.Response, body io.Reader, error error)
	Bulk([]RequestBody) (io.Reader, error)
}

type V2ReplaceMetadataArgs

type V2ReplaceMetadataArgs struct {
	AllowInconsistentMetadata bool        `json:"allow_inconsistent_metadata"`
	Metadata                  interface{} `json:"metadata"`
}

type V2ReplaceMetadataResponse

type V2ReplaceMetadataResponse struct {
	IsConsistent        bool        `json:"is_consistent"`
	InconsistentObjects interface{} `json:"inconsistent_objects"`
}

Directories

Path Synopsis
sourceops

Jump to

Keyboard shortcuts

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