### Define BeginTransactionOptions struct Source: https://pkg.go.dev/github.com/arangodb/go-driver/v2/arangodb Configuration options for starting a transaction in ArangoDB. ```go type BeginTransactionOptions struct { // Set this to true to allow the Coordinator to ask any shard replica for the data, not only the shard leader. // This may result in “dirty reads”. AllowDirtyReads *bool `json:"-"` // Allow reading from undeclared collections. AllowImplicit bool `json:"allowImplicit,omitempty"` // An optional numeric value that can be used to set a timeout in seconds for waiting on collection locks. // This option is only meaningful when using exclusive locks. If not specified, a default value will be used. // Setting lockTimeout to 0 will make ArangoDB not time out waiting for a lock. LockTimeout float64 `json:"lockTimeout,omitempty"` // Transaction size limit in bytes. MaxTransactionSize uint64 `json:"maxTransactionSize,omitempty"` // Whether to disable fast locking for write operations. // // Skipping the fast lock round can be faster overall if there are many concurrent Stream Transactions queued that // all try to lock the same collection exclusively. It avoids deadlocking and retrying which can occur with the fast // locking by guaranteeing a deterministic locking order at the expense of each actual locking operation taking longer. // // Fast locking should not be skipped for read-only Stream Transactions because it degrades performance if there // are no concurrent transactions that use exclusive locks on the same collection. SkipFastLockRound bool `json:"skipFastLockRound,omitempty"` // An optional boolean flag that, if set, will force the transaction to write all data to disk before returning. WaitForSync bool `json:"waitForSync,omitempty"` ``` -------------------------------- ### GET /_db/_system/_admin/support-info Source: https://pkg.go.dev/github.com/arangodb/go-driver/v2/arangodb Retrieves details about the current deployment and server environment. ```APIDOC ## GET /_db/_system/_admin/support-info ### Description Provides details about the current deployment and server environment. ### Method GET ### Endpoint /_db/_system/_admin/support-info ### Response #### Success Response (200) - **deployment** (DeploymentInfo) - Deployment information (single or cluster, with related details) - **host** (ServerInfo) - Host/server details (only present in single-server mode) - **date** (string) - Timestamp when the data was collected ``` -------------------------------- ### Define ClientFoxxService interface Source: https://pkg.go.dev/github.com/arangodb/go-driver/v2/arangodb Defines methods for managing Foxx services, including installation, configuration, and dependency management. ```go type ClientFoxxService interface { // InstallFoxxService installs a new service at a given mount path. InstallFoxxService(ctx context.Context, dbName string, zipFile string, options *FoxxDeploymentOptions) error // UninstallFoxxService uninstalls service at a given mount path. UninstallFoxxService(ctx context.Context, dbName string, options *FoxxDeleteOptions) error // ListInstalledFoxxServices retrieves the list of Foxx services installed in the specified database. // If excludeSystem is true, system services (like _admin/aardvark) will be excluded from the result, // returning only custom-installed Foxx services. ListInstalledFoxxServices(ctx context.Context, dbName string, excludeSystem *bool) ([]FoxxServiceListItem, error) // GetInstalledFoxxService retrieves detailed information about a specific Foxx service // installed in the specified database. // The service is identified by its mount path, which must be provided and non-empty. // If the mount path is missing or empty, a RequiredFieldError is returned. // The returned FoxxServiceObject contains the full metadata and configuration details // for the specified service. GetInstalledFoxxService(ctx context.Context, dbName string, mount *string) (FoxxServiceObject, error) // ReplaceFoxxService removes the service at the given mount path from the database and file system // and installs the given new service at the same mount path. ReplaceFoxxService(ctx context.Context, dbName string, zipFile string, opts *FoxxDeploymentOptions) error // UpgradeFoxxService installs the given new service on top of the service currently installed // at the specified mount path, retaining the existing service’s configuration and dependencies. // This should be used only when upgrading to a newer or equivalent version of the same service. UpgradeFoxxService(ctx context.Context, dbName string, zipFile string, opts *FoxxDeploymentOptions) error // GetFoxxServiceConfiguration retrieves the configuration values for the Foxx service // mounted at the specified path in the given database. // The mount parameter must not be nil or empty. // Returns a map containing the current configuration key-value pairs. GetFoxxServiceConfiguration(ctx context.Context, dbName string, mount *string) (map[string]interface{}, error) // UpdateFoxxServiceConfiguration updates the configuration of a specific Foxx service. // If the Foxx service does not allow a particular configuration key, it will appear // in the response warnings. // The caller is responsible for validating allowed keys before calling this method. UpdateFoxxServiceConfiguration(ctx context.Context, dbName string, mount *string, opt map[string]interface{}) (map[string]interface{}, error) // ReplaceFoxxServiceConfiguration replaces the given Foxx service's dependencies entirely. // If the Foxx service does not allow a particular configuration key, it will appear // in the response warnings. // The caller is responsible for validating allowed keys before calling this method. ReplaceFoxxServiceConfiguration(ctx context.Context, dbName string, mount *string, opt map[string]interface{}) (map[string]interface{}, error) // GetFoxxServiceDependencies retrieves the configured dependencies for a specific Foxx service. // Returns: // A map where each key is a dependency name and the value is an object containing: // * title: Human-readable title of the dependency // * mount: Current mount path of the dependency service (if set) // An error if the request fails or the mount is missing. GetFoxxServiceDependencies(ctx context.Context, dbName string, mount *string) (map[string]interface{}, error) // UpdateFoxxServiceDependencies updates the configured dependencies of a specific Foxx service. // If the Foxx service does not allow a particular dependency key, it will appear // in the "warnings" field of the response. // The caller is responsible for ensuring that only allowed dependency keys are provided. UpdateFoxxServiceDependencies(ctx context.Context, dbName string, mount *string, opt map[string]interface{}) (map[string]interface{}, error) // ReplaceFoxxServiceDependencies replaces the given Foxx service's dependencies entirely. } ``` -------------------------------- ### Define Foxx Service Objects Source: https://pkg.go.dev/github.com/arangodb/go-driver/v2/arangodb Structures representing installed Foxx services and their metadata. ```go type FoxxServiceListItem struct { CommonFoxxServiceFields // Provides lists the capabilities or interfaces the service provides. // This is a flexible map that may contain metadata like API contracts or service roles. Provides map[string]interface{} `json:"provides"` } ``` ```go type FoxxServiceObject struct { // Common fields for all Foxx services. CommonFoxxServiceFields // Path is the local filesystem path where the service is installed. Path *string `json:"path,omitempty"` // Manifest contains the normalized manifest.json of the service. Manifest *Manifest `json:"manifest,omitempty"` // Options contains optional runtime options defined for the service. Options map[string]interface{} `json:"options,omitempty"` } ``` -------------------------------- ### Initialize New Client Source: https://pkg.go.dev/github.com/arangodb/go-driver/v2/arangodb Creates a new client instance using the provided connection. ```go func NewClient(connection connection.Connection) Client ``` -------------------------------- ### Deployment and Service Structures Source: https://pkg.go.dev/github.com/arangodb/go-driver/v2/arangodb Structures for Foxx service deployment and deployment identification. ```go type DeployFoxxServiceRequest struct { FoxxDeploymentOptions `json:",inline"` } ``` ```go type DeploymentIdResponse struct { // Id represents the unique deployment identifier Id *string `json:"id"` } ``` ```go type DeploymentInfo struct { // Type of deployment ("single" or "cluster") Type *string `json:"type,omitempty"` ``` -------------------------------- ### Define LogSettingsOptions struct Source: https://pkg.go.dev/github.com/arangodb/go-driver/v2/arangodb Configuration options for log settings. ```go type LogSettingsOptions struct { // Database indicates whether the database name should be included ``` -------------------------------- ### QueryPlanCacheRespObject Structure Source: https://pkg.go.dev/github.com/arangodb/go-driver/v2/arangodb Represents a single entry from the GET _api/query-plan-cache endpoint. ```go type QueryPlanCacheRespObject struct { CacheRespObject `json:",inline"` // QueryHash is the hash of the AQL query string. QueryHash *uint64 `json:"queryHash,omitempty"` // FullCount indicates whether the query result contains the full count of documents. FullCount *bool `json:"fullCount,omitempty"` // Created is the time when the query plan has been added to the cache. Created *string `json:"created,omitempty"` // MemoryUsage is the memory usage of the cached plan in bytes. // This is the amount of memory used by the cached plan on the server. MemoryUsage *uint64 `json:"memoryUsage,omitempty"` } ``` -------------------------------- ### Get response error number Source: https://pkg.go.dev/github.com/arangodb/go-driver/v2/arangodb/shared Retrieves the ArangoDB-specific error number. ```go func (r Response) GetErrorNum() int ``` -------------------------------- ### HTTP and HTTP2 Connection Initialization Source: https://pkg.go.dev/github.com/arangodb/go-driver/v2/connection Functions to initialize HTTP and HTTP2 connections. Note that VST should be disabled when using NewHttp2Connection to prevent performance issues. ```go func NewHttp2Connection(config Http2Configuration) Connection ``` ```go func NewHttpConnection(config HttpConfiguration) Connection ``` -------------------------------- ### GET _api/query-plan-cache Source: https://pkg.go.dev/github.com/arangodb/go-driver/v2/arangodb Retrieves the list of cached query plans from the ArangoDB server. ```APIDOC ## GET _api/query-plan-cache ### Description Retrieves the current query plan cache entries from the ArangoDB server. ### Method GET ### Endpoint _api/query-plan-cache ### Response #### Success Response (200) - **queryHash** (uint64) - The hash of the AQL query string. - **fullCount** (bool) - Indicates whether the query result contains the full count of documents. - **created** (string) - The time when the query plan was added to the cache. - **memoryUsage** (uint64) - The memory usage of the cached plan in bytes. ``` -------------------------------- ### Initialize Requests Source: https://pkg.go.dev/github.com/arangodb/go-driver/v2/arangodb Constructor function for creating a new Requests instance. ```go func NewRequests(connection connection.Connection, urlParts ...string) Requests ``` -------------------------------- ### Define ExplainQueryOptimizerOptions Source: https://pkg.go.dev/github.com/arangodb/go-driver/v2/arangodb Configures optimizer rules for query explanation. Prefix rule names with '+' to enable or '-' to disable. ```go type ExplainQueryOptimizerOptions struct { // A list of to-be-included or to-be-excluded optimizer rules can be put into this attribute, // telling the optimizer to include or exclude specific rules. // To disable a rule, prefix its name with a "-", to enable a rule, prefix it with a "+". // There is also a pseudo-rule "all", which matches all optimizer rules. "-all" disables all rules. Rules []string `json:"rules,omitempty"` } ``` -------------------------------- ### Get response error message Source: https://pkg.go.dev/github.com/arangodb/go-driver/v2/arangodb/shared Retrieves the error message string from the response. ```go func (r Response) GetErrorMessage() string ``` -------------------------------- ### Get response status code Source: https://pkg.go.dev/github.com/arangodb/go-driver/v2/arangodb/shared Retrieves the HTTP status code from the response. ```go func (r Response) GetCode() int ``` -------------------------------- ### Initialize CreateCollectionPropertiesV2 Source: https://pkg.go.dev/github.com/arangodb/go-driver/v2/arangodb Translates deprecated fields into current ones for backward compatibility. ```go func (c *CreateCollectionPropertiesV2) Init() ``` -------------------------------- ### Get Ascending Property Source: https://pkg.go.dev/github.com/arangodb/go-driver/v2/arangodb Retrieves the Ascending boolean value, defaulting to false if unset. ```go func (pse ArangoSearchPrimarySortEntry) GetAscending() bool ``` -------------------------------- ### GetVersionOptions Structure Source: https://pkg.go.dev/github.com/arangodb/go-driver/v2/arangodb Options for retrieving database version information. ```go type GetVersionOptions struct { // If true, additional details will be returned in response // Default false Details *bool } ``` -------------------------------- ### KeyOpts Structure Source: https://pkg.go.dev/github.com/arangodb/go-driver/v2/arangodb Represents options for document key generation. ```go type KeyOpts struct { // Whether user-supplied keys are allowed AllowUserKeys *bool `json:"allowUserKeys,omitempty"` // Key type (autoincrement, traditional, etc.) Type *string `json:"type,omitempty"` // Internal offset for autoincrement/padded key generators. // This is read-only server metadata used for dump/restore workflows. LastValue *int `json:"lastValue,omitempty"` } ``` -------------------------------- ### Foxx Service Management Source: https://pkg.go.dev/github.com/arangodb/go-driver/v2/arangodb Methods for managing Foxx services, including installation, uninstallation, configuration updates, and dependency management. ```APIDOC ## Foxx Service Operations ### InstallFoxxService(ctx context.Context, dbName string, zipFile string, options *FoxxDeploymentOptions) error Installs a new service at a given mount path. ### UninstallFoxxService(ctx context.Context, dbName string, options *FoxxDeleteOptions) error Uninstalls a service at a given mount path. ### ListInstalledFoxxServices(ctx context.Context, dbName string, excludeSystem *bool) ([]FoxxServiceListItem, error) Retrieves the list of Foxx services installed in the specified database. ### GetInstalledFoxxService(ctx context.Context, dbName string, mount *string) (FoxxServiceObject, error) Retrieves detailed information about a specific Foxx service installed in the specified database. ### ReplaceFoxxService(ctx context.Context, dbName string, zipFile string, opts *FoxxDeploymentOptions) error Removes the service at the given mount path and installs a new service at the same path. ### UpgradeFoxxService(ctx context.Context, dbName string, zipFile string, opts *FoxxDeploymentOptions) error Installs a new service on top of the existing service at the specified mount path, retaining configuration and dependencies. ### GetFoxxServiceConfiguration(ctx context.Context, dbName string, mount *string) (map[string]interface{}, error) Retrieves the configuration values for the Foxx service mounted at the specified path. ### UpdateFoxxServiceConfiguration(ctx context.Context, dbName string, mount *string, opt map[string]interface{}) (map[string]interface{}, error) Updates the configuration of a specific Foxx service. ### ReplaceFoxxServiceConfiguration(ctx context.Context, dbName string, mount *string, opt map[string]interface{}) (map[string]interface{}, error) Replaces the given Foxx service's configuration entirely. ### GetFoxxServiceDependencies(ctx context.Context, dbName string, mount *string) (map[string]interface{}, error) Retrieves the configured dependencies for a specific Foxx service. ### UpdateFoxxServiceDependencies(ctx context.Context, dbName string, mount *string, opt map[string]interface{}) (map[string]interface{}, error) Updates the configured dependencies of a specific Foxx service. ``` -------------------------------- ### User Options Source: https://pkg.go.dev/github.com/arangodb/go-driver/v2/arangodb Configuration options for creating or updating users. ```go type UserOptions struct { // The user password as a string. If not specified, it will default to an empty string. Password string `json:"passwd,omitempty"` // An optional flag that specifies whether the user is active. If not specified, this will default to true. Active *bool `json:"active,omitempty"` // A JSON object with extra user information. // The data contained in extra will be stored for the user but not be interpreted further by ArangoDB. Extra interface{} `json:"extra,omitempty"` } ``` -------------------------------- ### Define BackupCreateOptions Source: https://pkg.go.dev/github.com/arangodb/go-driver/v2/arangodb Configuration options for creating database backups, including timeout and consistency settings. ```go type BackupCreateOptions struct { // The label for this backup. // The label is used together with a timestamp string create a unique backup identifier, _