Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func RegisterInvariants(ir sdk.InvariantRegistry, keeper Keeper)
- func ValidReasonsInvariant(k Keeper) sdk.Invariant
- func ValidReportsInvariant(k Keeper) sdk.Invariant
- func ValidSubspacesInvariant(k Keeper) sdk.Invariant
- type Hooks
- func (h Hooks) AfterAttachmentDeleted(sdk.Context, uint64, uint64, uint32)
- func (h Hooks) AfterAttachmentSaved(sdk.Context, uint64, uint64, uint32)
- func (h Hooks) AfterPollAnswerDeleted(sdk.Context, uint64, uint64, uint32, string)
- func (h Hooks) AfterPollAnswerSaved(sdk.Context, uint64, uint64, uint32, string)
- func (h Hooks) AfterPollVotingPeriodEnded(sdk.Context, uint64, uint64, uint32)
- func (h Hooks) AfterPostDeleted(ctx sdk.Context, subspaceID uint64, postID uint64)
- func (h Hooks) AfterPostSaved(sdk.Context, uint64, uint64)
- func (h Hooks) AfterSubspaceDeleted(ctx sdk.Context, subspaceID uint64)
- func (h Hooks) AfterSubspaceGroupDeleted(sdk.Context, uint64, uint32)
- func (h Hooks) AfterSubspaceGroupMemberAdded(sdk.Context, uint64, uint32, string)
- func (h Hooks) AfterSubspaceGroupMemberRemoved(sdk.Context, uint64, uint32, string)
- func (h Hooks) AfterSubspaceGroupSaved(sdk.Context, uint64, uint32)
- func (h Hooks) AfterSubspaceSaved(ctx sdk.Context, subspaceID uint64)
- func (h Hooks) AfterSubspaceSectionDeleted(sdk.Context, uint64, uint32)
- func (h Hooks) AfterSubspaceSectionSaved(sdk.Context, uint64, uint32)
- func (h Hooks) AfterUserPermissionRemoved(sdk.Context, uint64, uint32, string)
- func (h Hooks) AfterUserPermissionSet(sdk.Context, uint64, uint32, string, subspacestypes.Permissions)
- type Keeper
- func (k Keeper) AfterReasonDeleted(ctx sdk.Context, subspaceID uint64, reasonID uint32)
- func (k Keeper) AfterReasonSaved(ctx sdk.Context, subspaceID uint64, reasonID uint32)
- func (k Keeper) AfterReportDeleted(ctx sdk.Context, subspaceID uint64, reportID uint64)
- func (k Keeper) AfterReportSaved(ctx sdk.Context, subspaceID uint64, reportID uint64)
- func (k Keeper) DeleteNextReasonID(ctx sdk.Context, subspaceID uint64)
- func (k Keeper) DeleteNextReportID(ctx sdk.Context, subspaceID uint64)
- func (k Keeper) DeleteReason(ctx sdk.Context, subspaceID uint64, reasonID uint32)
- func (k Keeper) DeleteReport(ctx sdk.Context, subspaceID uint64, reportID uint64)
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k Keeper) GetNextReasonID(ctx sdk.Context, subspaceID uint64) (reasonID uint32, err error)
- func (k Keeper) GetNextReportID(ctx sdk.Context, subspaceID uint64) (reportID uint64, err error)
- func (k Keeper) GetParams(ctx sdk.Context) (p types.Params)
- func (k Keeper) GetPost(ctx sdk.Context, subspaceID uint64, postID uint64) (poststypes.Post, bool)
- func (k Keeper) GetReason(ctx sdk.Context, subspaceID uint64, reasonID uint32) (reason types.Reason, found bool)
- func (k Keeper) GetReport(ctx sdk.Context, subspaceID uint64, reportID uint64) (report types.Report, found bool)
- func (k Keeper) GetStandardReason(ctx sdk.Context, id uint32) (reason types.StandardReason, found bool)
- func (k Keeper) GetSubspaceReasons(ctx sdk.Context, subspaceID uint64) []types.Reason
- func (k Keeper) GetSubspaceReports(ctx sdk.Context, subspaceID uint64) []types.Report
- func (k Keeper) HasNextReasonID(ctx sdk.Context, subspaceID uint64) bool
- func (k Keeper) HasNextReportID(ctx sdk.Context, subspaceID uint64) bool
- func (k Keeper) HasPermission(ctx sdk.Context, subspaceID uint64, user string, ...) bool
- func (k Keeper) HasPost(ctx sdk.Context, subspaceID uint64, postID uint64) bool
- func (k Keeper) HasProfile(ctx sdk.Context, user string) bool
- func (k Keeper) HasReason(ctx sdk.Context, subspaceID uint64, reasonID uint32) bool
- func (k Keeper) HasReport(ctx sdk.Context, subspaceID uint64, reportID uint64) bool
- func (k Keeper) HasReported(ctx sdk.Context, subspaceID uint64, reporter string, target types.ReportTarget) bool
- func (k Keeper) HasSubspace(ctx sdk.Context, subspaceID uint64) bool
- func (k Keeper) HasUserBlocked(ctx sdk.Context, blocker, user string, subspaceID uint64) bool
- func (k Keeper) Hooks() Hooks
- func (k Keeper) InitGenesis(ctx sdk.Context, data types.GenesisState)
- func (k Keeper) IteratePostReports(ctx sdk.Context, subspaceID uint64, postID uint64, ...)
- func (k Keeper) IterateReasons(ctx sdk.Context, fn func(reason types.Reason) (stop bool))
- func (k Keeper) IterateReports(ctx sdk.Context, fn func(report types.Report) (stop bool))
- func (k Keeper) IterateSubspaceReasons(ctx sdk.Context, subspaceID uint64, fn func(reason types.Reason) (stop bool))
- func (k Keeper) IterateSubspaceReports(ctx sdk.Context, subspaceID uint64, fn func(report types.Report) (stop bool))
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) Params(ctx context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) Reason(ctx context.Context, request *types.QueryReasonRequest) (*types.QueryReasonResponse, error)
- func (k Keeper) Reasons(ctx context.Context, request *types.QueryReasonsRequest) (*types.QueryReasonsResponse, error)
- func (k Keeper) Report(ctx context.Context, request *types.QueryReportRequest) (*types.QueryReportResponse, error)
- func (k Keeper) Reports(ctx context.Context, request *types.QueryReportsRequest) (*types.QueryReportsResponse, error)
- func (k Keeper) SaveReason(ctx sdk.Context, reason types.Reason)
- func (k Keeper) SaveReport(ctx sdk.Context, report types.Report)
- func (k *Keeper) SetHooks(rs types.ReportsHooks) *Keeper
- func (k Keeper) SetNextReasonID(ctx sdk.Context, subspaceID uint64, reasonID uint32)
- func (k Keeper) SetNextReportID(ctx sdk.Context, subspaceID uint64, reportID uint64)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) ValidateReport(ctx sdk.Context, report types.Report) (err error)
- type Migrator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the stored MsgServer interface for the provided keeper
func RegisterInvariants ¶
func RegisterInvariants(ir sdk.InvariantRegistry, keeper Keeper)
RegisterInvariants registers all posts invariants
func ValidReasonsInvariant ¶
ValidReasonsInvariant checks that all the reasons are valid
func ValidReportsInvariant ¶
ValidReportsInvariant checks that all the reports are valid
func ValidSubspacesInvariant ¶
ValidSubspacesInvariant checks that all the subspaces have a valid reason id and report id to them
Types ¶
type Hooks ¶
type Hooks struct {
// contains filtered or unexported fields
}
func (Hooks) AfterAttachmentDeleted ¶
AfterAttachmentDeleted implements poststypes.PostsHooks
func (Hooks) AfterAttachmentSaved ¶
AfterAttachmentSaved implements poststypes.PostsHooks
func (Hooks) AfterPollAnswerDeleted ¶
AfterPollAnswerDeleted implements poststypes.PostsHooks
func (Hooks) AfterPollAnswerSaved ¶
AfterPollAnswerSaved implements poststypes.PostsHooks
func (Hooks) AfterPollVotingPeriodEnded ¶
AfterPollVotingPeriodEnded implements poststypes.PostsHooks
func (Hooks) AfterPostDeleted ¶
AfterPostDeleted implements poststypes.PostsHooks
func (Hooks) AfterPostSaved ¶
AfterPostSaved implements poststypes.PostsHooks
func (Hooks) AfterSubspaceDeleted ¶
AfterSubspaceDeleted implements subspacestypes.Hooks
func (Hooks) AfterSubspaceGroupDeleted ¶
AfterSubspaceGroupDeleted implements subspacestypes.Hooks
func (Hooks) AfterSubspaceGroupMemberAdded ¶
AfterSubspaceGroupMemberAdded implements subspacestypes.Hooks
func (Hooks) AfterSubspaceGroupMemberRemoved ¶
AfterSubspaceGroupMemberRemoved implements subspacestypes.Hooks
func (Hooks) AfterSubspaceGroupSaved ¶
AfterSubspaceGroupSaved implements subspacestypes.Hooks
func (Hooks) AfterSubspaceSaved ¶
AfterSubspaceSaved implements subspacestypes.Hooks
func (Hooks) AfterSubspaceSectionDeleted ¶
AfterSubspaceSectionDeleted implements subspacestypes.Hooks
func (Hooks) AfterSubspaceSectionSaved ¶
AfterSubspaceSectionSaved implements subspacestypes.Hooks
func (Hooks) AfterUserPermissionRemoved ¶
AfterUserPermissionRemoved implements subspacestypes.Hooks
func (Hooks) AfterUserPermissionSet ¶
func (h Hooks) AfterUserPermissionSet(sdk.Context, uint64, uint32, string, subspacestypes.Permissions)
AfterUserPermissionSet implements subspacestypes.Hooks
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey sdk.StoreKey, paramsSubspace paramstypes.Subspace, ak types.ProfilesKeeper, sk types.SubspacesKeeper, rk types.RelationshipsKeeper, pk types.PostsKeeper, ) Keeper
NewKeeper creates a new instance of the Posts Keeper.
func (Keeper) AfterReasonDeleted ¶
AfterReasonDeleted implements types.ReportsHooks
func (Keeper) AfterReasonSaved ¶
AfterReasonSaved implements types.ReportsHooks
func (Keeper) AfterReportDeleted ¶
AfterReportDeleted implements types.ReportsHooks
func (Keeper) AfterReportSaved ¶
AfterReportSaved implements types.ReportsHooks
func (Keeper) DeleteNextReasonID ¶
DeleteNextReasonID removes the reason id key for the given subspace
func (Keeper) DeleteNextReportID ¶
DeleteNextReportID removes the report id key for the given subspace
func (Keeper) DeleteReason ¶
DeleteReason deletes the reason having the given id from the store
func (Keeper) DeleteReport ¶
DeleteReport deletes the report having the given id from the store
func (Keeper) ExportGenesis ¶
func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
ExportGenesis returns the GenesisState associated with the given context
func (Keeper) GetNextReasonID ¶
GetNextReasonID gets the highest reason id for the given subspace
func (Keeper) GetNextReportID ¶
GetNextReportID gets the highest report id for the given subspace
func (Keeper) GetReason ¶
func (k Keeper) GetReason(ctx sdk.Context, subspaceID uint64, reasonID uint32) (reason types.Reason, found bool)
GetReason returns the reason associated with the given id. If there is no reason with the given id the function will return an empty reason and false.
func (Keeper) GetReport ¶
func (k Keeper) GetReport(ctx sdk.Context, subspaceID uint64, reportID uint64) (report types.Report, found bool)
GetReport returns the report associated with the given id. If there is no report associated with the given id the function will return an empty report and false.
func (Keeper) GetStandardReason ¶
func (k Keeper) GetStandardReason(ctx sdk.Context, id uint32) (reason types.StandardReason, found bool)
GetStandardReason returns the standard reason with the given id. If no standard reason with the given id could be found, the method will return an empty standard reason and false
func (Keeper) GetSubspaceReasons ¶
GetSubspaceReasons returns the reporting reasons for the given subspace
func (Keeper) GetSubspaceReports ¶
GetSubspaceReports returns all the reports for the given subspace
func (Keeper) HasNextReasonID ¶
HasNextReasonID tells whether the next reason id exists for the given subspace
func (Keeper) HasNextReportID ¶
HasNextReportID tells whether a next report id exists for the given subspace
func (Keeper) HasPermission ¶
func (k Keeper) HasPermission(ctx sdk.Context, subspaceID uint64, user string, permission subspacestypes.Permission) bool
HasPermission tells whether the given user has the provided permission inside the subspace with the specified id
func (Keeper) HasProfile ¶
HasProfile returns true iff the given user has a profile, or an error if something is wrong.
func (Keeper) HasReported ¶
func (k Keeper) HasReported(ctx sdk.Context, subspaceID uint64, reporter string, target types.ReportTarget) bool
HasReported tells whether the given reporter has reported the specified target or not
func (Keeper) HasSubspace ¶
HasSubspace tells whether the subspace with the given id exists or not
func (Keeper) HasUserBlocked ¶
HasUserBlocked tells whether the given blocker has blocked the user inside the provided subspace
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis(ctx sdk.Context, data types.GenesisState)
InitGenesis initializes the chain state based on the given GenesisState
func (Keeper) IteratePostReports ¶
func (k Keeper) IteratePostReports(ctx sdk.Context, subspaceID uint64, postID uint64, fn func(report types.Report) (stop bool))
IteratePostReports iterates over all the reports for the given post and performs the provided function
func (Keeper) IterateReasons ¶
IterateReasons iterates over all the stored reasons and performs the provided function
func (Keeper) IterateReports ¶
IterateReports iterates over all reports and performs the provided function
func (Keeper) IterateSubspaceReasons ¶
func (k Keeper) IterateSubspaceReasons(ctx sdk.Context, subspaceID uint64, fn func(reason types.Reason) (stop bool))
IterateSubspaceReasons iterates over all the given subspace reasons and performs the provided function
func (Keeper) IterateSubspaceReports ¶
func (k Keeper) IterateSubspaceReports(ctx sdk.Context, subspaceID uint64, fn func(report types.Report) (stop bool))
IterateSubspaceReports iterates over all the given subspace reports and performs the provided function
func (Keeper) Params ¶
func (k Keeper) Params(ctx context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
Params implements the QueryParams gRPC method
func (Keeper) Reason ¶
func (k Keeper) Reason(ctx context.Context, request *types.QueryReasonRequest) (*types.QueryReasonResponse, error)
Reason implements the QueryReason gRPC method
func (Keeper) Reasons ¶
func (k Keeper) Reasons(ctx context.Context, request *types.QueryReasonsRequest) (*types.QueryReasonsResponse, error)
Reasons implements the QueryReasons gRPC method
func (Keeper) Report ¶
func (k Keeper) Report(ctx context.Context, request *types.QueryReportRequest) (*types.QueryReportResponse, error)
Report implements the QueryReport gRPC method
func (Keeper) Reports ¶
func (k Keeper) Reports(ctx context.Context, request *types.QueryReportsRequest) (*types.QueryReportsResponse, error)
Reports implements the QueryReports gRPC method
func (Keeper) SaveReason ¶
SaveReason saves the given reason inside the current context
func (Keeper) SaveReport ¶
SaveReport saves the given report inside the current context
func (*Keeper) SetHooks ¶
func (k *Keeper) SetHooks(rs types.ReportsHooks) *Keeper
SetHooks allows to set the reports hooks
func (Keeper) SetNextReasonID ¶
SetNextReasonID sets the new reason id for the given subspace to the store
func (Keeper) SetNextReportID ¶
SetNextReportID sets the new report id for the given subspace to the store
type Migrator ¶
type Migrator struct {
// contains filtered or unexported fields
}
Migrator is a struct for handling in-place store migrations.
func NewMigrator ¶
func NewMigrator(keeper Keeper, sk types.SubspacesKeeper) Migrator
NewMigrator returns a new Migrator