firestore

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const SourceKind string = "firestore"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Firestore configs
	Name     string `yaml:"name" validate:"required"`
	Kind     string `yaml:"kind" validate:"required"`
	Project  string `yaml:"project" validate:"required"`
	Database string `yaml:"database"` // Optional, defaults to "(default)"
}

func (Config) Initialize

func (r Config) Initialize(ctx context.Context, tracer trace.Tracer) (sources.Source, error)

func (Config) SourceConfigKind

func (r Config) SourceConfigKind() string

type Source

type Source struct {
	// Firestore struct with client
	Name        string `yaml:"name"`
	Kind        string `yaml:"kind"`
	Client      *firestore.Client
	RulesClient *firebaserules.Service
	ProjectId   string `yaml:"projectId"`
	DatabaseId  string `yaml:"databaseId"`
}

func (*Source) FirebaseRulesClient

func (s *Source) FirebaseRulesClient() *firebaserules.Service

func (*Source) FirestoreClient

func (s *Source) FirestoreClient() *firestore.Client

func (*Source) GetDatabaseId added in v0.15.0

func (s *Source) GetDatabaseId() string

func (*Source) GetProjectId

func (s *Source) GetProjectId() string

func (*Source) SourceKind

func (s *Source) SourceKind() string

Jump to

Keyboard shortcuts

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