hasura_metadata

package
v2.8.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APILimits

type APILimits struct {
	DepthLimit *DepthLimit `json:"depth_limit,omitempty"`
	Disabled   bool        `json:"disabled"`
	NodeLimit  *NodeLimit  `json:"node_limit,omitempty"`
	RateLimit  *RateLimit  `json:"rate_limit,omitempty"`
}

func UnmarshalAPILimits

func UnmarshalAPILimits(data []byte) (APILimits, error)

func (*APILimits) Marshal

func (r *APILimits) Marshal() ([]byte, error)

type Action

type Action struct {
	Comment     *string          `json:"comment,omitempty"`     // Comment
	Definition  ActionDefinition `json:"definition"`            // Definition of the action
	Name        string           `json:"name"`                  // Name of the action
	Permissions []Permission     `json:"permissions,omitempty"` // Permissions of the action
}

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/actions.html#args-syntax

func UnmarshalAction

func UnmarshalAction(data []byte) (Action, error)

func (*Action) Marshal

func (r *Action) Marshal() ([]byte, error)

type ActionDefinition

type ActionDefinition struct {
	Arguments            []InputArgument       `json:"arguments,omitempty"`
	ForwardClientHeaders *bool                 `json:"forward_client_headers,omitempty"`
	Handler              string                `json:"handler"` // A String value which supports templating environment variables enclosed in {{ and }}.; Template example: https://{{ACTION_API_DOMAIN}}/create-user
	Headers              []Header              `json:"headers,omitempty"`
	Kind                 *string               `json:"kind,omitempty"`
	OutputType           *string               `json:"output_type,omitempty"`
	Type                 *ActionDefinitionType `json:"type,omitempty"`
}

Definition of the action

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/actions.html#actiondefinition

func UnmarshalActionDefinition

func UnmarshalActionDefinition(data []byte) (ActionDefinition, error)

func (*ActionDefinition) Marshal

func (r *ActionDefinition) Marshal() ([]byte, error)

type ActionDefinitionType

type ActionDefinitionType string
const (
	Mutation ActionDefinitionType = "mutation"
	Query    ActionDefinitionType = "query"
)
const (
	Mutation ActionDefinitionType = "mutation"
	Query    ActionDefinitionType = "query"
)

type ActionName

type ActionName string

func UnmarshalActionName

func UnmarshalActionName(data []byte) (ActionName, error)

func (*ActionName) Marshal

func (r *ActionName) Marshal() ([]byte, error)

type AllowList

type AllowList struct {
	Collection string `json:"collection"` // Name of a query collection to be added to the allow-list
}

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/query-collections.html#add-collection-to-allowlist-syntax

func UnmarshalAllowList

func UnmarshalAllowList(data []byte) (AllowList, error)

func (*AllowList) Marshal

func (r *AllowList) Marshal() ([]byte, error)

type ArrRelUsing

type ArrRelUsing struct {
	ForeignKeyConstraintOn *ArrRelUsingFKeyOn        `json:"foreign_key_constraint_on,omitempty"` // The column with foreign key constraint
	ManualConfiguration    *ArrRelUsingManualMapping `json:"manual_configuration,omitempty"`      // Manual mapping of table and columns
}

Use one of the available ways to define an array relationship

Use one of the available ways to define an object relationship

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/relationship.html#arrrelusing

func UnmarshalArrRelUsing

func UnmarshalArrRelUsing(data []byte) (ArrRelUsing, error)

func (*ArrRelUsing) Marshal

func (r *ArrRelUsing) Marshal() ([]byte, error)

type ArrRelUsingFKeyOn

type ArrRelUsingFKeyOn struct {
	Column string     `json:"column"`
	Table  *TableName `json:"table"`
}

The column with foreign key constraint

The column with foreign key constraint

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/relationship.html#arrrelusingfkeyon

func UnmarshalArrRelUsingFKeyOn

func UnmarshalArrRelUsingFKeyOn(data []byte) (ArrRelUsingFKeyOn, error)

func (*ArrRelUsingFKeyOn) Marshal

func (r *ArrRelUsingFKeyOn) Marshal() ([]byte, error)

type ArrRelUsingManualMapping

type ArrRelUsingManualMapping struct {
	ColumnMapping map[string]string `json:"column_mapping"` // Mapping of columns from current table to remote table
	RemoteTable   *TableName        `json:"remote_table"`   // The table to which the relationship has to be established
}

Manual mapping of table and columns

Manual mapping of table and columns

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/relationship.html#arrrelusingmanualmapping

func UnmarshalArrRelUsingManualMapping

func UnmarshalArrRelUsingManualMapping(data []byte) (ArrRelUsingManualMapping, error)

func (*ArrRelUsingManualMapping) Marshal

func (r *ArrRelUsingManualMapping) Marshal() ([]byte, error)

type ArrayRelationship

type ArrayRelationship struct {
	Comment *string     `json:"comment,omitempty"` // Comment
	Name    string      `json:"name"`              // Name of the new relationship
	Using   ArrRelUsing `json:"using"`             // Use one of the available ways to define an array relationship
}

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/relationship.html#create-array-relationship-syntax

func UnmarshalArrayRelationship

func UnmarshalArrayRelationship(data []byte) (ArrayRelationship, error)

func (*ArrayRelationship) Marshal

func (r *ArrayRelationship) Marshal() ([]byte, error)

type BackendKind

type BackendKind string
const (
	BackendKindBigquery BackendKind = "bigquery"
	BackendKindCitus    BackendKind = "citus"
	BackendKindMssql    BackendKind = "mssql"
	BackendKindPostgres BackendKind = "postgres"
)

func UnmarshalBackendKind

func UnmarshalBackendKind(data []byte) (BackendKind, error)

func (*BackendKind) Marshal

func (r *BackendKind) Marshal() ([]byte, error)

type BaseSource

type BaseSource struct {
	Functions []CustomFunction `json:"functions,omitempty"`
	Name      string           `json:"name"`
	Tables    []TableEntry     `json:"tables"`
}

func UnmarshalBaseSource

func UnmarshalBaseSource(data []byte) (BaseSource, error)

func (*BaseSource) Marshal

func (r *BaseSource) Marshal() ([]byte, error)

type BigQueryConfiguration

type BigQueryConfiguration struct {
	Datasets       *Datasets       `json:"datasets"`        // List of BigQuery datasets
	ProjectID      *Sslpassword    `json:"project_id"`      // Project Id for BigQuery database
	ServiceAccount *ServiceAccount `json:"service_account"` // Service account for BigQuery database
}

https://hasura.io/docs/latest/graphql/core/api-reference/syntax-defs.html#bigqueryconfiguration

func UnmarshalBigQueryConfiguration

func UnmarshalBigQueryConfiguration(data []byte) (BigQueryConfiguration, error)

func (*BigQueryConfiguration) Marshal

func (r *BigQueryConfiguration) Marshal() ([]byte, error)

type BigQuerySource

type BigQuerySource struct {
	Configuration BigQueryConfiguration `json:"configuration"`
	Functions     []CustomFunction      `json:"functions,omitempty"`
	Kind          BigQuerySourceKind    `json:"kind"`
	Name          string                `json:"name"`
	Tables        []TableEntry          `json:"tables"`
}

func UnmarshalBigQuerySource

func UnmarshalBigQuerySource(data []byte) (BigQuerySource, error)

func (*BigQuerySource) Marshal

func (r *BigQuerySource) Marshal() ([]byte, error)

type BigQuerySourceKind

type BigQuerySourceKind string
const (
	KindBigquery BigQuerySourceKind = "bigquery"
)

type CollectionName

type CollectionName string

func UnmarshalCollectionName

func UnmarshalCollectionName(data []byte) (CollectionName, error)

func (*CollectionName) Marshal

func (r *CollectionName) Marshal() ([]byte, error)

type ColumnPresetsExpression

type ColumnPresetsExpression map[string]string

func UnmarshalColumnPresetsExpression

