github.com/lino-network/lino@v0.6.11/x/post/keeper.go (about)

     1  package post
     2  
     3  //go:generate mockery -name PostKeeper
     4  
     5  import (
     6  	codec "github.com/cosmos/cosmos-sdk/codec"
     7  	sdk "github.com/cosmos/cosmos-sdk/types"
     8  
     9  	linotypes "github.com/lino-network/lino/types"
    10  	"github.com/lino-network/lino/x/post/manager"
    11  	"github.com/lino-network/lino/x/post/model"
    12  	"github.com/lino-network/lino/x/post/types"
    13  )
    14  
    15  type PostKeeper interface {
    16  	DoesPostExist(ctx sdk.Context, permlink linotypes.Permlink) bool
    17  	GetPost(ctx sdk.Context, permlink linotypes.Permlink) (model.Post, sdk.Error)
    18  	CreatePost(ctx sdk.Context, author linotypes.AccountKey, postID string, createdBy linotypes.AccountKey, content string, title string) sdk.Error
    19  	UpdatePost(ctx sdk.Context, author linotypes.AccountKey, postID, title, content string) sdk.Error
    20  	DeletePost(ctx sdk.Context, permlink linotypes.Permlink) sdk.Error
    21  	LinoDonate(ctx sdk.Context, from linotypes.AccountKey, amount linotypes.Coin, author linotypes.AccountKey, postID string, app linotypes.AccountKey) sdk.Error
    22  	IDADonate(ctx sdk.Context, from linotypes.AccountKey, n linotypes.MiniIDA, author linotypes.AccountKey, postID string, app, signer linotypes.AccountKey) sdk.Error
    23  	ExecRewardEvent(ctx sdk.Context, reward types.RewardEvent) sdk.Error
    24  
    25  	// querier
    26  	GetComsumptionWindow(ctx sdk.Context) linotypes.MiniDollar
    27  
    28  	ImportFromFile(ctx sdk.Context, cdc *codec.Codec, filepath string) error
    29  	ExportToFile(ctx sdk.Context, cdc *codec.Codec, filepath string) error
    30  }
    31  
    32  var _ PostKeeper = manager.PostManager{}