...

Source file src/github.com/go-kivik/kivik/v4/pouchdb/doc.go

Documentation: github.com/go-kivik/kivik/v4/pouchdb

     1  // Licensed under the Apache License, Version 2.0 (the "License"); you may not
     2  // use this file except in compliance with the License. You may obtain a copy of
     3  // the License at
     4  //
     5  //  http://www.apache.org/licenses/LICENSE-2.0
     6  //
     7  // Unless required by applicable law or agreed to in writing, software
     8  // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
     9  // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
    10  // License for the specific language governing permissions and limitations under
    11  // the License.
    12  
    13  /*
    14  Package pouchdb provides a [PouchDB] driver for [Kivik]. It must
    15  be compiled with GopherJS, and requires that the PouchDB JavaScript library
    16  is also loaded at runtime.
    17  
    18  # General Usage
    19  
    20  Use the `pouch` driver name when using this driver. The DSN should be the
    21  blank string for local database connections, or a full URL, including any
    22  required credentials, when connecting to a remote database.
    23  
    24  	//go:build js
    25  
    26  	package main
    27  
    28  	import (
    29  		"context"
    30  
    31  		kivik "github.com/go-kivik/kivik/v4"
    32  		_ "github.com/go-kivik/kivik/v4/pouchdb" // PouchDB driver
    33  	)
    34  
    35  	func main() {
    36  		client, err := kivik.New(context.TODO(), "pouch", "")
    37  	// ...
    38  	}
    39  
    40  # Options
    41  
    42  The PouchDB driver generally interprets [github.com/go-kivik/kivik/v4.Params]
    43  keys and values as key/value pairs to pass to the relevant PouchDB method. In
    44  general, PouchDB's key/value pairs are the same as the query parameters used
    45  for CouchDB. Consult the [PouchDB API documentation] for the relevant methods for
    46  any exceptions or special cases.
    47  
    48  [PouchDB]: https://pouchdb.com/
    49  [Kivik]: https://kivik.io/
    50  [PouchDB API documentation]: https://pouchdb.com/api.html
    51  */
    52  package pouchdb
    53  

View as plain text