func UnmarshalColumnPresetsExpression(data []byte) (ColumnPresetsExpression, error)

func (*ColumnPresetsExpression) Marshal

func (r *ColumnPresetsExpression) Marshal() ([]byte, error)

type Columns

type Columns string
const (
	Empty Columns = "*"
)
const (
	Empty Columns = "*"
)

type ComputedField

type ComputedField struct {
	Comment    *string                 `json:"comment,omitempty"` // Comment
	Definition ComputedFieldDefinition `json:"definition"`        // The computed field definition
	Name       string                  `json:"name"`              // Name of the new computed field
}

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/computed-field.html#args-syntax

func UnmarshalComputedField

func UnmarshalComputedField(data []byte) (ComputedField, error)

func (*ComputedField) Marshal

func (r *ComputedField) Marshal() ([]byte, error)

type ComputedFieldDefinition

type ComputedFieldDefinition struct {
	Function        *FunctionName `json:"function"`                   // The SQL function
	SessionArgument *string       `json:"session_argument,omitempty"` // Name of the argument which accepts the Hasura session object as a JSON/JSONB value. If; omitted, the Hasura session object is not passed to the function
	TableArgument   *string       `json:"table_argument,omitempty"`   // Name of the argument which accepts a table row type. If omitted, the first argument is; considered a table argument
}

The computed field definition

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/computed-field.html#computedfielddefinition

func UnmarshalComputedFieldDefinition

func UnmarshalComputedFieldDefinition(data []byte) (ComputedFieldDefinition, error)

func (*ComputedFieldDefinition) Marshal

func (r *ComputedFieldDefinition) Marshal() ([]byte, error)

type ComputedFieldName

type ComputedFieldName string

func UnmarshalComputedFieldName

func UnmarshalComputedFieldName(data []byte) (ComputedFieldName, error)

func (*ComputedFieldName) Marshal

func (r *ComputedFieldName) Marshal() ([]byte, error)

type Configuration

type Configuration struct {
	ConnectionInfo *SourceConnectionInfo    `json:"connection_info,omitempty"` // Connection parameters for the source
	ReadReplicas   []PGSourceConnectionInfo `json:"read_replicas,omitempty"`   // Optional list of read replica configuration (supported only in cloud/enterprise versions)
	Datasets       *Datasets                `json:"datasets"`                  // List of BigQuery datasets
	ProjectID      *Sslpassword             `json:"project_id"`                // Project Id for BigQuery database
	ServiceAccount *ServiceAccount          `json:"service_account"`           // Service account for BigQuery database
}

https://hasura.io/docs/latest/graphql/core/api-reference/syntax-defs.html#pgconfiguration

https://hasura.io/docs/latest/graphql/core/api-reference/syntax-defs.html#mssqlsourceconnectioninfo

https://hasura.io/docs/latest/graphql/core/api-reference/syntax-defs.html#bigqueryconfiguration

type CronTrigger

type CronTrigger struct {
	Comment           *string                `json:"comment,omitempty"`    // Custom comment.
	Headers           []Header               `json:"headers"`              // List of headers to be sent with the webhook
	IncludeInMetadata bool                   `json:"include_in_metadata"`  // Flag to indicate whether a trigger should be included in the metadata. When a cron; trigger is included in the metadata, the user will be able to export it when the metadata; of the graphql-engine is exported.
	Name              string                 `json:"name"`                 // Name of the cron trigger
	Payload           map[string]interface{} `json:"payload,omitempty"`    // Any JSON payload which will be sent when the webhook is invoked.
	RetryConf         *RetryConfST           `json:"retry_conf,omitempty"` // Retry configuration if scheduled invocation delivery fails
	Schedule          string                 `json:"schedule"`             // Cron expression at which the trigger should be invoked.
	Webhook           string                 `json:"webhook"`              // URL of the webhook
}

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/scheduled-triggers.html#create-cron-trigger

func UnmarshalCronTrigger

func UnmarshalCronTrigger(data []byte) (CronTrigger, error)

func (*CronTrigger) Marshal

func (r *CronTrigger) Marshal() ([]byte, error)

type CustomColumnNames

type CustomColumnNames map[string]string

func UnmarshalCustomColumnNames

func UnmarshalCustomColumnNames(data []byte) (CustomColumnNames, error)

func (*CustomColumnNames) Marshal

func (r *CustomColumnNames) Marshal() ([]byte, error)

type CustomFunction

type CustomFunction struct {
	Configuration *FunctionConfiguration `json:"configuration,omitempty"` // Configuration for the SQL function
	Function      *FunctionName          `json:"function"`                // Name of the SQL function
}

A custom SQL function to add to the GraphQL schema with configuration.

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/custom-functions.html#args-syntax

func UnmarshalCustomFunction

func UnmarshalCustomFunction(data []byte) (CustomFunction, error)

func (*CustomFunction) Marshal

func (r *CustomFunction) Marshal() ([]byte, error)

type CustomRootFields

type CustomRootFields struct {
	Delete          *string `json:"delete,omitempty"`           // Customise the `delete_<table-name>` root field
	DeleteByPk      *string `json:"delete_by_pk,omitempty"`     // Customise the `delete_<table-name>_by_pk` root field
	Insert          *string `json:"insert,omitempty"`           // Customise the `insert_<table-name>` root field
	InsertOne       *string `json:"insert_one,omitempty"`       // Customise the `insert_<table-name>_one` root field
	Select          *string `json:"select,omitempty"`           // Customise the `<table-name>` root field
	SelectAggregate *string `json:"select_aggregate,omitempty"` // Customise the `<table-name>_aggregate` root field
	SelectByPk      *string `json:"select_by_pk,omitempty"`     // Customise the `<table-name>_by_pk` root field
	Update          *string `json:"update,omitempty"`           // Customise the `update_<table-name>` root field
	UpdateByPk      *string `json:"update_by_pk,omitempty"`     // Customise the `update_<table-name>_by_pk` root field
}

Customise the root fields

Customise the root fields

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/table-view.html#custom-root-fields

func UnmarshalCustomRootFields

func UnmarshalCustomRootFields(data []byte) (CustomRootFields, error)

func (*CustomRootFields) Marshal

func (r *CustomRootFields) Marshal() ([]byte, error)

type CustomTypeObjectRelationship

type CustomTypeObjectRelationship struct {
	FieldMapping map[string]string                `json:"field_mapping"` // Mapping of fields of object type to columns of remote table
	Name         string                           `json:"name"`          // Name of the relationship, shouldn’t conflict with existing field names
	RemoteTable  *TableName                       `json:"remote_table"`  // The table to which relationship is defined
	Type         CustomTypeObjectRelationshipType `json:"type"`          // Type of the relationship
}

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/custom-types.html#objectrelationship

func UnmarshalCustomTypeObjectRelationship

func UnmarshalCustomTypeObjectRelationship(data []byte) (CustomTypeObjectRelationship, error)

func (*CustomTypeObjectRelationship) Marshal

func (r *CustomTypeObjectRelationship) Marshal() ([]byte, error)

type CustomTypeObjectRelationshipType

type CustomTypeObjectRelationshipType string

Type of the relationship

const (
	Array  CustomTypeObjectRelationshipType = "array"
	Object CustomTypeObjectRelationshipType = "object"
)
const (
	Array  CustomTypeObjectRelationshipType = "array"
	Object CustomTypeObjectRelationshipType = "object"
)

type CustomTypes

type CustomTypes struct {
	Enums        []EnumType        `json:"enums,omitempty"`
	InputObjects []InputObjectType `json:"input_objects,omitempty"`
	Objects      []ObjectType      `json:"objects,omitempty"`
	Scalars      []ScalarType      `json:"scalars,omitempty"`
}

func UnmarshalCustomTypes

func UnmarshalCustomTypes(data []byte) (CustomTypes, error)

func (*CustomTypes) Marshal

func (r *CustomTypes) Marshal() ([]byte, error)

type DatabaseURL

