fl

package
v0.0.0-...-cbbd1a2 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArticleAndUserGetFlT

type ArticleAndUserGetFlT = func(
	ctx context.Context,
	tx pgx.Tx,
	slug string,
	username string,
) (model.ArticlePlus, model.User, error)

ArticleAndUserGetFlT is the type of the stereotype instance for the flow that retrieves an article by slug and a user by username. It assumes that the username is that of the current user.

ArticleAndUserGetFl implements a stereotype instance of type ArticleAndUserGetFlT.

func ArticleAndUserGetFlC0

func ArticleAndUserGetFlC0(
	userGetByNameDaf daf.UserGetByNameDafT,
	articleGetBySlugDaf daf.ArticleGetBySlugDafT,
) ArticleAndUserGetFlT

ArticleAndUserGetFlC0 is the function that constructs a stereotype instance of type ArticleAndUserGetFlT without hard-wired BF dependencies.

type ArticleGetAndCheckOwnerFlT

type ArticleGetAndCheckOwnerFlT = func(
	ctx context.Context,
	tx pgx.Tx,
	slug string,
	username string,
) (model.ArticlePlus, model.User, error)

ArticleGetAndCheckOwnerFlT is the type of the stereotype instance for the flow that checks if a given article's author's username matches a given username.

var ArticleGetAndCheckOwnerFl ArticleGetAndCheckOwnerFlT = func(
	ctx context.Context,
	tx pgx.Tx,
	slug string,
	username string,
) (model.ArticlePlus, model.User, error) {
	return ArticleGetAndCheckOwnerFlC0(
		ArticleAndUserGetFl,
		bf.ArticleCheckOwnerBf,
	)(ctx, tx, slug, username)
}

ArticleGetAndCheckOwnerFl implements a stereotype instance of type ArticleGetAndCheckOwnerFlT.

func ArticleGetAndCheckOwnerFlC0

func ArticleGetAndCheckOwnerFlC0(
	articleAndUserGetFl ArticleAndUserGetFlT,
	articleCheckOwnerBf bf.ArticleCheckOwnerBfT,
) ArticleGetAndCheckOwnerFlT

ArticleGetAndCheckOwnerFlC0 is the function that constructs a stereotype instance of type ArticleGetAndCheckOwnerFlT without hard-wired BF dependencies.

Jump to

Keyboard shortcuts

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