Documentation ¶
Index ¶
- Constants
- type Config
- type GetID
- type MakeNew
- type Store
- func (s *Store) Delete(ctx context.Context, col, id string) error
- func (s *Store) Get(ctx context.Context, col, id string, in interface{}) error
- func (s *Store) GetAll(ctx context.Context, col string, maker MakeNew) ([]interface{}, error)
- func (s *Store) GetClient() *firestore.Client
- func (s *Store) GetCollection(name string) (col *firestore.CollectionRef, err error)
- func (s *Store) Save(ctx context.Context, col, id string, in interface{}) error
- func (s *Store) SaveAll(ctx context.Context, col string, g GetID, items []interface{}) error
Constants ¶
View Source
const (
// ErrDataNotFound when there query found no data
ErrDataNotFound = "data not found"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // ProjectID is the ID of the project. ProjectID string `json:"project_id"` }
Config represens store configuration.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store represents the generic FB store
func (*Store) GetCollection ¶
func (s *Store) GetCollection(name string) (col *firestore.CollectionRef, err error)
GetCollection gives external packages access to the specific Firestore collection by name.
Click to show internal directories.
Click to hide internal directories.