type DatabaseURL struct {
	PGConnectionParametersClass *PGConnectionParametersClass
	String                      *string
}

The database connection URL as a string, as an environment variable, or as connection parameters.

func (*DatabaseURL) MarshalJSON

func (x *DatabaseURL) MarshalJSON() ([]byte, error)

func (*DatabaseURL) UnmarshalJSON

func (x *DatabaseURL) UnmarshalJSON(data []byte) error

type Datasets

type Datasets struct {
	FromEnv     *FromEnv
	StringArray []string
}

List of BigQuery datasets

func (*Datasets) MarshalJSON

func (x *Datasets) MarshalJSON() ([]byte, error)

func (*Datasets) UnmarshalJSON

func (x *Datasets) UnmarshalJSON(data []byte) error

type Definition

type Definition struct {
	Queries []QueryCollection `json:"queries"`
}

List of queries

type DeletePermission

type DeletePermission struct {
	Filter map[string]*Filter `json:"filter,omitempty"` // Only the rows where this precondition holds true are updatable
}

The permission definition

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/permission.html#deletepermission

func UnmarshalDeletePermission

func UnmarshalDeletePermission(data []byte) (DeletePermission, error)

func (*DeletePermission) Marshal

func (r *DeletePermission) Marshal() ([]byte, error)

type DeletePermissionEntry

type DeletePermissionEntry struct {
	Comment    *string          `json:"comment,omitempty"` // Comment
	Permission DeletePermission `json:"permission"`        // The permission definition
	Role       string           `json:"role"`              // Role
}

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/permission.html#create-delete-permission-syntax

func UnmarshalDeletePermissionEntry

func UnmarshalDeletePermissionEntry(data []byte) (DeletePermissionEntry, error)

func (*DeletePermissionEntry) Marshal

func (r *DeletePermissionEntry) Marshal() ([]byte, error)

type DepthLimit

type DepthLimit struct {
	Global  float64            `json:"global"`
	PerRole map[string]float64 `json:"per_role"`
}

func UnmarshalDepthLimit

func UnmarshalDepthLimit(data []byte) (DepthLimit, error)

func (*DepthLimit) Marshal

func (r *DepthLimit) Marshal() ([]byte, error)

type EnumType

type EnumType struct {
	Description *string     `json:"description,omitempty"` // Description of the Enum type
	Name        string      `json:"name"`                  // Name of the Enum type
	Values      []EnumValue `json:"values"`                // Values of the Enum type
}

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/custom-types.html#enumtype

func UnmarshalEnumType

func UnmarshalEnumType(data []byte) (EnumType, error)

func (*EnumType) Marshal

func (r *EnumType) Marshal() ([]byte, error)

type EnumValue

type EnumValue struct {
	Description  *string `json:"description,omitempty"`   // Description of the Enum value
	IsDeprecated *bool   `json:"is_deprecated,omitempty"` // If set to true, the enum value is marked as deprecated
	Value        string  `json:"value"`                   // Value of the Enum type
}

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/custom-types.html#enumvalue

func UnmarshalEnumValue

func UnmarshalEnumValue(data []byte) (EnumValue, error)

func (*EnumValue) Marshal

func (r *EnumValue) Marshal() ([]byte, error)

type EventTrigger

type EventTrigger struct {
	Definition     EventTriggerDefinition `json:"definition"`        // The SQL function
	Headers        []Header               `json:"headers,omitempty"` // The SQL function
	Name           string                 `json:"name"`              // Name of the event trigger
	RetryConf      RetryConf              `json:"retry_conf"`        // The SQL function
	Webhook        *string                `json:"webhook,omitempty"` // The SQL function
	WebhookFromEnv *string                `json:"webhook_from_env,omitempty"`
}

NOTE: The metadata type doesn't QUITE match the 'create' arguments here

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/event-triggers.html#create-event-trigger

func UnmarshalEventTrigger

func UnmarshalEventTrigger(data []byte) (EventTrigger, error)

func (*EventTrigger) Marshal

func (r *EventTrigger) Marshal() ([]byte, error)

type EventTriggerColumns

type EventTriggerColumns struct {
	Enum        *Columns
	StringArray []string
}

func UnmarshalEventTriggerColumns

func UnmarshalEventTriggerColumns(data []byte) (EventTriggerColumns, error)

func (*EventTriggerColumns) Marshal

func (r *EventTriggerColumns) Marshal() ([]byte, error)

func (*EventTriggerColumns) MarshalJSON

func (x *EventTriggerColumns) MarshalJSON() ([]byte, error)

func (*EventTriggerColumns) UnmarshalJSON

func (x *EventTriggerColumns) UnmarshalJSON(data []byte) error

type EventTriggerDefinition

The SQL function

func UnmarshalEventTriggerDefinition

func UnmarshalEventTriggerDefinition(data []byte) (EventTriggerDefinition, error)

func (*EventTriggerDefinition) Marshal

func (r *EventTriggerDefinition) Marshal() ([]byte, error)

type Filter

type Filter struct {
	AnythingMap map[string]interface{}
	Double      *float64
	String      *string
}

func (*Filter) MarshalJSON

func (x *Filter) MarshalJSON() ([]byte, error)

func (*Filter) UnmarshalJSON

func (x *Filter) UnmarshalJSON(data []byte) error

type FromEnv

type FromEnv struct {
	FromEnv string `json:"from_env"` // Name of the environment variable
}

https://hasura.io/docs/latest/graphql/core/api-reference/syntax-defs.html#fromenv

Environment variable which stores the client certificate.

Environment variable which stores the client private key.

Environment variable which stores trusted certificate authorities.

func UnmarshalFromEnv

func UnmarshalFromEnv(data []byte) (FromEnv, error)

func (*FromEnv) Marshal

func (r *FromEnv) Marshal() ([]byte, error)

type FunctionConfiguration

type FunctionConfiguration struct {
	SessionArgument *string `json:"session_argument,omitempty"` // Function argument which accepts session info JSON; Currently, only functions which satisfy the following constraints can be exposed over the; GraphQL API (terminology from Postgres docs):; - Function behaviour: ONLY `STABLE` or `IMMUTABLE`; - Return type: MUST be `SETOF <table-name>`; - Argument modes: ONLY `IN`
}

Configuration for the SQL function

Configuration for a CustomFunction

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/custom-functions.html#function-configuration

func UnmarshalFunctionConfiguration

func UnmarshalFunctionConfiguration(data []byte) (FunctionConfiguration, error)

func (*FunctionConfiguration) Marshal

func (r *FunctionConfiguration) Marshal() ([]byte, error)

type FunctionName

type FunctionName struct {
	QualifiedFunction *QualifiedFunction
	String            *string
}

func UnmarshalFunctionName

func UnmarshalFunctionName(data []byte) (FunctionName, error)

func (*FunctionName) Marshal

func (r *FunctionName) Marshal() ([]byte, error)

func (*FunctionName) MarshalJSON

func (x *FunctionName) MarshalJSON() ([]byte, error)

func (*FunctionName) UnmarshalJSON

func (x *FunctionName) UnmarshalJSON(data []byte) error

type GraphQLName

type GraphQLName string

func UnmarshalGraphQLName

func UnmarshalGraphQLName(data []byte) (GraphQLName, error)

func (*GraphQLName) Marshal

func (r *GraphQLName) Marshal() ([]byte, error)

type GraphQLType

type GraphQLType string

func UnmarshalGraphQLType

func UnmarshalGraphQLType(data []byte) (GraphQLType, error)

func (*GraphQLType) Marshal

func (r *GraphQLType) Marshal() ([]byte, error)

type HasuraMetadataV2

type HasuraMetadataV2 struct {
	Actions          []Action               `json:"actions,omitempty"`
	Allowlist        []AllowList            `json:"allowlist,omitempty"`
	CronTriggers     []CronTrigger          `json:"cron_triggers,omitempty"`
	CustomTypes      *CustomTypes           `json:"custom_types,omitempty"`
	Functions        []CustomFunction       `json:"functions,omitempty"`
	QueryCollections []QueryCollectionEntry `json:"query_collections,omitempty"`
	RemoteSchemas    []RemoteSchema         `json:"remote_schemas,omitempty"`
	Tables           []TableEntry           `json:"tables"`
	Version          float64                `json:"version"`
}

