storeutils

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssociateSharetagByNames

func AssociateSharetagByNames(ctx context.Context, sharetags *store.Sharetags, tags *store.Tags, userID, shareID string, kind model.SharetagKind, tagNames []string) (model.SharetagList, error)

func CleanupShare

func CleanupShare(ctx context.Context, sharetags *store.Sharetags, sharepins *store.Sharepins, pinls *store.Pinls, taggables *store.Taggables, shareID string, deletePinl bool) error

func DeleteTag

func DeleteTag(ctx context.Context, tags *store.Tags, taggables *store.Taggables, data *model.Tag) (int64, error)

func FindOrCreateMonl

func FindOrCreateMonl(ctx context.Context, monls *store.Monls, rawurl string) (*model.Monl, bool, error)

func GetPinl added in v0.4.1

func GetPinl(ctx context.Context, pinls *store.Pinls, monpkgs *store.Monpkgs, pinpkgs *store.Pinpkgs, taggables *store.Taggables, pinlID string) (*model.Pinl, error)

func GetPkgs added in v0.4.1

func GetPkgs(ctx context.Context, monpkgs *store.Monpkgs, pinpkgs *store.Pinpkgs, pList model.PinlList) (map[string]model.PkgList, error)

func GetTags

func GetTags(ctx context.Context, taggables *store.Taggables, targets model.MorphableList) (map[string]model.TagList, error)

func ListPinls added in v0.4.1

func ListPinls(ctx context.Context, pinls *store.Pinls, monpkgs *store.Monpkgs, pinpkgs *store.Pinpkgs, taggables *store.Taggables, opts *store.PinlOpts) (model.PinlList, error)

func ListPinlsWithLatestStats

func ListPinlsWithLatestStats(ctx context.Context, pinls *store.Pinls, monpkgs *store.Monpkgs, stats *store.Stats, taggables *store.Taggables, opts *store.PinlOpts) (model.PinlList, error)

func ListStatTree

func ListStatTree(ctx context.Context, stats *store.Stats, rootStats []*model.Stat) (model.StatList, error)

func LoadPkgsLatestStats added in v0.4.1

func LoadPkgsLatestStats(ctx context.Context, stats *store.Stats, pkgs model.PkgList) error

func PinlWithLatestStats

func PinlWithLatestStats(ctx context.Context, pinls *store.Pinls, monpkgs *store.Monpkgs, stats *store.Stats, taggables *store.Taggables, pinlID string) (*model.Pinl, error)

func ReAssociateTags

func ReAssociateTags(ctx context.Context, tags *store.Tags, taggables *store.Taggables, target model.Morphable, userID string, tagNames []string) (model.TagList, error)

func SaveImage

func SaveImage(ctx context.Context, images *store.Images, content []byte, target model.Morphable, replace bool) (*model.Image, error)

func SavePinl

func SavePinl(ctx context.Context, pinls *store.Pinls, images *store.Images, data *model.Pinl, withCard bool) (*model.Pinl, *model.Image, error)

func SaveProviderReport

func SaveProviderReport(
	ctx context.Context,
	pkgs *store.Pkgs,
	stats *store.Stats,
	report provider.Report,
	force bool,
) (*model.Pkg, model.StatList, error)

func SaveSharetag

func SaveSharetag(ctx context.Context, sharetags *store.Sharetags, tags *store.Tags, userID, shareID string, data *model.Sharetag) (*model.Sharetag, error)

SaveSharetag saves sharetag and validates its relationships.

func SaveTag

func SaveTag(ctx context.Context, tags *store.Tags, userID string, data *model.Tag) (*model.Tag, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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