Versions in this module Expand all Collapse all v25 v25.1.0 Dec 11, 2025 Changes in this version + const DefaultPassword + const DefaultUser + func CompareJSON(want, got string) error + func DoReq(req *http.Request) ([]byte, error) + func GenerateRandomVector(size int) []float32 + func GenerateRandomVectors(lowerLimit, uppermLimit, vectorSize int, label string) (string, [][]float32) + func GetFullSchemaHTTPResponse(opts SchemaOptions) string + func GetFullSchemaJSON(opts SchemaOptions) string + func GetInternalPreds(excludeAclPreds bool) string + func GetInternalTypes(excludeAclTypes bool) string + func IsHigherVersion(higher, lower, repoDir string) (bool, error) + func PollTillPassOrTimeout(gcli *GrpcClient, query, want string, timeout time.Duration) error + func UnmarshalVectorResp(resp *api.Response) ([][]float32, error) + func WaitForRestore(c Cluster) error + type AclGroup struct + Name string + Rules []AclRule + type AclRule struct + Permission int32 + Predicate string + type Cluster interface + AlphasHealth func() ([]string, error) + AlphasLogs func() ([]string, error) + AssignUids func(gc *dgo.Dgraph, num uint64) error + Client func() (*GrpcClient, func(), error) + GetEncKeyPath func() (string, error) + GetRepoDir func() (string, error) + GetVersion func() string + HTTPClient func() (*HTTPClient, error) + type GraphQLParams struct + Extensions *schema.RequestExtensions + Query string + Variables map[string]interface{} + type GraphQLResponse struct + Code string + Data json.RawMessage + Errors x.GqlErrorList + Extensions map[string]interface{} + type GrpcClient struct + func (gc *GrpcClient) DropAll() error + func (gc *GrpcClient) DropPredicate(pred string) error + func (gc *GrpcClient) Mutate(mu *api.Mutation) (*api.Response, error) + func (gc *GrpcClient) Query(query string) (*api.Response, error) + func (gc *GrpcClient) QueryMultipleVectorsUsingSimilarTo(vector []float32, pred string, topK int) ([][]float32, error) + func (gc *GrpcClient) QuerySingleVectorsUsingUid(uid, pred string) ([][]float32, error) + func (gc *GrpcClient) SetupSchema(dbSchema string) error + func (gc *GrpcClient) Upsert(query string, mu *api.Mutation) (*api.Response, error) + type HTTPClient struct + func GetHttpClient(alphaUrl, zeroUrl string) (*HTTPClient, error) + func (hc *HTTPClient) AddNamespace() (uint64, error) + func (hc *HTTPClient) AddRulesToGroup(group string, rules []AclRule, newGroup bool) error + func (hc *HTTPClient) AddUserToGroup(userName, group string) error + func (hc *HTTPClient) Backup(c Cluster, forceFull bool, backupPath string) error + func (hc *HTTPClient) CreateGroup(name string) (string, error) + func (hc *HTTPClient) CreateGroupWithRules(name string, rules []AclRule) (*AclGroup, error) + func (hc *HTTPClient) CreateUser(username, password string) (string, error) + func (hc *HTTPClient) DeleteGroup(name string) error + func (hc *HTTPClient) DeleteNamespace(nsID uint64) (uint64, error) + func (hc *HTTPClient) DeleteUser(username string) error + func (hc *HTTPClient) Export(dest, format string, namespace int) error + func (hc *HTTPClient) GetAlphaState() ([]byte, error) + func (hc *HTTPClient) GetCurrentSnapshotTs(group uint64) (uint64, error) + func (hc *HTTPClient) GetCurrentUser() (string, error) + func (hc *HTTPClient) GetZeroState() (*LicenseResponse, error) + func (hc *HTTPClient) HealthForInstance() ([]byte, error) + func (hc *HTTPClient) ListNamespaces() ([]uint64, error) + func (hc *HTTPClient) LoginIntoNamespace(user, password string, ns uint64) error + func (hc *HTTPClient) LoginIntoNamespaceV20(user, password string) error + func (hc *HTTPClient) LoginUsingToken(ns uint64) error + func (hc *HTTPClient) Mutate(mutation string, commitNow bool) ([]byte, error) + func (hc *HTTPClient) PostDqlQuery(query string) ([]byte, error) + func (hc *HTTPClient) PostPersistentQuery(query, sha string) ([]byte, error) + func (hc *HTTPClient) RemovePredicateFromGroup(group, predicate string) error + func (hc *HTTPClient) RemoveUserFromGroup(userName, groupName string) error + func (hc *HTTPClient) ResetPassword(userID, newPass string, nsID uint64) (string, error) + func (hc *HTTPClient) Restore(c Cluster, backupPath string, backupId string, incrFrom, backupNum int) error + func (hc *HTTPClient) RestoreTenant(c Cluster, backupPath string, backupId string, incrFrom, backupNum int, ...) error + func (hc *HTTPClient) RunGraphqlQuery(params GraphQLParams, admin bool) ([]byte, error) + func (hc *HTTPClient) UpdateGQLSchema(sch string) error + func (hc *HTTPClient) UpdateGroup(name string, setRules []AclRule, removeRules []string) (*AclGroup, error) + func (hc *HTTPClient) WaitForSnapshot(group, prevSnapshotTs uint64) (uint64, error) + func (hc *HTTPClient) WaitForTask(taskId string) error + type HttpToken struct + AccessJwt string + Password string + RefreshToken string + UserId string + type LicenseResponse struct + Code string + Data json.RawMessage + Errors x.GqlErrorList + Extensions map[string]interface{} + type SchemaOptions struct + ExcludeAclSchema bool + UserPreds string + UserTypes string v25.1.0-preview1 Dec 4, 2025 Other modules containing this package github.com/dgraph-io/dgraph/v24