Type used in exported 'metadata.json' and replace metadata endpoint

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/manage-metadata.html#replace-metadata

func UnmarshalHasuraMetadataV2

func UnmarshalHasuraMetadataV2(data []byte) (HasuraMetadataV2, error)

func (*HasuraMetadataV2) Marshal

func (r *HasuraMetadataV2) Marshal() ([]byte, error)

type HasuraMetadataV3

type HasuraMetadataV3 struct {
	Actions          []Action               `json:"actions,omitempty"`
	Allowlist        []AllowList            `json:"allowlist,omitempty"`
	APILimits        *APILimits             `json:"api_limits,omitempty"`
	CronTriggers     []CronTrigger          `json:"cron_triggers,omitempty"`
	CustomTypes      *CustomTypes           `json:"custom_types,omitempty"`
	InheritedRoles   []InheritedRole        `json:"inherited_roles,omitempty"`
	QueryCollections []QueryCollectionEntry `json:"query_collections,omitempty"`
	RemoteSchemas    []RemoteSchema         `json:"remote_schemas,omitempty"`
	RESTEndpoints    []RESTEndpoint         `json:"rest_endpoints"`
	Sources          []Source               `json:"sources"`
	Version          float64                `json:"version"`
}

func UnmarshalHasuraMetadataV3

func UnmarshalHasuraMetadataV3(data []byte) (HasuraMetadataV3, error)

func (*HasuraMetadataV3) Marshal

func (r *HasuraMetadataV3) Marshal() ([]byte, error)
type Header struct {
	Name         string  `json:"name"`                     // Name of the header
	Value        *string `json:"value,omitempty"`          // Value of the header
	ValueFromEnv *string `json:"value_from_env,omitempty"` // Name of the environment variable which holds the value of the header
}

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/syntax-defs.html#headerfromvalue

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/syntax-defs.html#headerfromenv

type HeaderFromEnv

type HeaderFromEnv struct {
	Name         string `json:"name"`           // Name of the header
	ValueFromEnv string `json:"value_from_env"` // Name of the environment variable which holds the value of the header
}

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/syntax-defs.html#headerfromenv

func UnmarshalHeaderFromEnv

func UnmarshalHeaderFromEnv(data []byte) (HeaderFromEnv, error)

func (*HeaderFromEnv) Marshal

func (r *HeaderFromEnv) Marshal() ([]byte, error)

type HeaderFromValue

type HeaderFromValue struct {
	Name  string `json:"name"`  // Name of the header
	Value string `json:"value"` // Value of the header
}

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/syntax-defs.html#headerfromvalue

func UnmarshalHeaderFromValue

func UnmarshalHeaderFromValue(data []byte) (HeaderFromValue, error)

func (*HeaderFromValue) Marshal

func (r *HeaderFromValue) Marshal() ([]byte, error)

type InheritedRole

type InheritedRole struct {
	RoleName string   `json:"role_name"`
	RoleSet  []string `json:"role_set"`
}

func UnmarshalInheritedRole

func UnmarshalInheritedRole(data []byte) (InheritedRole, error)

func (*InheritedRole) Marshal

func (r *InheritedRole) Marshal() ([]byte, error)

type InputArgument

type InputArgument struct {
	Name string `json:"name"`
	Type string `json:"type"`
}

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/actions.html#inputargument

func UnmarshalInputArgument

func UnmarshalInputArgument(data []byte) (InputArgument, error)

func (*InputArgument) Marshal

func (r *InputArgument) Marshal() ([]byte, error)

type InputArguments

type InputArguments map[string]string

func UnmarshalInputArguments

func UnmarshalInputArguments(data []byte) (InputArguments, error)

func (*InputArguments) Marshal

func (r *InputArguments) Marshal() ([]byte, error)

type InputObjectField

type InputObjectField struct {
	Description *string `json:"description,omitempty"` // Description of the Input object type
	Name        string  `json:"name"`                  // Name of the Input object type
	Type        string  `json:"type"`                  // GraphQL type of the Input object type
}

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/custom-types.html#inputobjectfield

func UnmarshalInputObjectField

func UnmarshalInputObjectField(data []byte) (InputObjectField, error)

func (*InputObjectField) Marshal

func (r *InputObjectField) Marshal() ([]byte, error)

type InputObjectType

type InputObjectType struct {
	Description *string            `json:"description,omitempty"` // Description of the Input object type
	Fields      []InputObjectField `json:"fields"`                // Fields of the Input object type
	Name        string             `json:"name"`                  // Name of the Input object type
}

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/custom-types.html#inputobjecttype

func UnmarshalInputObjectType

func UnmarshalInputObjectType(data []byte) (InputObjectType, error)

func (*InputObjectType) Marshal

func (r *InputObjectType) Marshal() ([]byte, error)

type InsertPermission

type InsertPermission struct {
	BackendOnly *bool                `json:"backend_only,omitempty"` // When set to true the mutation is accessible only if x-hasura-use-backend-only-permissions; session variable exists; and is set to true and request is made with x-hasura-admin-secret set if any auth is; configured
	Check       map[string]*Filter   `json:"check,omitempty"`        // This expression has to hold true for every new row that is inserted
	Columns     *EventTriggerColumns `json:"columns"`                // Can insert into only these columns (or all when '*' is specified)
	Set         map[string]string    `json:"set,omitempty"`          // Preset values for columns that can be sourced from session variables or static values
}

The permission definition

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/permission.html#insertpermission

func UnmarshalInsertPermission

func UnmarshalInsertPermission(data []byte) (InsertPermission, error)

func (*InsertPermission) Marshal

func (r *InsertPermission) Marshal() ([]byte, error)

type InsertPermissionEntry

type InsertPermissionEntry struct {
	Comment    *string          `json:"comment,omitempty"` // Comment
	Permission InsertPermission `json:"permission"`        // The permission definition
	Role       string           `json:"role"`              // Role
}

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/permission.html#args-syntax

func UnmarshalInsertPermissionEntry

func UnmarshalInsertPermissionEntry(data []byte) (InsertPermissionEntry, error)

func (*InsertPermissionEntry) Marshal

func (r *InsertPermissionEntry) Marshal() ([]byte, error)

type IsolationLevel

type IsolationLevel string

The transaction isolation level in which the queries made to the source will be run with (default: read-committed).

const (
	ReadCommitted  IsolationLevel = "read-committed"
	RepeatableRead IsolationLevel = "repeatable-read"
	Serializable   IsolationLevel = "serializable"
)

type MSSQLConfiguration

type MSSQLConfiguration struct {
	ConnectionInfo MSSQLSourceConnectionInfo `json:"connection_info"` // Connection parameters for the source
}

https://hasura.io/docs/latest/graphql/core/api-reference/syntax-defs.html#mssqlsourceconnectioninfo

func UnmarshalMSSQLConfiguration

func UnmarshalMSSQLConfiguration(data []byte) (MSSQLConfiguration, error)

func (*MSSQLConfiguration) Marshal

func (r *MSSQLConfiguration) Marshal() ([]byte, error)

type MSSQLPoolSettings

type MSSQLPoolSettings struct {
	IdleTimeout    *float64 `json:"idle_timeout,omitempty"`    // The idle timeout (in seconds) per connection (default: 180)
	MaxConnections *float64 `json:"max_connections,omitempty"` // Maximum number of connections to be kept in the pool (default: 50)
}

Connection pool settings

https://hasura.io/docs/latest/graphql/core/api-reference/syntax-defs.html#mssqlpoolsettings

func UnmarshalMSSQLPoolSettings

func UnmarshalMSSQLPoolSettings(data []byte) (MSSQLPoolSettings, error)

func (*MSSQLPoolSettings) Marshal

