Documentation
¶
Overview ¶
Package arangodb contains an implementation of the `gokv.Store` interface for arangodb.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultOptions = Options{ Endpoints: "http://localhost:8529", DatabaseName: "gokv", CollectionName: "item", Codec: encoding.JSON, InsecureSkipVerify: false, }
DefaultOptions is an Options object with default values. ConnectionString: "localhost", DatabaseName: "gokv", CollectionName: "item", Codec: encoding.JSON
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a gokv.Store implementation for ArangoDB.
func NewClient ¶
NewClient creates a new ArangoDB client.
You must call the Close() method on the client when you're done working with it.
func (Client) Close ¶
Close closes the client. As arangodb connects through http, there is no need to close Persistent connections are made through http2.
func (Client) Delete ¶
Delete deletes the stored value for the given key. Deleting a non-existing key-value pair does NOT lead to an error. The key must not be "".
func (Client) Get ¶
Get retrieves the stored value for the given key. You need to pass a pointer to the value, so in case of a struct the automatic unmarshalling can populate the fields of the object that v points to with the values of the retrieved object's values. If no value is found it returns (false, nil). The key must not be "" and the pointer must not be nil.
type Options ¶
type Options struct { // Seed servers for the initial connection to the ArangoDB server/cluster. // comma separated list, e.g // E.g.: "http://localhost:8529,http://localhost:8530". // Optional ("http://localhost:8529" by default). Endpoints string // Arangodb username // Optional("root" by default) Username string // Arangodb Password // Optional ("" by default) Password string // The name of the database to use. // Optional ("gokv" by default). DatabaseName string // The name of the collection to use. // Optional ("item" by default). CollectionName string // Encoding format. // Optional (encoding.JSON by default). Codec encoding.Codec // Disable ssl verification (insecure) // ssl verification is ENABLED by default. set this to TRUE to DISABLE verification InsecureSkipVerify bool }
Options are the options for the ArangoDB client.