hasura

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2021 License: MIT Imports: 13 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(hasura config.Hasura, cfg config.Database, models ...interface{}) error

Create - creates hasura models

func Generate

func Generate(cfg config.Database, models ...interface{}) (map[string]interface{}, error)

Generate - creates hasura table structure in JSON from `models`. `models` should be pointer to your table models. `cfg` is DB config from YAML.

Types

type API

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

API -

func New

func New(baseURL, secret string) *API

New -

func (*API) ExportMetadata

func (api *API) ExportMetadata(data interface{}) (ExportMetadataResponse, error)

ExportMetadata -

func (*API) Health

func (api *API) Health() error

Health

func (*API) ReplaceMetadata

func (api *API) ReplaceMetadata(data interface{}) error

ReplaceMetadata -

type ExportMetadataResponse

type ExportMetadataResponse struct {
	Tables []map[string]interface{} `json:"tables"`
}

ExportMetadataResponse -

Jump to

Keyboard shortcuts

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