func (r *MSSQLPoolSettings) Marshal() ([]byte, error)

type MSSQLSource

type MSSQLSource struct {
	Configuration MSSQLConfiguration `json:"configuration"`
	Functions     []CustomFunction   `json:"functions,omitempty"`
	Kind          MSSQLSourceKind    `json:"kind"`
	Name          string             `json:"name"`
	Tables        []TableEntry       `json:"tables"`
}

func UnmarshalMSSQLSource

func UnmarshalMSSQLSource(data []byte) (MSSQLSource, error)

func (*MSSQLSource) Marshal

func (r *MSSQLSource) Marshal() ([]byte, error)

type MSSQLSourceConnectionInfo

type MSSQLSourceConnectionInfo struct {
	ConnectionString *Sslpassword       `json:"connection_string"`       // The database connection string, or as an environment variable
	PoolSettings     *MSSQLPoolSettings `json:"pool_settings,omitempty"` // Connection pool settings
}

Connection parameters for the source

https://hasura.io/docs/latest/graphql/core/api-reference/syntax-defs.html#mssqlsourceconnectioninfo

func UnmarshalMSSQLSourceConnectionInfo

func UnmarshalMSSQLSourceConnectionInfo(data []byte) (MSSQLSourceConnectionInfo, error)

func (*MSSQLSourceConnectionInfo) Marshal

func (r *MSSQLSourceConnectionInfo) Marshal() ([]byte, error)

type MSSQLSourceKind

type MSSQLSourceKind string
const (
	KindMssql MSSQLSourceKind = "mssql"
)

type Method

type Method string
const (
	Patch Method = "PATCH"
	Post  Method = "POST"
	Put   Method = "PUT"
)

type NodeLimit

type NodeLimit struct {
	Global  float64            `json:"global"`
	PerRole map[string]float64 `json:"per_role"`
}

func UnmarshalNodeLimit

func UnmarshalNodeLimit(data []byte) (NodeLimit, error)

func (*NodeLimit) Marshal

func (r *NodeLimit) Marshal() ([]byte, error)

type ObjRelUsing

type ObjRelUsing struct {
	ForeignKeyConstraintOn *string                   `json:"foreign_key_constraint_on,omitempty"` // The column with foreign key constraint
	ManualConfiguration    *ObjRelUsingManualMapping `json:"manual_configuration,omitempty"`      // Manual mapping of table and columns
}

Use one of the available ways to define an object relationship

Use one of the available ways to define an object relationship

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/relationship.html#objrelusing

func UnmarshalObjRelUsing

func UnmarshalObjRelUsing(data []byte) (ObjRelUsing, error)

func (*ObjRelUsing) Marshal

func (r *ObjRelUsing) Marshal() ([]byte, error)

type ObjRelUsingManualMapping

type ObjRelUsingManualMapping struct {
	ColumnMapping map[string]string `json:"column_mapping"` // Mapping of columns from current table to remote table
	RemoteTable   *TableName        `json:"remote_table"`   // The table to which the relationship has to be established
}

Manual mapping of table and columns

Manual mapping of table and columns

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/relationship.html#objrelusingmanualmapping

func UnmarshalObjRelUsingManualMapping

func UnmarshalObjRelUsingManualMapping(data []byte) (ObjRelUsingManualMapping, error)

func (*ObjRelUsingManualMapping) Marshal

func (r *ObjRelUsingManualMapping) Marshal() ([]byte, error)

type ObjectField

type ObjectField struct {
	Description *string `json:"description,omitempty"` // Description of the Input object type
	Name        string  `json:"name"`                  // Name of the Input object type
	Type        string  `json:"type"`                  // GraphQL type of the Input object type
}

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/custom-types.html#objectfield

func UnmarshalObjectField

func UnmarshalObjectField(data []byte) (ObjectField, error)

func (*ObjectField) Marshal

func (r *ObjectField) Marshal() ([]byte, error)

type ObjectRelationship

type ObjectRelationship struct {
	Comment *string     `json:"comment,omitempty"` // Comment
	Name    string      `json:"name"`              // Name of the new relationship
	Using   ObjRelUsing `json:"using"`             // Use one of the available ways to define an object relationship
}

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/relationship.html#args-syntax

func UnmarshalObjectRelationship

func UnmarshalObjectRelationship(data []byte) (ObjectRelationship, error)

func (*ObjectRelationship) Marshal

func (r *ObjectRelationship) Marshal() ([]byte, error)

type ObjectType

type ObjectType struct {
	Description   *string                        `json:"description,omitempty"`   // Description of the Input object type
	Fields        []InputObjectField             `json:"fields"`                  // Fields of the Input object type
	Name          string                         `json:"name"`                    // Name of the Input object type
	Relationships []CustomTypeObjectRelationship `json:"relationships,omitempty"` // Relationships of the Object type to tables
}

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/custom-types.html#objecttype

func UnmarshalObjectType

func UnmarshalObjectType(data []byte) (ObjectType, error)

func (*ObjectType) Marshal

func (r *ObjectType) Marshal() ([]byte, error)

type PGCERTSettings

type PGCERTSettings struct {
	Sslcert     FromEnv      `json:"sslcert"`     // Environment variable which stores the client certificate.
	Sslkey      FromEnv      `json:"sslkey"`      // Environment variable which stores the client private key.
	Sslmode     string       `json:"sslmode"`     // The SSL connection mode. See the libpq ssl support docs; <https://www.postgresql.org/docs/9.1/libpq-ssl.html> for more details.
	Sslpassword *Sslpassword `json:"sslpassword"` // Password in the case where the sslkey is encrypted.
	Sslrootcert FromEnv      `json:"sslrootcert"` // Environment variable which stores trusted certificate authorities.
}

The client SSL certificate settings for the database (Only available in Cloud).

https://hasura.io/docs/latest/graphql/core/api-reference/syntax-defs.html#pgcertsettings

func UnmarshalPGCERTSettings

func UnmarshalPGCERTSettings(data []byte) (PGCERTSettings, error)

func (*PGCERTSettings) Marshal

func (r *PGCERTSettings) Marshal() ([]byte, error)

type PGColumn

type PGColumn string

func UnmarshalPGColumn

func UnmarshalPGColumn(data []byte) (PGColumn, error)

func (*PGColumn) Marshal

func (r *PGColumn) Marshal() ([]byte, error)

type PGConfiguration

type PGConfiguration struct {
	ConnectionInfo PGSourceConnectionInfo   `json:"connection_info"`         // Connection parameters for the source
	ReadReplicas   []PGSourceConnectionInfo `json:"read_replicas,omitempty"` // Optional list of read replica configuration (supported only in cloud/enterprise versions)
}

https://hasura.io/docs/latest/graphql/core/api-reference/syntax-defs.html#pgconfiguration

func UnmarshalPGConfiguration

func UnmarshalPGConfiguration(data []byte) (PGConfiguration, error)

func (*PGConfiguration) Marshal

func (r *PGConfiguration) Marshal() ([]byte, error)

type PGConnectionParameters

type PGConnectionParameters struct {
	Database string  `json:"database"`           // The database name
	Host     string  `json:"host"`               // The name of the host to connect to
	Password *string `json:"password,omitempty"` // The Postgres user’s password
	Port     float64 `json:"port"`               // The port number to connect with, at the server host
	Username string  `json:"username"`           // The Postgres user to be connected
}

https://hasura.io/docs/latest/graphql/core/api-reference/syntax-defs.html#pgconnectionparameters

func UnmarshalPGConnectionParameters

func UnmarshalPGConnectionParameters(data []byte) (PGConnectionParameters, error)

func (*PGConnectionParameters) Marshal

func (r *PGConnectionParameters) Marshal() ([]byte, error)

type PGConnectionParametersClass

