oven

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

README

oven

Cloud Firestore wrapper library

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrDataNotFound is thrown when query does not find the requested data
	ErrDataNotFound = errors.New("data not found")
)

Functions

This section is empty.

Types

type Service

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

Service provides object representing the inbound HTTP request.

func New

func New(ctx context.Context, projectID string, opts ...option.ClientOption) *Service

func (*Service) DeleteByID

func (s *Service) DeleteByID(ctx context.Context, col, id string) error

DeleteByID deletes specific record by id.

func (*Service) GetByID

func (s *Service) GetByID(ctx context.Context, col, id string, in interface{}) error

GetByID sets the in parameter to specific store record by id.

func (*Service) GetClient

func (s *Service) GetClient(ctx context.Context) error

GetClient creates

func (*Service) GetCollection

func (s *Service) GetCollection(ctx context.Context, name string) (col *firestore.CollectionRef, err error)

GetCollection returns specific store collection by name.

func (*Service) Save

func (s *Service) Save(ctx context.Context, col, id string, in interface{}) error

Save saves the data to the store.

func (*Service) Update

func (s *Service) Update(ctx context.Context, col, id string, args map[string]interface{}) error

Directories

Path Synopsis
pkg
id

Jump to

Keyboard shortcuts

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