firestore

package
v0.0.0-...-f856e3e Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCategoryModel

func NewCategoryModel(c *fst.Client) model.CategoryModel

NewCategoryModel initializes Firestore implementation of model.CategoryModel.

func NewFeedModel

func NewFeedModel(c *fst.Client) model.FeedModel

NewFeedModel initializes Firestore implementation of model.FeedModel.

func NewSubscriberModel

func NewSubscriberModel(c *fst.Client, updateModel model.UpdateModel) model.SubscriberModel

NewSubscriberModel initializes Firestore implementation of model.SubscriberModel.

func NewSubscriptionModel

func NewSubscriptionModel(
	c *fst.Client,
	categoryModel model.CategoryModel,
	subscriberModel model.SubscriberModel,
	updateModel model.UpdateModel,
) model.SubscriptionModel

NewSubscriptionModel initializes Firestore implementation of model.SubscriptionModel.

func NewUpdateModel

func NewUpdateModel(c *firestore.Client) model.UpdateModel

NewUpdateModel initializes Firestore implementation of model.UpdateModel.

Types

type FeedModel

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

FeedModel is a Firestore implementation of model.FeedModel.

func (FeedModel) Create

func (m FeedModel) Create(ctx context.Context, f *model.Feed) (string, error)

func (FeedModel) Delete

func (m FeedModel) Delete(ctx context.Context, f *model.Feed) error

func (FeedModel) Get

func (m FeedModel) Get(ctx context.Context, cat *model.Category, id string) (*model.Feed, error)

func (FeedModel) GetAll

func (m FeedModel) GetAll(ctx context.Context, cat *model.Category) ([]model.Feed, error)

func (FeedModel) SetUpdated

func (m FeedModel) SetUpdated(ctx context.Context, f *model.Feed, u time.Time) error

Jump to

Keyboard shortcuts

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