type PGConnectionParametersClass struct {
	FromEnv  *string  `json:"from_env,omitempty"` // Name of the environment variable
	Database *string  `json:"database,omitempty"` // The database name
	Host     *string  `json:"host,omitempty"`     // The name of the host to connect to
	Password *string  `json:"password,omitempty"` // The Postgres user’s password
	Port     *float64 `json:"port,omitempty"`     // The port number to connect with, at the server host
	Username *string  `json:"username,omitempty"` // The Postgres user to be connected
}

https://hasura.io/docs/latest/graphql/core/api-reference/syntax-defs.html#fromenv

Environment variable which stores the client certificate.

Environment variable which stores the client private key.

Environment variable which stores trusted certificate authorities.

https://hasura.io/docs/latest/graphql/core/api-reference/syntax-defs.html#pgconnectionparameters

type PGPoolSettings

type PGPoolSettings struct {
	ConnectionLifetime *float64 `json:"connection_lifetime,omitempty"` // Time from connection creation after which the connection should be destroyed and a new; one created. A value of 0 indicates we should never destroy an active connection. If 0 is; passed, memory from large query results may not be reclaimed. (default: 600 sec)
	IdleTimeout        *float64 `json:"idle_timeout,omitempty"`        // The idle timeout (in seconds) per connection (default: 180)
	MaxConnections     *float64 `json:"max_connections,omitempty"`     // Maximum number of connections to be kept in the pool (default: 50)
	PoolTimeout        *float64 `json:"pool_timeout,omitempty"`        // Maximum time to wait while acquiring a Postgres connection from the pool, in seconds; (default: forever)
	Retries            *float64 `json:"retries,omitempty"`             // Number of retries to perform (default: 1)
}

Connection pool settings

https://hasura.io/docs/latest/graphql/core/api-reference/syntax-defs.html#pgpoolsettings

func UnmarshalPGPoolSettings

func UnmarshalPGPoolSettings(data []byte) (PGPoolSettings, error)

func (*PGPoolSettings) Marshal

func (r *PGPoolSettings) Marshal() ([]byte, error)

type PGSource

type PGSource struct {
	Configuration PGConfiguration  `json:"configuration"`
	Functions     []CustomFunction `json:"functions,omitempty"`
	Kind          PGSourceKind     `json:"kind"`
	Name          string           `json:"name"`
	Tables        []TableEntry     `json:"tables"`
}

func UnmarshalPGSource

func UnmarshalPGSource(data []byte) (PGSource, error)

func (*PGSource) Marshal

func (r *PGSource) Marshal() ([]byte, error)

type PGSourceConnectionInfo

type PGSourceConnectionInfo struct {
	DatabaseURL           *DatabaseURL    `json:"database_url"`                      // The database connection URL as a string, as an environment variable, or as connection; parameters.
	IsolationLevel        *IsolationLevel `json:"isolation_level,omitempty"`         // The transaction isolation level in which the queries made to the source will be run with; (default: read-committed).
	PoolSettings          *PGPoolSettings `json:"pool_settings,omitempty"`           // Connection pool settings
	SSLConfiguration      *PGCERTSettings `json:"ssl_configuration,omitempty"`       // The client SSL certificate settings for the database (Only available in Cloud).
	UsePreparedStatements *bool           `json:"use_prepared_statements,omitempty"` // If set to true the server prepares statement before executing on the source database; (default: false). For more details, refer to the Postgres docs
}

Connection parameters for the source

https://hasura.io/docs/latest/graphql/core/api-reference/syntax-defs.html#pgsourceconnectioninfo

func UnmarshalPGSourceConnectionInfo

func UnmarshalPGSourceConnectionInfo(data []byte) (PGSourceConnectionInfo, error)

func (*PGSourceConnectionInfo) Marshal

func (r *PGSourceConnectionInfo) Marshal() ([]byte, error)

type PGSourceKind

type PGSourceKind string
const (
	KindCitus    PGSourceKind = "citus"
	KindPostgres PGSourceKind = "postgres"
)

type Permission

type Permission struct {
	Role string `json:"role"`
}

type PoolSettings

type PoolSettings struct {
	ConnectionLifetime *float64 `json:"connection_lifetime,omitempty"` // Time from connection creation after which the connection should be destroyed and a new; one created. A value of 0 indicates we should never destroy an active connection. If 0 is; passed, memory from large query results may not be reclaimed. (default: 600 sec)
	IdleTimeout        *float64 `json:"idle_timeout,omitempty"`        // The idle timeout (in seconds) per connection (default: 180)
	MaxConnections     *float64 `json:"max_connections,omitempty"`     // Maximum number of connections to be kept in the pool (default: 50)
	PoolTimeout        *float64 `json:"pool_timeout,omitempty"`        // Maximum time to wait while acquiring a Postgres connection from the pool, in seconds; (default: forever)
	Retries            *float64 `json:"retries,omitempty"`             // Number of retries to perform (default: 1)
}

Connection pool settings

https://hasura.io/docs/latest/graphql/core/api-reference/syntax-defs.html#pgpoolsettings

https://hasura.io/docs/latest/graphql/core/api-reference/syntax-defs.html#mssqlpoolsettings

type QualifiedFunction

type QualifiedFunction struct {
	Name   string `json:"name"`
	Schema string `json:"schema"`
}

func UnmarshalQualifiedFunction

func UnmarshalQualifiedFunction(data []byte) (QualifiedFunction, error)

func (*QualifiedFunction) Marshal

func (r *QualifiedFunction) Marshal() ([]byte, error)

type QualifiedTable

type QualifiedTable struct {
	Name   string `json:"name"`
	Schema string `json:"schema"`
}

func UnmarshalQualifiedTable

func UnmarshalQualifiedTable(data []byte) (QualifiedTable, error)

func (*QualifiedTable) Marshal

func (r *QualifiedTable) Marshal() ([]byte, error)

type QueryClass

type QueryClass struct {
	CollectionName string `json:"collection_name"`
	QueryName      string `json:"query_name"`
}

type QueryCollection

type QueryCollection struct {
	Name  string `json:"name"`
	Query string `json:"query"`
}

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/syntax-defs.html#collectionquery

func UnmarshalQueryCollection

func UnmarshalQueryCollection(data []byte) (QueryCollection, error)

func (*QueryCollection) Marshal

func (r *QueryCollection) Marshal() ([]byte, error)

type QueryCollectionEntry

type QueryCollectionEntry struct {
	Comment    *string    `json:"comment,omitempty"` // Comment
	Definition Definition `json:"definition"`        // List of queries
	Name       string     `json:"name"`              // Name of the query collection
}

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/query-collections.html#args-syntax

func UnmarshalQueryCollectionEntry

func UnmarshalQueryCollectionEntry(data []byte) (QueryCollectionEntry, error)

func (*QueryCollectionEntry) Marshal

func (r *QueryCollectionEntry) Marshal() ([]byte, error)

type RESTEndpoint

type RESTEndpoint struct {
	Comment    *string                `json:"comment,omitempty"`
	Definition RESTEndpointDefinition `json:"definition"`
	Methods    []Method               `json:"methods"`
	Name       string                 `json:"name"`
	URL        string                 `json:"url"`
}

func UnmarshalRESTEndpoint

func UnmarshalRESTEndpoint(data []byte) (RESTEndpoint, error)

func (*RESTEndpoint) Marshal

func (r *RESTEndpoint) Marshal() ([]byte, error)

type RESTEndpointDefinition

type RESTEndpointDefinition struct {
	Query QueryClass `json:"query"`
}

func UnmarshalRESTEndpointDefinition

func UnmarshalRESTEndpointDefinition(data []byte) (RESTEndpointDefinition, error)

func (*RESTEndpointDefinition) Marshal

func (r *RESTEndpointDefinition) Marshal() ([]byte, error)

type RateLimit

type RateLimit struct {
	Global  RateLimitRule            `json:"global"`
	PerRole map[string]RateLimitRule `json:"per_role"`
}

func UnmarshalRateLimit

func UnmarshalRateLimit(data []byte) (RateLimit, error)

func (*RateLimit) Marshal

func (r *RateLimit) Marshal() ([]byte, error)

type RateLimitRule

