Documentation
¶
Index ¶
- type Action
- type ActionDefinition
- type ActionDefinitionType
- type ActionName
- type AllowList
- type ArrRelUsing
- type ArrRelUsingFKeyOn
- type ArrRelUsingManualMapping
- type ArrayRelationship
- type CollectionName
- type ColumnPresetsExpression
- type Columns
- type ComputedField
- type ComputedFieldDefinition
- type ComputedFieldName
- type CronTrigger
- type CustomColumnNames
- type CustomFunction
- type CustomRootFields
- type CustomTypeObjectRelationship
- type CustomTypeObjectRelationshipType
- type CustomTypes
- type Definition
- type DeletePermission
- type DeletePermissionEntry
- type EnumType
- type EnumValue
- type EventTrigger
- type EventTriggerColumns
- type EventTriggerDefinition
- type Filter
- type FunctionConfiguration
- type FunctionName
- type GraphQLName
- type GraphQLType
- type HasuraMetadataV2
- type Header
- type HeaderFromEnv
- type HeaderFromValue
- type InputArgument
- type InputArguments
- type InputObjectField
- type InputObjectType
- type InsertPermission
- type InsertPermissionEntry
- type ObjRelUsing
- type ObjRelUsingManualMapping
- type ObjectField
- type ObjectRelationship
- type ObjectType
- type OperationSpec
- type PGColumn
- type Permissions
- type QualifiedFunction
- type QualifiedTable
- type QueryCollection
- type QueryCollectionEntry
- type RelationshipName
- type RemoteField
- type RemoteFieldValue
- type RemoteRelationship
- type RemoteRelationshipDef
- type RemoteRelationshipName
- type RemoteSchema
- type RemoteSchemaDef
- type RemoteSchemaName
- type RetryConf
- type RetryConfST
- type RoleName
- type ScalarType
- type SelectPermission
- type SelectPermissionEntry
- type TableConfig
- type TableEntry
- type TableName
- type TriggerName
- type UpdatePermission
- type UpdatePermissionEntry
- type WebhookURL
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 *Permissions `json:"permissions,omitempty"` // Permissions of the action
}
func UnmarshalAction ¶
type ActionDefinition ¶
type ActionDefinition struct {
Arguments []InputArgument `json:"arguments"`
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"`
Kind *string `json:"kind,omitempty"`
OutputType *string `json:"output_type,omitempty"`
Type *ActionDefinitionType `json:"type,omitempty"`
}
Definition of the action
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" )
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
}
func UnmarshalAllowList ¶
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 ¶
func UnmarshalArrRelUsing ¶
func UnmarshalArrRelUsing(data []byte) (ArrRelUsing, error)
func (*ArrRelUsing) Marshal ¶
func (r *ArrRelUsing) Marshal() ([]byte, error)
type ArrRelUsingFKeyOn ¶
The column with foreign key constraint
The column with foreign key constraint ¶
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 ¶
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
}
func UnmarshalArrayRelationship ¶
func UnmarshalArrayRelationship(data []byte) (ArrayRelationship, error)
func (*ArrayRelationship) Marshal ¶
func (r *ArrayRelationship) Marshal() ([]byte, error)
type CollectionName ¶
type CollectionName string
func UnmarshalCollectionName ¶
func UnmarshalCollectionName(data []byte) (CollectionName, error)
func (*CollectionName) Marshal ¶
func (r *CollectionName) Marshal() ([]byte, error)
type ColumnPresetsExpression ¶
func UnmarshalColumnPresetsExpression ¶
func UnmarshalColumnPresetsExpression(data []byte) (ColumnPresetsExpression, error)
func (*ColumnPresetsExpression) Marshal ¶
func (r *ColumnPresetsExpression) Marshal() ([]byte, error)
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
}
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
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 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
}
func UnmarshalCronTrigger ¶
func UnmarshalCronTrigger(data []byte) (CronTrigger, error)
func (*CronTrigger) Marshal ¶
func (r *CronTrigger) Marshal() ([]byte, error)
type CustomColumnNames ¶
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.
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 ¶
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
}
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" )
type CustomTypes ¶
type CustomTypes struct {
Enums []EnumType `json:"enums"`
InputObjects []InputObjectType `json:"input_objects"`
Objects []ObjectType `json:"objects"`
Scalars []ScalarType `json:"scalars"`
}
func UnmarshalCustomTypes ¶
func UnmarshalCustomTypes(data []byte) (CustomTypes, error)
func (*CustomTypes) Marshal ¶
func (r *CustomTypes) Marshal() ([]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
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
}
func UnmarshalDeletePermissionEntry ¶
func UnmarshalDeletePermissionEntry(data []byte) (DeletePermissionEntry, error)
func (*DeletePermissionEntry) Marshal ¶
func (r *DeletePermissionEntry) 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
}
func UnmarshalEnumType ¶
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
}
func UnmarshalEnumValue ¶
type EventTrigger ¶
type EventTrigger struct {
Definition EventTriggerDefinition `json:"definition"` // The SQL function
Headers []Header `json:"headers"` // 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
func UnmarshalEventTrigger ¶
func UnmarshalEventTrigger(data []byte) (EventTrigger, error)
func (*EventTrigger) Marshal ¶
func (r *EventTrigger) Marshal() ([]byte, error)
type EventTriggerColumns ¶
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 ¶
type EventTriggerDefinition struct {
Delete *OperationSpec `json:"delete,omitempty"` // ; https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/event-triggers.html#operationspec
EnableManual bool `json:"enable_manual"`
Insert *OperationSpec `json:"insert,omitempty"` // ; https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/event-triggers.html#operationspec
Update *OperationSpec `json:"update,omitempty"` // ; https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/event-triggers.html#operationspec
}
The SQL function
func UnmarshalEventTriggerDefinition ¶
func UnmarshalEventTriggerDefinition(data []byte) (EventTriggerDefinition, error)
func (*EventTriggerDefinition) Marshal ¶
func (r *EventTriggerDefinition) 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 ¶
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"`
Allowlist []AllowList `json:"allowlist"`
CronTriggers []CronTrigger `json:"cron_triggers"`
CustomTypes *CustomTypes `json:"custom_types,omitempty"`
Functions []CustomFunction `json:"functions"`
QueryCollections []QueryCollectionEntry `json:"query_collections"`
RemoteSchemas []RemoteSchema `json:"remote_schemas"`
Tables []TableEntry `json:"tables"`
Version float64 `json:"version"`
}
Type used in exported 'metadata.json' and replace metadata endpoint
func UnmarshalHasuraMetadataV2 ¶
func UnmarshalHasuraMetadataV2(data []byte) (HasuraMetadataV2, error)
func (*HasuraMetadataV2) Marshal ¶
func (r *HasuraMetadataV2) Marshal() ([]byte, error)
type Header ¶
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
}
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
}
func UnmarshalHeaderFromValue ¶
func UnmarshalHeaderFromValue(data []byte) (HeaderFromValue, error)
func (*HeaderFromValue) Marshal ¶
func (r *HeaderFromValue) Marshal() ([]byte, error)
type InputArgument ¶
func UnmarshalInputArgument ¶
func UnmarshalInputArgument(data []byte) (InputArgument, error)
func (*InputArgument) Marshal ¶
func (r *InputArgument) Marshal() ([]byte, error)
type InputArguments ¶
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
}
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
}
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
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
}
func UnmarshalInsertPermissionEntry ¶
func UnmarshalInsertPermissionEntry(data []byte) (InsertPermissionEntry, error)
func (*InsertPermissionEntry) Marshal ¶
func (r *InsertPermissionEntry) 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 ¶
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 ¶
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
}
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
}
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"` // Relationships of the Object type to tables
}
func UnmarshalObjectType ¶
func UnmarshalObjectType(data []byte) (ObjectType, error)
func (*ObjectType) Marshal ¶
func (r *ObjectType) Marshal() ([]byte, error)
type OperationSpec ¶
type OperationSpec struct {
Columns *EventTriggerColumns `json:"columns"` // ; https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/event-triggers.html#eventtriggercolumns
Payload *EventTriggerColumns `json:"payload"` // ; https://hasura.io/docs/latest/graphql/core/api-reference/schema-metadata-api/event-triggers.html#eventtriggercolumns
}
func UnmarshalOperationSpec ¶
func UnmarshalOperationSpec(data []byte) (OperationSpec, error)
func (*OperationSpec) Marshal ¶
func (r *OperationSpec) Marshal() ([]byte, error)
type QualifiedFunction ¶
func UnmarshalQualifiedFunction ¶
func UnmarshalQualifiedFunction(data []byte) (QualifiedFunction, error)
func (*QualifiedFunction) Marshal ¶
func (r *QualifiedFunction) Marshal() ([]byte, error)
type QualifiedTable ¶
func UnmarshalQualifiedTable ¶
func UnmarshalQualifiedTable(data []byte) (QualifiedTable, error)
func (*QualifiedTable) Marshal ¶
func (r *QualifiedTable) Marshal() ([]byte, error)
type QueryCollection ¶
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
}
func UnmarshalQueryCollectionEntry ¶
func UnmarshalQueryCollectionEntry(data []byte) (QueryCollectionEntry, error)
func (*QueryCollectionEntry) Marshal ¶
func (r *QueryCollectionEntry) Marshal() ([]byte, error)
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
}
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
}
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"`
TimeoutSeconds *float64 `json:"timeout_seconds,omitempty"`
URL *string `json:"url,omitempty"`
URLFromEnv *string `json:"url_from_env,omitempty"`
}
Name of the remote schema
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
func UnmarshalRetryConf ¶
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
func UnmarshalRetryConfST ¶
func UnmarshalRetryConfST(data []byte) (RetryConfST, error)
func (*RetryConfST) Marshal ¶
func (r *RetryConfST) 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
}
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"` // 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
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
}
func UnmarshalSelectPermissionEntry ¶
func UnmarshalSelectPermissionEntry(data []byte) (SelectPermissionEntry, error)
func (*SelectPermissionEntry) Marshal ¶
func (r *SelectPermissionEntry) Marshal() ([]byte, error)
type TableConfig ¶
type TableConfig struct {
CustomColumnNames map[string]string `json:"custom_column_names,omitempty"` // Customise the column names
CustomRootFields *CustomRootFields `json:"custom_root_fields,omitempty"` // Customise the root fields
}
Configuration for the table/view
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"`
ComputedFields []ComputedField `json:"computed_fields"`
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"`
EventTriggers []EventTrigger `json:"event_triggers"`
InsertPermissions []InsertPermissionEntry `json:"insert_permissions"`
IsEnum *bool `json:"is_enum,omitempty"`
ObjectRelationships []ObjectRelationship `json:"object_relationships"`
RemoteRelationships []RemoteRelationship `json:"remote_relationships"`
SelectPermissions []SelectPermissionEntry `json:"select_permissions"`
Table QualifiedTable `json:"table"`
UpdatePermissions []UpdatePermissionEntry `json:"update_permissions"`
}
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 (*TableName) MarshalJSON ¶
func (*TableName) UnmarshalJSON ¶
type TriggerName ¶
type TriggerName string
func UnmarshalTriggerName ¶
func UnmarshalTriggerName(data []byte) (TriggerName, error)
func (*TriggerName) Marshal ¶
func (r *TriggerName) Marshal() ([]byte, error)
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
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
}
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)