firestore

package
v1.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package firestore implements the GCP Firestore REST API as a server.Handler. Real cloud.google.com/go/firestore clients constructed via NewRESTClient hit this handler the same way they hit firestore.googleapis.com.

Supported operations (parity with AWS DynamoDB):

POST   /v1/projects/{p}/databases/{db}/documents/{collection}        — create document
POST   /v1/projects/{p}/databases/{db}/documents/{collection}?documentId={id}
GET    /v1/projects/{p}/databases/{db}/documents/{collection}        — list documents
GET    /v1/projects/{p}/databases/{db}/documents/{collection}/{id}   — get document
PATCH  /v1/projects/{p}/databases/{db}/documents/{collection}/{id}   — update document
DELETE /v1/projects/{p}/databases/{db}/documents/{collection}/{id}   — delete document

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler serves Firestore REST API requests against a database driver.

func New

func New(db dbdriver.Database) *Handler

New returns a Firestore handler backed by db.

func (*Handler) Matches

func (*Handler) Matches(r *http.Request) bool

Matches returns true for /v1/projects/.../databases/.../documents paths.

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP routes the request based on URL path shape.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL