# README
ArangoDB GO Driver
This project contains the official Go driver for the ArangoDB database.
Supported Go Versions
Go 1.13 | Go 1.14 | |
---|---|---|
1.0.0 | ✓ | ✓ |
1.1.0 | ✓ | ✓ |
master | ✓ | ✓ |
Supported Versions
< ArangoDB 3.6 | ArangoDB 3.6 | ArangoDB 3.7 | |
---|---|---|---|
1.0.0 | ✓ | ✓ | - |
1.1.0 | + | + | ✓ |
master | + | + | + |
Key:
✓
Exactly the same features in both driver and the ArangoDB version.+
Features included in driver may be not present in the ArangoDB API. Calls to the ArangoDB may results in unexpected responses (404).-
The ArangoDB has features which are not supported by driver.
# Packages
Package agency provides an API to access the ArangoDB agency (it is unlikely that you need this package directly).
Package cluster implements a driver.Connection that provides cluster failover support (it is not intended to be used directly).
Package http implements driver.Connection using an HTTP connection.
Package jwt provides a helper function used to access ArangoDB
servers using a JWT secret.
Package test implements add tests for the go-driver.
Package util provides some helper methods for the go-driver (it is unlikely that you need this package directly).
Package vst implements driver.Connection using a VelocyStream connection.
# Functions
AsArangoError returns true when the given error is an ArangoError together with an object.
BasicAuthentication creates an authentication implementation based on the given username & password.
IsArangoError returns true when the given error is an ArangoError.
IsArangoErrorWithCode returns true when the given error is an ArangoError and its Code field is equal to the given code.
IsArangoErrorWithErrorNum returns true when the given error is an ArangoError and its ErrorNum field is equal to one of the given numbers.
IsCanceled returns true if the given error is the result on a cancelled context.
IsConflict returns true if the given error is an ArangoError with code 409, indicating a conflict.
IsForbidden returns true if the given error is an ArangoError with code 403, indicating a forbidden request.
IsInvalidArgument returns true if the given error is an InvalidArgumentError.
IsInvalidRequest returns true if the given error is an ArangoError with code 400, indicating an invalid request.
IsNoLeader returns true if the given error is an ArangoError with code 503 error number 1496.
IsNoLeaderOrOngoing return true if the given error is an ArangoError with code 503 and error number 1496 or 1495.
IsNoMoreDocuments returns true if the given error is an NoMoreDocumentsError.
IsNotFound returns true if the given error is an ArangoError with code 404, indicating a object not found.
IsPreconditionFailed returns true if the given error is an ArangoError with code 412, indicating a failed precondition.
IsResponse returns true if the given error is (or is caused by) a ResponseError.
IsTimeout returns true if the given error is the result on a deadline that has been exceeded.
IsUnauthorized returns true if the given error is an ArangoError with code 401, indicating an unauthorized request.
JWTAuthentication creates a JWT token authentication implementation based on the given username & password.
NewClient creates a new Client based on the given config setting.
NewDocumentID creates a new document ID from the given collection, key pair.
RawAuthentication creates a raw authentication implementation based on the given value for the Authorization header.
WithAllowDirtyReads is used in an active failover deployment to allow reads from the follower.
WithBatchID is used to configure a context that includes an ID of a Batch.
WithConfigured is used to configure a context to return the configured value of a user grant instead of the effective grant.
WithDBServerID is used to configure a context that includes an ID of a specific DBServer.
WithDetails is used to configure a context to make Client.Version return additional details.
WithEndpoint is used to configure a context that forces a request to be executed on a specific endpoint.
WithEnforceReplicationFactor is used to configure a context to make adding collections fail if the replication factor is too high (default or true) or silently accept (false).
WithFollowLeaderRedirect is used to configure a context to return turn on/off following redirection responses from the server when the request is answered by a follower.
WithIgnoreRevisions is used to configure a context to make modification functions ignore revisions in the update.
WithImportDetails is used to configure a context that will make import document requests return details about documents that could not be imported.
WithIsRestore is used to configure a context to make insert functions use the "isRestore=<value>" setting.
WithIsSystem is used to configure a context to make insert functions use the "isSystem=<value>" setting.
WithJobIDResponse is used to configure a context that includes a reference to a JobID that is filled on a error-free response.
WithKeepNull is used to configure a context to make update functions keep null fields (value==true) or remove fields with null values (value==false).
WithMergeObjects is used to configure a context to make update functions merge objects present in both the existing document and the patch document (value==true) or overwrite objects in the existing document with objects found in the patch document (value==false).
WithOverwrite is used to configure a context to instruct if a document should be overwritten.
WithOverwriteMode is used to configure a context to instruct how a document should be overwritten.
WithQueryBatchSize is used to configure a context that will set the BatchSize of a query request,.
WithQueryCache is used to configure a context that will set the Cache of a query request, If value is not given it defaults to true.
WithQueryCount is used to configure a context that will set the Count of a query request, If value is not given it defaults to true.
WithQueryFullCount is used to configure whether the query returns the full count of results before the last LIMIT statement.
No description provided by the author
WithQueryMemoryLimit is used to configure a context that will set the MemoryList of a query request,.
WithQueryProfile is used to configure whether Query should be profiled.
WithQuerySatelliteSyncWait sets the satelliteSyncWait query value on the query cursor request.
WithQueryStream is used to configure whether this becomes a stream query.
WithQueryTTL is used to configure a context that will set the TTL of a query request,.
WithRawResponse is used to configure a context that will make all functions store the raw response into a buffer.
WithResponse is used to configure a context that will make all functions store the response into the given value.
WithReturnNew is used to configure a context to make create, update & replace document functions return the new document into the given result.
WithReturnOld is used to configure a context to make update & replace document functions return the old document into the given result.
WithRevision is used to configure a context to make document functions specify an explicit revision of the document using an `If-Match` condition.
WithRevisions is used to configure a context to make multi-document functions specify explicit revisions of the documents.
WithSilent is used to configure a context to make functions return an empty result (silent==true), instead of a metadata result (silent==false, default).
WithTransactionID is used to bind a request to a specific transaction.
WithWaitForSync is used to configure a context to make modification functions wait until the data has been synced to disk (or not).
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
ArangoSearchAnalyzerFeatureFrequency how often a term is seen, required for PHRASE().
ArangoSearchAnalyzerFeatureNorm the field normalization factor.
ArangoSearchAnalyzerFeaturePosition sequentially increasing term position, required for PHRASE().
ArangoSearchAnalyzerGeoJSONTypeCentroid define compute and only index the centroid of the input geometry.
ArangoSearchAnalyzerGeoJSONTypePoint define only index GeoJSON objects of type Point, ignore all other geometry types.
ArangoSearchAnalyzerGeoJSONTypeShape define index all GeoJSON geometry types (Point, Polygon etc.).
ArangoSearchAnalyzerTypeAQL an Analyzer capable of running a restricted AQL query to perform data manipulation / filtering.
ArangoSearchAnalyzerTypeDelimiter split into tokens at user-defined character.
ArangoSearchAnalyzerTypeGeoJSON an Analyzer capable of breaking up a GeoJSON object into a set of indexable tokens for further usage with ArangoSearch Geo functions.
ArangoSearchAnalyzerTypeGeoPoint an Analyzer capable of breaking up JSON object describing a coordinate into a set of indexable tokens for further usage with ArangoSearch Geo functions.
ArangoSearchAnalyzerTypeIdentity treat value as atom (no transformation).
ArangoSearchAnalyzerTypeNGram create n-grams from value with user-defined lengths.
ArangoSearchAnalyzerTypeNorm apply normalization to the value as a whole.
ArangoSearchAnalyzerTypePipeline an Analyzer capable of chaining effects of multiple Analyzers into one.
ArangoSearchAnalyzerTypeStem apply stemming to the value as a whole.
ArangoSearchAnalyzerTypeStopwords an Analyzer capable of removing specified tokens from the input.
ArangoSearchAnalyzerTypeText tokenize into words, optionally with stemming, normalization and stop-word filtering.
ArangoSearchCaseLower to convert to all upper-case characters.
ArangoSearchCaseNone to not change character case (default).
ArangoSearchCaseUpper to convert to all lower-case characters.
ArangoSearchConsolidationPolicyTypeBytesAccum consolidate if and only if ({threshold} range [0.0, 1.0]) {threshold} > (segment_bytes + sum_of_merge_candidate_segment_bytes) / all_segment_bytes, i.e.
ArangoSearchConsolidationPolicyTypeTier consolidate based on segment byte size and live document count as dictated by the customization attributes.
ArangoSearchNGramStreamBinary used by NGram.
ArangoSearchNGramStreamUTF8 used by NGram.
ArangoSearchSortDirectionAsc sort ascending.
ArangoSearchSortDirectionDesc sort descending.
ArangoSearchStoreValuesID specifies that a view should only store information about value presence, to allow use of the EXISTS() function.
ArangoSearchStoreValuesNone specifies that a view should not store values.
AuthenticationTypeBasic uses username+password basic authentication.
AuthenticationTypeJWT uses username+password JWT token based authentication.
AuthenticationTypeRaw uses a raw value for the Authorization header.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
CollectionTypeDocument specifies a document collection.
CollectionTypeEdge specifies an edges collection.
ContentTypeJSON encodes data as json.
ContentTypeVelocypack encodes data as Velocypack.
No description provided by the author
No description provided by the author
Symbolic constants for index types.
No description provided by the author
No description provided by the author
General ArangoDB storage errors.
No description provided by the author
No description provided by the author
Internal ArangoDB storage errors.
No description provided by the author
ArangoDB cluster errors.
No description provided by the author
No description provided by the author
No description provided by the author
HTTP error status codes.
No description provided by the author
general errors.
User management errors.
Symbolic constants for index types.
Symbolic constants for index types.
GrantNone indicates no access to an object.
GrantReadOnly indicates read-only access to an object.
GrantReadWrite indicates read/write access to an object.
Symbolic constants for index types.
ImportOnDuplicateError will not import the current document because of the unique key constraint violation.
ImportOnDuplicateIgnore will not update an existing document and simply ignore the error caused by a unique key constraint violation.
ImportOnDuplicateReplace will replace an existing document in the database with the data specified in the request.
ImportOnDuplicateUpdate will update an existing document in the database with the data specified in the request.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Symbolic constants for index types.
Symbolic constants for index types.
No description provided by the author
No description provided by the author
No description provided by the author
ReplicationFactorSatellite represents a satellite collection's replication factor.
No description provided by the author
ServerModeDefault is the normal mode of the database in which read and write requests are allowed.
ServerModeReadOnly is the mode in which all modifications to th database are blocked.
ServerRoleAgent indicates that the server is an agent within a cluster.
ServerRoleCoordinator indicates that the server is a coordinator within a cluster.
ServerRoleDBServer indicates that the server is a dbserver within a cluster.
ServerRoleSingle indicates that the server is a single-server instance.
ServerRoleSingleActive indicates that the server is a the leader of a single-server resilient pair.
ServerRoleSinglePassive indicates that the server is a a follower of a single-server resilient pair.
ServerRoleUndefined indicates that the role of the server cannot be determined.
ServerStatusBad indicates server has missed 1 heartbeat.
ServerStatusFailed indicates server has been declared failed by the supervision, this happens after about 15s being bad.
ServerStatusGood indicates server is in good state.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Symbolic constants for index types.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Symbolic constants for index types.
ViewTypeArangoSearch specifies an ArangoSearch view type.
# Variables
Cause is used to get the root cause of the given error.
ErrBatchClosed occurs when there is an attempt closing or prolonging closed batch.
WithStack is called on every return of an error to add stacktrace information to the error.
# Structs
AbortTransactionOptions provides options for CommitTransaction.
ArangoError is a Go error with arangodb specific error information.
ArangoSearchAnalyzerDefinition provides definition of an analyzer.
ArangoSearchAnalyzerGeoOptions for fine-tuning geo queries.
ArangoSearchAnalyzerPipeline provides object definition for Pipeline array parameter.
ArangoSearchAnalyzerProperties specifies options for the analyzer.
ArangoSearchConsolidationPolicy holds threshold values specifying when to consolidate view data.
ArangoSearchConsolidationPolicyBytesAccum contains fields used for ArangoSearchConsolidationPolicyTypeBytesAccum.
ArangoSearchConsolidationPolicyTier contains fields used for ArangoSearchConsolidationPolicyTypeTier.
ArangoSearchEdgeNGram specifies options for the edgeNGram text analyzer.
ArangoSearchElementProperties contains properties that specify how an element is indexed in an ArangoSearch view.
ArangoSearchPrimarySortEntry describes an entry for the primarySort list.
ArangoSearchViewProperties contains properties an an ArangoSearch view.
BackupCreateOptions provides options for Create.
BackupCreateResponse contains information about a newly created backup.
BackupListOptions provides options for List.
BackupMeta provides meta data of a backup.
BackupMetaSha256 backup sha details.
BackupRestoreOptions provides options for Restore.
BackupTransferProgressReport provides progress information for a backup transfer job.
BackupTransferReport provides progress information of a backup transfer job for a single dbserver.
BeginTransactionOptions provides options for BeginTransaction call.
ClientConfig contains all settings needed to create a client.
No description provided by the author
ClusterHealth contains health information for all servers in a cluster.
CollectionInfo contains information about a collection.
CollectionKeyOptions specifies ways for creating keys of a collection.
CollectionProperties contains extended information about a collection.
No description provided by the author
CollectionStatistics contains the number of documents and additional statistical information about a collection.
CommitTransactionOptions provides options for CommitTransaction.
CreateCollectionOptions contains options that customize the creating of a collection.
CreateDatabaseDefaultOptions contains options that change defaults for collections.
CreateDatabaseOptions contains options that customize the creating of a database.
CreateDatabaseUserOptions contains options for creating a single user for a database.
CreateGraphOptions contains options that customize the creating of a graph.
DatabaseInfo contains information about a database.
DatabaseInventory describes a detailed state of the collections & shards of a specific database within a cluster.
DocumentMeta contains all meta data used to identifier a document.
EdgeDefinition contains all information needed to define a single edge in a graph.
EdgeDocument is a minimal document for use in edge collection.
EngineInfo contains information about the database engine being used.
EnsureFullTextIndexOptions contains specific options for creating a full text index.
EnsureGeoIndexOptions contains specific options for creating a geo index.
EnsureHashIndexOptions contains specific options for creating a hash index.
EnsurePersistentIndexOptions contains specific options for creating a persistent index.
EnsureSkipListIndexOptions contains specific options for creating a skip-list index.
EnsureTTLIndexOptions provides specific options for creating a TTL index.
No description provided by the author
No description provided by the author
HTTPStats contains statistics about the HTTP traffic.
ImportDocumentOptions holds optional options that control the import document process.
ImportDocumentStatistics holds statistics of an import action.
InvalidArgumentError is returned when a go function argument is invalid.
InventoryCollection is a single element of a DatabaseInventory, containing all information of a specific collection.
InventoryCollectionParameters contains all configuration parameters of a collection in a database inventory.
InventoryIndex contains all configuration parameters of a single index of a collection in a database inventory.
InventoryView is a single element of a DatabaseInventory, containing all information of a specific view.
MemoryStats contains statistics about memory usage.
NoMoreDocumentsError is returned by Cursor's, when an attempt is made to read documents when there are no more.
NumberOfServersResponse holds the data returned from a NumberOfServer request.
A ResponseError is returned when a request was completely written to a server, but the server did not respond, or some kind of network error occurred during the response.
No description provided by the author
RevisionTree is a list of Revisions in a Merkle tree.
RevisionTreeNode is a leaf in Merkle tree with hashed Revisions and with count of documents in the leaf.
ServerHealth contains health information of a single server in a cluster.
No description provided by the author
No description provided by the author
ServerStatistics contains statistical data about the server as a whole.
ServerStats contains statistics about the server.
SetCollectionPropertiesOptions contains data for Collection.SetProperties.
Stats is used for various time-related statistics.
SystemStats contains statistical data about the system, this is part of ServerStatistics.
ThreadsStats contains statistics about threads.
TransactionCollections is used to specify which collecitions are accessed by a transaction and how.
TransactionOptions contains options that customize the transaction.
TransactionStats contains statistics about transactions.
TransactionStatusRecord provides insight about the status of transaction.
UserOptions contains options for creating a new user, updating or replacing a user.
V8ContextStats contains statistics about V8 contexts.
VersionInfo describes the version of a database server.
VertexConstraints limit the vertex collection you can use in an edge.
# Interfaces
AccessTarget is implemented by Database & Collection and it used to get/set/remove collection permissions.
No description provided by the author
ArangoSearchView provides access to the information of a view.
Authentication implements a kind of authentication.
Batch represents state on the server used during certain replication operations to keep state required by the client (such as Write-Ahead Log, inventory and data-files).
No description provided by the author
Client provides access to a single ArangoDB database server, or an entire cluster of ArangoDB servers.
ClientAdminBackup provides access to the Backup API via the Client interface.
ClientBackup provides access to server/cluster backup functions of an arangodb database server or an entire cluster of arangodb servers.
ClientCluster provides methods needed to access cluster functionality from a client.
ClientDatabases provides access to the databases in a single arangodb database server, or an entire cluster of arangodb servers.
No description provided by the author
ClientReplication provides methods needed to access replication functionality from a client.
ClientServerAdmin provides access to server administrations functions of an arangodb database server or an entire cluster of arangodb servers.
ClientServerInfo provides access to information about a single ArangoDB server.
ClientUsers provides access to the users in a single arangodb database server, or an entire cluster of arangodb servers.
Cluster provides access to cluster wide specific operations.
Collection provides access to the information of a single collection, all its documents and all its indexes.
CollectionDocuments provides access to the documents in a single collection.
CollectionIndexes provides access to the indexes in a single collection.
Connection is a connenction to a database server using a specific protocol.
Cursor is returned from a query, used to iterate over a list of documents.
Database provides access to all collections & graphs in a single database.
No description provided by the author
DatabaseCollections provides access to all collections in a single database.
DatabaseGraphs provides access to all graphs in a single database.
DatabaseStreamingTransactions provides access to the Streaming Transactions API.
DatabaseViews provides access to all views in a single database.
No description provided by the author
Graph provides access to all edge & vertex collections of a single graph in a database.
GraphEdgeCollections provides access to all edge collections of a single graph in a database.
GraphVertexCollections provides access to all vertex collections of a single graph in a database.
Index provides access to a single index in a single collection.
QueryExtra holds Query extra information.
Statistics returned with the query cursor.
Replication provides access to replication related operations.
Request represents the input to a request on the server.
Response represents the response from the server on a given request.
User provides access to a single user of a single server / cluster of servers.
View provides access to the information of a view.
# Type aliases
No description provided by the author
ArangoSearchAnalyzerFeature specifies a feature to an analyzer.
ArangoSearchAnalyzerGeoJSONType GeoJSON Type parameter.
ArangoSearchAnalyzerType specifies type of an analyzer.
No description provided by the author
ArangoSearchConsolidationPolicyType strings for consolidation types.
ArangoSearchFields is a strongly typed map containing properties per field.
ArangoSearchLinks is a strongly typed map containing links between a collection and a view.
No description provided by the author
ArangoSearchSortDirection describes the sorting direction.
ArangoSearchStoreValues is the type of the StoreValues option of an ArangoSearch element.
No description provided by the author
BackupID identifies a backup.
BackupTransferJobID represents a Transfer (upload/download) job.
BackupTransferStatus represents all possible states a transfer job can be in.
No description provided by the author
CollectionStatus indicates the status of a collection.
CollectionType is the type of a collection.
ContentType identifies the type of encoding to use for the data.
ContextKey is an internal type used for holding values in a `context.Context` do not use!.
No description provided by the author
DocumentID references a document in a collection.
DocumentMetaSlice is a slice of DocumentMeta elements.
EngineType indicates type of database engine being used.
ErrorSlice is a slice of errors.
Grant specifies access rights for an object.
ImportOnDuplicate is a type to control what action is carried out in case of a unique key constraint violation.
IndexType represents a index type as string.
KeyGeneratorType is a type of key generated, used in `CollectionKeyOptions`.
No description provided by the author
No description provided by the author
ProtocolSet is a set of protocols.
RawObject is a raw encoded object.
RevisionMinMax is an array of two Revisions which create range of them.
Revisions is a slice of Revisions.
RevisionUInt64 is representation of '_rev' string value as an uint64 number.
ServerID identifies an arangod server in a cluster.
No description provided by the author
ServerRole is the role of an arangod server.
ServerStatus describes the health status of a server.
ServerSyncStatus describes the servers sync status.
ShardID is an internal identifier of a specific shard.
ShardingStrategy describes the sharding strategy of a collection.
Tick is represent a place in either the Write-Ahead Log, journals and datafiles value reported by the server.
TransactionID identifies a transaction.
TransactionStatus describes the status of an transaction.
Version holds a server version string.
ViewType is the type of a view.