hasura

package
v0.0.0-...-0907076 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2021 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 CatalogStateOperations

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

type Client

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

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)
	GetInconsistentMetadataReader() (io.Reader, error)
	SendCommonMetadataOperation(requestBody interface{}) (httpcResponse *httpc.Response, body io.Reader, error error)
}

general hasura metadata API requests these are not dependent on the connected source type

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)
}

hasura API requests used to interact with pg sources

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            = "mssql"
)

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 V2CommonMetadataOperations

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

type V2Query

type V2Query interface {
	PGSourceOps
	MSSQLSourceOps
	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