type RateLimitRule struct {
	MaxReqsPerMin float64       `json:"max_reqs_per_min"`
	UniqueParams  *UniqueParams `json:"unique_params"`
}

func UnmarshalRateLimitRule

func UnmarshalRateLimitRule(data []byte) (RateLimitRule, error)

func (*RateLimitRule) Marshal

func (r *RateLimitRule) Marshal() ([]byte, error)

type RecordStringAny

type RecordStringAny map[string]interface{}

func UnmarshalRecordStringAny

func UnmarshalRecordStringAny(data []byte) (RecordStringAny, error)

func (*RecordStringAny) Marshal

func (r *RecordStringAny) Marshal() ([]byte, error)

type RecordStringAnyClass

type RecordStringAnyClass struct {
	FromEnv *string `json:"from_env,omitempty"` // Name of the environment variable
}

https://hasura.io/docs/latest/graphql/core/api-reference/syntax-defs.html#fromenv

Environment variable which stores the client certificate.

Environment variable which stores the client private key.

Environment variable which stores trusted certificate authorities.

type RelationshipName

type RelationshipName string

func UnmarshalRelationshipName

func UnmarshalRelationshipName(data []byte) (RelationshipName, error)

func (*RelationshipName) Marshal

func (r *RelationshipName) Marshal() ([]byte, error)

type RemoteField

type RemoteField map[string]RemoteFieldValue

func UnmarshalRemoteField

func UnmarshalRemoteField(data []byte) (RemoteField, error)

func (*RemoteField) Marshal

func (r *RemoteField) Marshal() ([]byte, error)

type RemoteFieldValue

type RemoteFieldValue struct {
	Arguments map[string]string           `json:"arguments"`
	Field     map[string]RemoteFieldValue `json:"field,omitempty"` // A recursive tree structure that points to the field in the remote schema that needs to be; joined with.; It is recursive because the remote field maybe nested deeply in the remote schema.; ; https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/remote-relationships.html#remotefield
}

type RemoteRelationship

type RemoteRelationship struct {
	Definition RemoteRelationshipDef `json:"definition"` // Definition object
	Name       string                `json:"name"`       // Name of the remote relationship
}

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/remote-relationships.html#args-syntax

func UnmarshalRemoteRelationship

func UnmarshalRemoteRelationship(data []byte) (RemoteRelationship, error)

func (*RemoteRelationship) Marshal

func (r *RemoteRelationship) Marshal() ([]byte, error)

type RemoteRelationshipDef

type RemoteRelationshipDef struct {
	HasuraFields []string                    `json:"hasura_fields"` // Column(s) in the table that is used for joining with remote schema field.; All join keys in remote_field must appear here.
	RemoteField  map[string]RemoteFieldValue `json:"remote_field"`  // The schema tree ending at the field in remote schema which needs to be joined with.
	RemoteSchema string                      `json:"remote_schema"` // Name of the remote schema to join with
}

Definition object

func UnmarshalRemoteRelationshipDef

func UnmarshalRemoteRelationshipDef(data []byte) (RemoteRelationshipDef, error)

func (*RemoteRelationshipDef) Marshal

func (r *RemoteRelationshipDef) Marshal() ([]byte, error)

type RemoteRelationshipName

type RemoteRelationshipName string

func UnmarshalRemoteRelationshipName

func UnmarshalRemoteRelationshipName(data []byte) (RemoteRelationshipName, error)

func (*RemoteRelationshipName) Marshal

func (r *RemoteRelationshipName) Marshal() ([]byte, error)

type RemoteSchema

type RemoteSchema struct {
	Comment    *string         `json:"comment,omitempty"` // Comment
	Definition RemoteSchemaDef `json:"definition"`        // Name of the remote schema
	Name       string          `json:"name"`              // Name of the remote schema
}

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/remote-schemas.html#add-remote-schema

func UnmarshalRemoteSchema

func UnmarshalRemoteSchema(data []byte) (RemoteSchema, error)

func (*RemoteSchema) Marshal

func (r *RemoteSchema) Marshal() ([]byte, error)

type RemoteSchemaDef

type RemoteSchemaDef struct {
	ForwardClientHeaders *bool    `json:"forward_client_headers,omitempty"`
	Headers              []Header `json:"headers,omitempty"`
	TimeoutSeconds       *float64 `json:"timeout_seconds,omitempty"`
	URL                  *string  `json:"url,omitempty"`
	URLFromEnv           *string  `json:"url_from_env,omitempty"`
}

Name of the remote schema

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/syntax-defs.html#remoteschemadef

func UnmarshalRemoteSchemaDef

func UnmarshalRemoteSchemaDef(data []byte) (RemoteSchemaDef, error)

func (*RemoteSchemaDef) Marshal

func (r *RemoteSchemaDef) Marshal() ([]byte, error)

type RemoteSchemaName

type RemoteSchemaName string

func UnmarshalRemoteSchemaName

func UnmarshalRemoteSchemaName(data []byte) (RemoteSchemaName, error)

func (*RemoteSchemaName) Marshal

func (r *RemoteSchemaName) Marshal() ([]byte, error)

type RetryConf

type RetryConf struct {
	IntervalSEC *int64 `json:"interval_sec,omitempty"` // Number of seconds to wait between each retry.; Default: 10
	NumRetries  *int64 `json:"num_retries,omitempty"`  // Number of times to retry delivery.; Default: 0
	TimeoutSEC  *int64 `json:"timeout_sec,omitempty"`  // Number of seconds to wait for response before timing out.; Default: 60
}

The SQL function

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/event-triggers.html#retryconf

func UnmarshalRetryConf

func UnmarshalRetryConf(data []byte) (RetryConf, error)

func (*RetryConf) Marshal

func (r *RetryConf) Marshal() ([]byte, error)

type RetryConfST

type RetryConfST struct {
	NumRetries           *int64 `json:"num_retries,omitempty"`            // Number of times to retry delivery.; Default: 0
	RetryIntervalSeconds *int64 `json:"retry_interval_seconds,omitempty"` // Number of seconds to wait between each retry.; Default: 10
	TimeoutSeconds       *int64 `json:"timeout_seconds,omitempty"`        // Number of seconds to wait for response before timing out.; Default: 60
	ToleranceSeconds     *int64 `json:"tolerance_seconds,omitempty"`      // Number of seconds between scheduled time and actual delivery time that is acceptable. If; the time difference is more than this, then the event is dropped.; Default: 21600 (6 hours)
}

Retry configuration if scheduled invocation delivery fails

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/scheduled-triggers.html#retryconfst

func UnmarshalRetryConfST

func UnmarshalRetryConfST(data []byte) (RetryConfST, error)

func (*RetryConfST) Marshal

func (r *RetryConfST) Marshal() ([]byte, error)

type RoleName

type RoleName string

func UnmarshalRoleName

func UnmarshalRoleName(data []byte) (RoleName, error)

func (*RoleName) Marshal

func (r *RoleName) Marshal() ([]byte, error)

type ScalarType

type ScalarType struct {
	Description *string `json:"description,omitempty"` // Description of the Scalar type
	Name        string  `json:"name"`                  // Name of the Scalar type
}

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/custom-types.html#scalartype

func UnmarshalScalarType

func UnmarshalScalarType(data []byte) (ScalarType, error)

func (*ScalarType) Marshal

func (r *ScalarType) Marshal() ([]byte, error)

type SelectPermission

type SelectPermission struct {
	AllowAggregations *bool                `json:"allow_aggregations,omitempty"` // Toggle allowing aggregate queries
	Columns           *EventTriggerColumns `json:"columns"`                      // Only these columns are selectable (or all when '*' is specified)
	ComputedFields    []string             `json:"computed_fields,omitempty"`    // Only these computed fields are selectable
	Filter            map[string]*Filter   `json:"filter,omitempty"`             // Only the rows where this precondition holds true are selectable
	Limit             *int64               `json:"limit,omitempty"`              // The maximum number of rows that can be returned
}

