Documentation
¶
Index ¶
- func DropAll(dgraph *DGraph) error
- func DropPredicate(ctx context.Context, dg *dgo.Dgraph, predicate string) error
- func GetGrpcEndpoint(dg *DGraph) (string, error)
- type AdminExport
- type AdminExportDataPayload
- type AdminExportPayload
- type AdminExportPromise
- type AdminExportStatus
- type DGraph
- type ExportDataPayload
- type GenericError
- type GenericQuery
- type PredicateDefinition
- type PredicateQuery
- type PredicateQueryPayload
- type ResponseDataPayload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DropPredicate ¶ added in v0.0.2
func GetGrpcEndpoint ¶
GetGrpcEndpoint converts a graphql or admin endpoint to a GRPC endpoint, as is commonly specified by the Dgraph Cloud Service
Types ¶
type AdminExport ¶
type AdminExport struct { Data AdminExportPayload `json:"data"` Error []GenericError `json:"errors,omitempty"` }
AdminExport is a wrapper AdminExportPayload along with details for any errors that might have happened
func AwaitExportBackup ¶
func AwaitExportBackup(dgraph *DGraph, e *AdminExportPromise) (*AdminExport, error)
type AdminExportDataPayload ¶
type AdminExportDataPayload struct {
Export ExportDataPayload `json:"export"`
}
AdminExportDataPayload is a wrapper for ExportDataPayload
type AdminExportPayload ¶
type AdminExportPayload struct {
ExportStatus AdminExportStatus `json:"exportStatus"`
}
AdminExportPayload is a wrapper for AdminExportStatus
type AdminExportPromise ¶
type AdminExportPromise struct { Data AdminExportDataPayload `json:"data"` Error []GenericError `json:"errors,omitempty"` }
AdminExportPromise is a wrapper for AdminExportDataPayload along with details for any errors that might have happened
func ExportBackupQueueJob ¶
func ExportBackupQueueJob(dgraph *DGraph) (*AdminExportPromise, error)
type AdminExportStatus ¶
type AdminExportStatus struct { Kind string `json:"kind"` LastUpdated time.Time `json:"lastUpdated"` SignedUrls []string `json:"signedUrls"` Status string `json:"status"` }
AdminExportStatus provides the response from dgraph which indicates the status of the backup, and URLs over which the backup can be downloaded
type DGraph ¶
DGraph instance definition for providing the endpoint and the Api Token
func FromCliContext ¶
func FromCliContext(cli *cli.Context) *DGraph
FromCliContext creates a dgraph cloud instance from cli.Context
type ExportDataPayload ¶
ExportDataPayload returns the export Id and task Id which can then be used to poll for jobs
type GenericQuery ¶
type GenericQuery struct {
Query string `json:"query"`
}
GenericQuery helps to send a generic query to dgraph
type PredicateDefinition ¶ added in v0.0.2
type PredicateDefinition struct {
Predicate string `json:"predicate"`
}
type PredicateQuery ¶ added in v0.0.2
type PredicateQuery struct { Data PredicateQueryPayload `json:"data"` Error []GenericError `json:"errors,omitempty"` }
type PredicateQueryPayload ¶ added in v0.0.2
type PredicateQueryPayload struct {
Schema []PredicateDefinition `json:"schema"`
}
type ResponseDataPayload ¶
ResponseDataPayload is generic struct received from dgraph