The permission definition

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/permission.html#selectpermission

func UnmarshalSelectPermission

func UnmarshalSelectPermission(data []byte) (SelectPermission, error)

func (*SelectPermission) Marshal

func (r *SelectPermission) Marshal() ([]byte, error)

type SelectPermissionEntry

type SelectPermissionEntry struct {
	Comment    *string          `json:"comment,omitempty"` // Comment
	Permission SelectPermission `json:"permission"`        // The permission definition
	Role       string           `json:"role"`              // Role
}

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/permission.html#create-select-permission-syntax

func UnmarshalSelectPermissionEntry

func UnmarshalSelectPermissionEntry(data []byte) (SelectPermissionEntry, error)

func (*SelectPermissionEntry) Marshal

func (r *SelectPermissionEntry) Marshal() ([]byte, error)

type ServiceAccount

type ServiceAccount struct {
	RecordStringAnyClass *RecordStringAnyClass
	String               *string
}

Service account for BigQuery database

func (*ServiceAccount) MarshalJSON

func (x *ServiceAccount) MarshalJSON() ([]byte, error)

func (*ServiceAccount) UnmarshalJSON

func (x *ServiceAccount) UnmarshalJSON(data []byte) error

type Source

type Source struct {
	Configuration Configuration    `json:"configuration"`
	Functions     []CustomFunction `json:"functions,omitempty"`
	Kind          BackendKind      `json:"kind"`
	Name          string           `json:"name"`
	Tables        []TableEntry     `json:"tables"`
}

func UnmarshalSource

func UnmarshalSource(data []byte) (Source, error)

func (*Source) Marshal

func (r *Source) Marshal() ([]byte, error)

type SourceConnectionInfo

type SourceConnectionInfo struct {
	DatabaseURL           *DatabaseURL    `json:"database_url"`                      // The database connection URL as a string, as an environment variable, or as connection; parameters.
	IsolationLevel        *IsolationLevel `json:"isolation_level,omitempty"`         // The transaction isolation level in which the queries made to the source will be run with; (default: read-committed).
	PoolSettings          *PoolSettings   `json:"pool_settings,omitempty"`           // Connection pool settings
	SSLConfiguration      *PGCERTSettings `json:"ssl_configuration,omitempty"`       // The client SSL certificate settings for the database (Only available in Cloud).
	UsePreparedStatements *bool           `json:"use_prepared_statements,omitempty"` // If set to true the server prepares statement before executing on the source database; (default: false). For more details, refer to the Postgres docs
	ConnectionString      *Sslpassword    `json:"connection_string"`                 // The database connection string, or as an environment variable
}

Connection parameters for the source

https://hasura.io/docs/latest/graphql/core/api-reference/syntax-defs.html#pgsourceconnectioninfo

https://hasura.io/docs/latest/graphql/core/api-reference/syntax-defs.html#mssqlsourceconnectioninfo

type Sslpassword

type Sslpassword struct {
	FromEnv *FromEnv
	String  *string
}

func (*Sslpassword) MarshalJSON

func (x *Sslpassword) MarshalJSON() ([]byte, error)

func (*Sslpassword) UnmarshalJSON

func (x *Sslpassword) UnmarshalJSON(data []byte) error

type TableConfig

type TableConfig struct {
	CustomColumnNames map[string]string `json:"custom_column_names,omitempty"` // Customise the column names
	CustomName        *string           `json:"custom_name,omitempty"`         // Customise the table name
	CustomRootFields  *CustomRootFields `json:"custom_root_fields,omitempty"`  // Customise the root fields
}

Configuration for the table/view

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/table-view.html#table-config

func UnmarshalTableConfig

func UnmarshalTableConfig(data []byte) (TableConfig, error)

func (*TableConfig) Marshal

func (r *TableConfig) Marshal() ([]byte, error)

type TableEntry

type TableEntry struct {
	ArrayRelationships  []ArrayRelationship     `json:"array_relationships,omitempty"`
	ComputedFields      []ComputedField         `json:"computed_fields,omitempty"`
	Configuration       *TableConfig            `json:"configuration,omitempty"` // Configuration for the table/view; ; https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/table-view.html#table-config
	DeletePermissions   []DeletePermissionEntry `json:"delete_permissions,omitempty"`
	EventTriggers       []EventTrigger          `json:"event_triggers,omitempty"`
	InsertPermissions   []InsertPermissionEntry `json:"insert_permissions,omitempty"`
	IsEnum              *bool                   `json:"is_enum,omitempty"`
	ObjectRelationships []ObjectRelationship    `json:"object_relationships,omitempty"`
	RemoteRelationships []RemoteRelationship    `json:"remote_relationships,omitempty"`
	SelectPermissions   []SelectPermissionEntry `json:"select_permissions,omitempty"`
	Table               QualifiedTable          `json:"table"`
	UpdatePermissions   []UpdatePermissionEntry `json:"update_permissions,omitempty"`
}

Representation of a table in metadata, 'tables.yaml' and 'metadata.json'

func UnmarshalTableEntry

func UnmarshalTableEntry(data []byte) (TableEntry, error)

func (*TableEntry) Marshal

func (r *TableEntry) Marshal() ([]byte, error)

type TableName

type TableName struct {
	QualifiedTable *QualifiedTable
	String         *string
}

func UnmarshalTableName

func UnmarshalTableName(data []byte) (TableName, error)

func (*TableName) Marshal

func (r *TableName) Marshal() ([]byte, error)

func (*TableName) MarshalJSON

func (x *TableName) MarshalJSON() ([]byte, error)

func (*TableName) UnmarshalJSON

func (x *TableName) UnmarshalJSON(data []byte) error

type TriggerName

type TriggerName string

func UnmarshalTriggerName

func UnmarshalTriggerName(data []byte) (TriggerName, error)

func (*TriggerName) Marshal

func (r *TriggerName) Marshal() ([]byte, error)

type UniqueParams

type UniqueParams struct {
	Enum        *UniqueParamsEnum
	StringArray []string
}

func (*UniqueParams) MarshalJSON

func (x *UniqueParams) MarshalJSON() ([]byte, error)

func (*UniqueParams) UnmarshalJSON

func (x *UniqueParams) UnmarshalJSON(data []byte) error

type UniqueParamsEnum

type UniqueParamsEnum string
const (
	IP UniqueParamsEnum = "IP"
)

type UpdatePermission

type UpdatePermission struct {
	Check   map[string]*Filter   `json:"check,omitempty"`  // Postcondition which must be satisfied by rows which have been updated
	Columns *EventTriggerColumns `json:"columns"`          // Only these columns are selectable (or all when '*' is specified)
	Filter  map[string]*Filter   `json:"filter,omitempty"` // Only the rows where this precondition holds true are updatable
	Set     map[string]string    `json:"set,omitempty"`    // Preset values for columns that can be sourced from session variables or static values
}

The permission definition

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/permission.html#updatepermission

func UnmarshalUpdatePermission

func UnmarshalUpdatePermission(data []byte) (UpdatePermission, error)

func (*UpdatePermission) Marshal

func (r *UpdatePermission) Marshal() ([]byte, error)

type UpdatePermissionEntry

type UpdatePermissionEntry struct {
	Comment    *string          `json:"comment,omitempty"` // Comment
	Permission UpdatePermission `json:"permission"`        // The permission definition
	Role       string           `json:"role"`              // Role
}

https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/permission.html#create-update-permission-syntax

func UnmarshalUpdatePermissionEntry

func UnmarshalUpdatePermissionEntry(data []byte) (UpdatePermissionEntry, error)

func (*UpdatePermissionEntry) Marshal

func (r *UpdatePermissionEntry) Marshal() ([]byte, error)

type WebhookURL

type WebhookURL string

func UnmarshalWebhookURL

func UnmarshalWebhookURL(data []byte) (WebhookURL, error)

func (*WebhookURL) Marshal

func (r *WebhookURL) Marshal() ([]byte, error)

Jump to

Keyboard shortcuts

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