Documentation ¶
Index ¶
- func FormatOutputSubspaces(subspaces []types.Subspace) (outputSubspaces string)
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func RegisterInvariants(ir sdk.InvariantRegistry, keeper Keeper)
- func ValidGroupGrantsInvariant(k Keeper) sdk.Invariant
- func ValidSectionsInvariant(k Keeper) sdk.Invariant
- func ValidSubspacesInvariant(k Keeper) sdk.Invariant
- func ValidUserGrantsInvariant(k Keeper) sdk.Invariant
- func ValidUserGroupMembersInvariant(k Keeper) sdk.Invariant
- func ValidUserGroupsInvariant(k Keeper) sdk.Invariant
- func ValidUserPermissionsInvariant(k Keeper) sdk.Invariant
- type Keeper
- func (k Keeper) AddUserToGroup(ctx sdk.Context, subspaceID uint64, groupID uint32, user string)
- func (k Keeper) AfterSubspaceDeleted(ctx sdk.Context, subspaceID uint64)
- func (k Keeper) AfterSubspaceGroupDeleted(ctx sdk.Context, subspaceID uint64, groupID uint32)
- func (k Keeper) AfterSubspaceGroupMemberAdded(ctx sdk.Context, subspaceID uint64, groupID uint32, user string)
- func (k Keeper) AfterSubspaceGroupMemberRemoved(ctx sdk.Context, subspaceID uint64, groupID uint32, user string)
- func (k Keeper) AfterSubspaceGroupSaved(ctx sdk.Context, subspaceID uint64, groupID uint32)
- func (k Keeper) AfterSubspaceSaved(ctx sdk.Context, subspaceID uint64)
- func (k Keeper) AfterSubspaceSectionDeleted(ctx sdk.Context, subspaceID uint64, sectionID uint32)
- func (k Keeper) AfterSubspaceSectionSaved(ctx sdk.Context, subspaceID uint64, sectionID uint32)
- func (k Keeper) AfterUserPermissionRemoved(ctx sdk.Context, subspaceID uint64, sectionID uint32, user string)
- func (k Keeper) AfterUserPermissionSet(ctx sdk.Context, subspaceID uint64, sectionID uint32, user string, ...)
- func (k Keeper) DeleteGroupGrant(ctx sdk.Context, subspaceID uint64, groupID uint32)
- func (k Keeper) DeleteNextGroupID(ctx sdk.Context, subspaceID uint64)
- func (k Keeper) DeleteNextSectionID(ctx sdk.Context, subspaceID uint64)
- func (k Keeper) DeleteSection(ctx sdk.Context, subspaceID uint64, sectionID uint32)
- func (k Keeper) DeleteSubspace(ctx sdk.Context, subspaceID uint64)
- func (k Keeper) DeleteUserGrant(ctx sdk.Context, subspaceID uint64, grantee string)
- func (k Keeper) DeleteUserGroup(ctx sdk.Context, subspaceID uint64, groupID uint32)
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k Keeper) GetAllGrants(ctx sdk.Context) []types.Grant
- func (k Keeper) GetAllPermissions(ctx sdk.Context) []types.UserPermission
- func (k Keeper) GetAllSections(ctx sdk.Context) []types.Section
- func (k Keeper) GetAllSubspaces(ctx sdk.Context) []types.Subspace
- func (k Keeper) GetAllUserGrants(ctx sdk.Context) []types.Grant
- func (k Keeper) GetAllUserGroups(ctx sdk.Context) []types.UserGroup
- func (k Keeper) GetAllUserGroupsGrants(ctx sdk.Context) []types.Grant
- func (k Keeper) GetGroupGrant(ctx sdk.Context, subspaceID uint64, groupID uint32) (types.Grant, bool)
- func (k Keeper) GetGroupsInheritedPermissions(ctx sdk.Context, subspaceID uint64, sectionID uint32, user string) types.Permissions
- func (k Keeper) GetNextGroupID(ctx sdk.Context, subspaceID uint64) (groupID uint32, err error)
- func (k Keeper) GetNextSectionID(ctx sdk.Context, subspaceID uint64) (sectionID uint32, err error)
- func (k Keeper) GetSection(ctx sdk.Context, subspaceID uint64, sectionID uint32) (section types.Section, found bool)
- func (k Keeper) GetSectionUserGroups(ctx sdk.Context, subspaceID uint64, sectionID uint32) []types.UserGroup
- func (k Keeper) GetSectionUserPermissions(ctx sdk.Context, subspaceID uint64, sectionID uint32) []types.UserPermission
- func (k Keeper) GetSubspace(ctx sdk.Context, subspaceID uint64) (subspace types.Subspace, found bool)
- func (k Keeper) GetSubspaceID(ctx sdk.Context) (subspaceID uint64, err error)
- func (k Keeper) GetSubspaceSections(ctx sdk.Context, subspaceID uint64) []types.Section
- func (k Keeper) GetSubspaceUserGrants(ctx sdk.Context, subspaceID uint64) []types.Grant
- func (k Keeper) GetSubspaceUserGroups(ctx sdk.Context, subspaceID uint64) []types.UserGroup
- func (k Keeper) GetSubspaceUserGroupsGrants(ctx sdk.Context, subspaceID uint64) []types.Grant
- func (k Keeper) GetSubspaceUserPermissions(ctx sdk.Context, subspaceID uint64) []types.UserPermission
- func (k Keeper) GetUserGrant(ctx sdk.Context, subspaceID uint64, grantee string) (grant types.Grant, found bool)
- func (k Keeper) GetUserGroup(ctx sdk.Context, subspaceID uint64, groupID uint32) (group types.UserGroup, found bool)
- func (k Keeper) GetUserGroupGrants(ctx sdk.Context, subspaceID uint64, groupID uint32) []types.Grant
- func (k Keeper) GetUserGroupMembers(ctx sdk.Context, subspaceID uint64, groupID uint32) []string
- func (k Keeper) GetUserPermissions(ctx sdk.Context, subspaceID uint64, sectionID uint32, user string) types.Permissions
- func (k Keeper) GetUsersWithRootPermissions(ctx sdk.Context, subspaceID uint64, permission types.Permissions) []string
- func (k Keeper) GroupAllowances(ctx context.Context, request *types.QueryGroupAllowancesRequest) (*types.QueryGroupAllowancesResponse, error)
- func (k Keeper) HasGroupGrant(ctx sdk.Context, subspaceID uint64, groupID uint32) bool
- func (k Keeper) HasNextGroupID(ctx sdk.Context, subspaceID uint64) bool
- func (k Keeper) HasNextSectionID(ctx sdk.Context, subspaceID uint64) bool
- func (k Keeper) HasPermission(ctx sdk.Context, subspaceID uint64, sectionID uint32, user string, ...) bool
- func (k Keeper) HasSection(ctx sdk.Context, subspaceID uint64, sectionID uint32) bool
- func (k Keeper) HasSubspace(ctx sdk.Context, subspaceID uint64) bool
- func (k Keeper) HasUserGrant(ctx sdk.Context, subspaceID uint64, grantee string) bool
- func (k Keeper) HasUserGroup(ctx sdk.Context, subspaceID uint64, groupID uint32) bool
- func (k Keeper) InitGenesis(ctx sdk.Context, data types.GenesisState)
- func (k Keeper) IsMemberOfGroup(ctx sdk.Context, subspaceID uint64, groupID uint32, user string) bool
- func (k Keeper) IsSectionPathValid(ctx sdk.Context, subspaceID uint64, sectionID uint32) bool
- func (k Keeper) IterateSectionChildren(ctx sdk.Context, subspaceID uint64, sectionID uint32, ...)
- func (k Keeper) IterateSectionPath(ctx sdk.Context, subspaceID uint64, sectionID uint32, ...)
- func (k Keeper) IterateSectionUserGroups(ctx sdk.Context, subspaceID uint64, sectionID uint32, ...)
- func (k Keeper) IterateSectionUserPermissions(ctx sdk.Context, subspaceID uint64, sectionID uint32, ...)
- func (k Keeper) IterateSections(ctx sdk.Context, fn func(section types.Section) (stop bool))
- func (k Keeper) IterateSubspaceSections(ctx sdk.Context, subspaceID uint64, fn func(section types.Section) (stop bool))
- func (k Keeper) IterateSubspaceUserGrants(ctx sdk.Context, subspaceID uint64, fn func(grant types.Grant) (stop bool))
- func (k Keeper) IterateSubspaceUserGroupGrants(ctx sdk.Context, subspaceID uint64, fn func(grant types.Grant) (stop bool))
- func (k Keeper) IterateSubspaceUserGroups(ctx sdk.Context, subspaceID uint64, fn func(group types.UserGroup) (stop bool))
- func (k Keeper) IterateSubspaceUserPermissions(ctx sdk.Context, subspaceID uint64, ...)
- func (k Keeper) IterateSubspaces(ctx sdk.Context, fn func(subspace types.Subspace) (stop bool))
- func (k Keeper) IterateUserGrants(ctx sdk.Context, fn func(grant types.Grant) (stop bool))
- func (k Keeper) IterateUserGroupGrants(ctx sdk.Context, subspaceID uint64, groupID uint32, ...)
- func (k Keeper) IterateUserGroupMembers(ctx sdk.Context, subspaceID uint64, groupID uint32, ...)
- func (k Keeper) IterateUserGroups(ctx sdk.Context, fn func(group types.UserGroup) (stop bool))
- func (k Keeper) IterateUserGroupsGrants(ctx sdk.Context, fn func(grant types.Grant) (stop bool))
- func (k Keeper) IterateUserGroupsMembers(ctx sdk.Context, fn func(entry types.UserGroupMemberEntry) (stop bool))
- func (k Keeper) IterateUserPermissions(ctx sdk.Context, fn func(entry types.UserPermission) (stop bool))
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) RemoveUserFromGroup(ctx sdk.Context, subspaceID uint64, groupID uint32, user string)
- func (k Keeper) RemoveUserPermissions(ctx sdk.Context, subspaceID uint64, sectionID uint32, user string)
- func (k Keeper) SaveGrant(ctx sdk.Context, grant types.Grant)
- func (k Keeper) SaveSection(ctx sdk.Context, section types.Section)
- func (k Keeper) SaveSubspace(ctx sdk.Context, subspace types.Subspace)
- func (k Keeper) SaveUserGroup(ctx sdk.Context, group types.UserGroup)
- func (k Keeper) Section(ctx context.Context, request *types.QuerySectionRequest) (*types.QuerySectionResponse, error)
- func (k Keeper) Sections(ctx context.Context, request *types.QuerySectionsRequest) (*types.QuerySectionsResponse, error)
- func (k *Keeper) SetHooks(sh types.SubspacesHooks) *Keeper
- func (k Keeper) SetNextGroupID(ctx sdk.Context, subspaceID uint64, groupID uint32)
- func (k Keeper) SetNextSectionID(ctx sdk.Context, subspaceID uint64, sectionID uint32)
- func (k Keeper) SetSubspaceID(ctx sdk.Context, subspaceID uint64)
- func (k Keeper) SetUserPermissions(ctx sdk.Context, subspaceID uint64, sectionID uint32, user string, ...)
- func (k Keeper) Subspace(ctx context.Context, request *types.QuerySubspaceRequest) (*types.QuerySubspaceResponse, error)
- func (k Keeper) Subspaces(ctx context.Context, request *types.QuerySubspacesRequest) (*types.QuerySubspacesResponse, error)
- func (k Keeper) UseGrantedFees(ctx sdk.Context, subspaceID uint64, grantee sdk.AccAddress, fees sdk.Coins, ...) bool
- func (k Keeper) UseGroupGrantedFees(ctx sdk.Context, subspaceID uint64, grantee sdk.AccAddress, fee sdk.Coins, ...) (used bool)
- func (k Keeper) UseUserGrantedFees(ctx sdk.Context, subspaceID uint64, grantee sdk.AccAddress, fees sdk.Coins, ...) (used bool)
- func (k Keeper) UserAllowances(ctx context.Context, request *types.QueryUserAllowancesRequest) (*types.QueryUserAllowancesResponse, error)
- func (k Keeper) UserGroup(ctx context.Context, request *types.QueryUserGroupRequest) (*types.QueryUserGroupResponse, error)
- func (k Keeper) UserGroupMembers(ctx context.Context, request *types.QueryUserGroupMembersRequest) (*types.QueryUserGroupMembersResponse, error)
- func (k Keeper) UserGroups(ctx context.Context, request *types.QueryUserGroupsRequest) (*types.QueryUserGroupsResponse, error)
- func (k Keeper) UserPermissions(ctx context.Context, request *types.QueryUserPermissionsRequest) (*types.QueryUserPermissionsResponse, error)
- type Migrator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatOutputSubspaces ¶
FormatOutputSubspaces concatenate the subspaces given into a unique string
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 subspaces invariants
func ValidGroupGrantsInvariant ¶
ValidGroupGrantsInvariant checks that all the user grants are valid
func ValidSectionsInvariant ¶
ValidSectionsInvariant checks that all the sections are valid
func ValidSubspacesInvariant ¶
ValidSubspacesInvariant checks that all the subspaces are valid
func ValidUserGrantsInvariant ¶
ValidUserGrantsInvariant checks that all the user grants are valid
func ValidUserGroupMembersInvariant ¶
ValidUserGroupMembersInvariant checks that all the user group members are valid
func ValidUserGroupsInvariant ¶
ValidUserGroupsInvariant checks that all the subspaces are valid
func ValidUserPermissionsInvariant ¶
ValidUserPermissionsInvariant checks that all the user permission entries are valid
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper(cdc codec.BinaryCodec, storeKey storetypes.StoreKey, ak types.AccountKeeper, authzKeeper types.AuthzKeeper) Keeper
NewKeeper creates new instances of the subspaces keeper
func (Keeper) AddUserToGroup ¶
AddUserToGroup adds the given user to the group having the provided id inside the specified subspace.
func (Keeper) AfterSubspaceDeleted ¶
AfterSubspaceDeleted - call if hook is registered
func (Keeper) AfterSubspaceGroupDeleted ¶
AfterSubspaceGroupDeleted - call if hook is registered
func (Keeper) AfterSubspaceGroupMemberAdded ¶
func (k Keeper) AfterSubspaceGroupMemberAdded(ctx sdk.Context, subspaceID uint64, groupID uint32, user string)
AfterSubspaceGroupMemberAdded - call if hook is registered
func (Keeper) AfterSubspaceGroupMemberRemoved ¶
func (k Keeper) AfterSubspaceGroupMemberRemoved(ctx sdk.Context, subspaceID uint64, groupID uint32, user string)
AfterSubspaceGroupMemberRemoved - call if hook is registered
func (Keeper) AfterSubspaceGroupSaved ¶
AfterSubspaceGroupSaved - call if hook is registered
func (Keeper) AfterSubspaceSaved ¶
AfterSubspaceSaved - call if hook is registered
func (Keeper) AfterSubspaceSectionDeleted ¶
AfterSubspaceSectionDeleted - call if hook is registered
func (Keeper) AfterSubspaceSectionSaved ¶
AfterSubspaceSectionSaved - call if hook is registered
func (Keeper) AfterUserPermissionRemoved ¶
func (k Keeper) AfterUserPermissionRemoved(ctx sdk.Context, subspaceID uint64, sectionID uint32, user string)
AfterUserPermissionRemoved - call if hook is registered
func (Keeper) AfterUserPermissionSet ¶
func (k Keeper) AfterUserPermissionSet(ctx sdk.Context, subspaceID uint64, sectionID uint32, user string, permissions types.Permissions)
AfterUserPermissionSet - call if hook is registered
func (Keeper) DeleteGroupGrant ¶
DeleteSection deletes the grant having associated to the given group id from the subspace with the provided id
func (Keeper) DeleteNextGroupID ¶
DeleteNextGroupID deletes the next group id key for the given subspace
func (Keeper) DeleteNextSectionID ¶
DeleteNextSectionID deletes the next section id key for the given subspace from the store
func (Keeper) DeleteSection ¶
DeleteSection deletes the section having the given id from the subspace with the provided id
func (Keeper) DeleteSubspace ¶
DeleteSubspace allows to delete the subspace with the given id
func (Keeper) DeleteUserGrant ¶
DeleteSection deletes the grant associated the given user grantee from the subspace with the provided id
func (Keeper) DeleteUserGroup ¶
DeleteUserGroup deletes the group with the given id from the subspace with the provided id
func (Keeper) ExportGenesis ¶
func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
ExportGenesis returns the GenesisState associated with the given context
func (Keeper) GetAllGrants ¶
GetAllGrants returns all the grants inside x/subspace
func (Keeper) GetAllPermissions ¶
func (k Keeper) GetAllPermissions(ctx sdk.Context) []types.UserPermission
GetAllPermissions returns all the stored permissions for all subspaces
func (Keeper) GetAllSections ¶
GetAllSections returns all the stored sections
func (Keeper) GetAllSubspaces ¶
GetAllSubspaces returns a list of all the subspaces that have been store inside the given context
func (Keeper) GetAllUserGrants ¶
GetAllUserGrants returns a list of all the user grants that have been store inside the given context
func (Keeper) GetAllUserGroups ¶
GetAllUserGroups returns the information (name and members) for all the groups of all the subspaces
func (Keeper) GetAllUserGroupsGrants ¶
GetAllUserGroupsGrants returns a list of all the group grants that have been store inside the given context
func (Keeper) GetGroupGrant ¶
func (k Keeper) GetGroupGrant(ctx sdk.Context, subspaceID uint64, groupID uint32) (types.Grant, bool)
GetGroupGrant returns the grant associated to the given group id from the provided subspace. If there is no grant associated with the info the function will return an error.
func (Keeper) GetGroupsInheritedPermissions ¶
func (k Keeper) GetGroupsInheritedPermissions(ctx sdk.Context, subspaceID uint64, sectionID uint32, user string) types.Permissions
GetGroupsInheritedPermissions returns the permissions that the specified user has inherited from all the groups that they are part of.
func (Keeper) GetNextGroupID ¶
GetNextGroupID gets the highest group id for the subspace with the given id
func (Keeper) GetNextSectionID ¶
GetNextSectionID gets the next section id for the subspace having the given id
func (Keeper) GetSection ¶
func (k Keeper) GetSection(ctx sdk.Context, subspaceID uint64, sectionID uint32) (section types.Section, found bool)
GetSection returns the section having the given id from the subspace with the provided id. If there is no section associated with the given id the function will return an empty section and false.
func (Keeper) GetSectionUserGroups ¶
func (k Keeper) GetSectionUserGroups(ctx sdk.Context, subspaceID uint64, sectionID uint32) []types.UserGroup
GetSectionUserGroups returns all the user groups present inside the given section
func (Keeper) GetSectionUserPermissions ¶
func (k Keeper) GetSectionUserPermissions(ctx sdk.Context, subspaceID uint64, sectionID uint32) []types.UserPermission
GetSectionUserPermissions returns all the user permissions set inside the specific section
func (Keeper) GetSubspace ¶
func (k Keeper) GetSubspace(ctx sdk.Context, subspaceID uint64) (subspace types.Subspace, found bool)
GetSubspace returns the subspace associated with the given id. If there is no subspace associated with the given id the function will return an empty subspace and false.
func (Keeper) GetSubspaceID ¶
GetSubspaceID gets the highest subspace id
func (Keeper) GetSubspaceSections ¶
GetSubspaceSections returns all the sections for the given subspace
func (Keeper) GetSubspaceUserGrants ¶
GetSubspaceUserGrants returns all the user grants inside the given subspace
func (Keeper) GetSubspaceUserGroups ¶
GetSubspaceUserGroups returns the list of all groups present inside a given subspace
func (Keeper) GetSubspaceUserGroupsGrants ¶
GetSubspaceUserGroupsGrants returns all the group grants inside the given subspace
func (Keeper) GetSubspaceUserPermissions ¶
func (k Keeper) GetSubspaceUserPermissions(ctx sdk.Context, subspaceID uint64) []types.UserPermission
GetSubspaceUserPermissions returns all the user permissions set for the given subspace
func (Keeper) GetUserGrant ¶
func (k Keeper) GetUserGrant(ctx sdk.Context, subspaceID uint64, grantee string) (grant types.Grant, found bool)
GetUserGrant returns the grant associated to the given user from the provided subspace. If there is no grant associated with the info the function will return false.
func (Keeper) GetUserGroup ¶
func (k Keeper) GetUserGroup(ctx sdk.Context, subspaceID uint64, groupID uint32) (group types.UserGroup, found bool)
GetUserGroup returns the group associated with the given id inside the subspace with the provided id. If there is no group associated with the given id the function will return an empty group and false.
func (Keeper) GetUserGroupGrants ¶
func (k Keeper) GetUserGroupGrants(ctx sdk.Context, subspaceID uint64, groupID uint32) []types.Grant
GetUserGroupGrants returns all the group grants inside the given group
func (Keeper) GetUserGroupMembers ¶
GetUserGroupMembers returns all the members of a group inside a specific subspace
func (Keeper) GetUserPermissions ¶
func (k Keeper) GetUserPermissions(ctx sdk.Context, subspaceID uint64, sectionID uint32, user string) types.Permissions
GetUserPermissions returns the permissions that are currently set inside the subspace with the given id for the given user
func (Keeper) GetUsersWithRootPermissions ¶
func (k Keeper) GetUsersWithRootPermissions(ctx sdk.Context, subspaceID uint64, permission types.Permissions) []string
GetUsersWithRootPermissions returns all the users that have a given permission inside the specified subspace
func (Keeper) GroupAllowances ¶
func (k Keeper) GroupAllowances(ctx context.Context, request *types.QueryGroupAllowancesRequest) (*types.QueryGroupAllowancesResponse, error)
GroupAllowances implements the Query/GroupAllowances gRPC method
func (Keeper) HasGroupGrant ¶
HasUserGrant tells whether the group grant associated to the given group id exists inside the provided subspace
func (Keeper) HasNextGroupID ¶
HasNextGroupID tells whether the next group id key exists for the given subspace
func (Keeper) HasNextSectionID ¶
HasNextSectionID tells whether the next section id key exists for the given subspace
func (Keeper) HasPermission ¶
func (k Keeper) HasPermission(ctx sdk.Context, subspaceID uint64, sectionID uint32, user string, permission types.Permission) bool
HasPermission checks whether the specific user has the given permission inside a specific subspace
func (Keeper) HasSection ¶
HasSection tells whether the section having the given id exists inside the provided subspace
func (Keeper) HasSubspace ¶
HasSubspace tells whether the given subspace exists or not
func (Keeper) HasUserGrant ¶
HasUserGrant tells whether the user grant associated to the given user exists inside the provided subspace
func (Keeper) HasUserGroup ¶
HasUserGroup tells whether the given subspace has a group with the specified id or not
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) IsMemberOfGroup ¶
func (k Keeper) IsMemberOfGroup(ctx sdk.Context, subspaceID uint64, groupID uint32, user string) bool
IsMemberOfGroup returns whether the given user is part of the group with the specified id inside the provided subspace
func (Keeper) IsSectionPathValid ¶
IsSectionPathValid tells whether the given path of the given section is valid or not. A path is considered to be valid if it's possible to reach the RootSection starting from a section.
func (Keeper) IterateSectionChildren ¶
func (k Keeper) IterateSectionChildren(ctx sdk.Context, subspaceID uint64, sectionID uint32, fn func(section types.Section) (stop bool))
IterateSectionChildren iterates over all the children of the given section and performs the provided function
func (Keeper) IterateSectionPath ¶
func (k Keeper) IterateSectionPath(ctx sdk.Context, subspaceID uint64, sectionID uint32, fn func(section types.Section) (stop bool))
IterateSectionPath iterates the path that leads from the section having the given id up towards the root section and performs the provided function on all the sections that are encountered over the path (including the initial section having the specified id).
func (Keeper) IterateSectionUserGroups ¶
func (k Keeper) IterateSectionUserGroups(ctx sdk.Context, subspaceID uint64, sectionID uint32, fn func(group types.UserGroup) (stop bool))
IterateSectionUserGroups iterates over all the user groups for the given section and performs the provided function
func (Keeper) IterateSectionUserPermissions ¶
func (k Keeper) IterateSectionUserPermissions(ctx sdk.Context, subspaceID uint64, sectionID uint32, fn func(entry types.UserPermission) (stop bool))
IterateSectionUserPermissions iterates over all the permissions set for the given section and performs the provided function
func (Keeper) IterateSections ¶
IterateSections iterates over all the sections stored and performs the provided function
func (Keeper) IterateSubspaceSections ¶
func (k Keeper) IterateSubspaceSections(ctx sdk.Context, subspaceID uint64, fn func(section types.Section) (stop bool))
IterateSubspaceSections iterates over all the sections for the given subspace and performs the provided function
func (Keeper) IterateSubspaceUserGrants ¶
func (k Keeper) IterateSubspaceUserGrants(ctx sdk.Context, subspaceID uint64, fn func(grant types.Grant) (stop bool))
IterateSubspaceUserGrants iterates over all the user grants inside the subspace with the given id
func (Keeper) IterateSubspaceUserGroupGrants ¶
func (k Keeper) IterateSubspaceUserGroupGrants(ctx sdk.Context, subspaceID uint64, fn func(grant types.Grant) (stop bool))
IterateSubspaceUserGroupGrants iterates over all the group grants inside the subspace with the given id
func (Keeper) IterateSubspaceUserGroups ¶
func (k Keeper) IterateSubspaceUserGroups(ctx sdk.Context, subspaceID uint64, fn func(group types.UserGroup) (stop bool))
IterateSubspaceUserGroups allows iterating over all the groups that are part of the subspace having the given id
func (Keeper) IterateSubspaceUserPermissions ¶
func (k Keeper) IterateSubspaceUserPermissions(ctx sdk.Context, subspaceID uint64, fn func(entry types.UserPermission) (stop bool))
IterateSubspaceUserPermissions iterates over all the user permissions set for the subspace with the given id
func (Keeper) IterateSubspaces ¶
IterateSubspaces iterates through the subspaces set and performs the given function
func (Keeper) IterateUserGrants ¶
IterateUserGrants iterates through the user grants and performs the given function
func (Keeper) IterateUserGroupGrants ¶
func (k Keeper) IterateUserGroupGrants(ctx sdk.Context, subspaceID uint64, groupID uint32, fn func(grant types.Grant) (stop bool))
IterateUserGroupGrants iterates over all the group grants inside the group with the given id
func (Keeper) IterateUserGroupMembers ¶
func (k Keeper) IterateUserGroupMembers(ctx sdk.Context, subspaceID uint64, groupID uint32, fn func(member string) (stop bool))
IterateUserGroupMembers iterates over all the members of the group with the given id present inside the given subspace
func (Keeper) IterateUserGroups ¶
IterateUserGroups iterates over all the users groups stored
func (Keeper) IterateUserGroupsGrants ¶
IterateUserGroupsGrants iterates through the group grants and performs the given function
func (Keeper) IterateUserGroupsMembers ¶
func (k Keeper) IterateUserGroupsMembers(ctx sdk.Context, fn func(entry types.UserGroupMemberEntry) (stop bool))
IterateUserGroupsMembers iterates over all the group member entries and performs the provided function
func (Keeper) IterateUserPermissions ¶
func (k Keeper) IterateUserPermissions(ctx sdk.Context, fn func(entry types.UserPermission) (stop bool))
IterateUserPermissions iterates over all the stored user permissions
func (Keeper) RemoveUserFromGroup ¶
func (k Keeper) RemoveUserFromGroup(ctx sdk.Context, subspaceID uint64, groupID uint32, user string)
RemoveUserFromGroup removes the specified user from the subspace group having the given id.
func (Keeper) RemoveUserPermissions ¶
func (k Keeper) RemoveUserPermissions(ctx sdk.Context, subspaceID uint64, sectionID uint32, user string)
RemoveUserPermissions removes the permission for the given user inside the provided subspace
func (Keeper) SaveSection ¶
SaveSection saves the given section inside the current context
func (Keeper) SaveSubspace ¶
SaveSubspace saves the given subspace inside the current context.
func (Keeper) SaveUserGroup ¶
SaveUserGroup saves the given user group
func (Keeper) Section ¶
func (k Keeper) Section(ctx context.Context, request *types.QuerySectionRequest) (*types.QuerySectionResponse, error)
Section implements the Query/Section gRPC method
func (Keeper) Sections ¶
func (k Keeper) Sections(ctx context.Context, request *types.QuerySectionsRequest) (*types.QuerySectionsResponse, error)
Sections implements the Query/Sections gRPC method
func (*Keeper) SetHooks ¶
func (k *Keeper) SetHooks(sh types.SubspacesHooks) *Keeper
SetHooks allows to set the subspaces hooks
func (Keeper) SetNextGroupID ¶
SetNextGroupID sets the new group id for the specific subspace to the store
func (Keeper) SetNextSectionID ¶
SetNextSectionID sets the next section id for the specific subspace
func (Keeper) SetSubspaceID ¶
SetSubspaceID sets the new subspace id to the store
func (Keeper) SetUserPermissions ¶
func (k Keeper) SetUserPermissions(ctx sdk.Context, subspaceID uint64, sectionID uint32, user string, permissions types.Permissions)
SetUserPermissions sets the given permission for the specific user inside a single subspace
func (Keeper) Subspace ¶
func (k Keeper) Subspace(ctx context.Context, request *types.QuerySubspaceRequest) (*types.QuerySubspaceResponse, error)
Subspace implements the Query/Subspace gRPC method
func (Keeper) Subspaces ¶
func (k Keeper) Subspaces(ctx context.Context, request *types.QuerySubspacesRequest) (*types.QuerySubspacesResponse, error)
Subspaces implements the Query/Subspaces gRPC method
func (Keeper) UseGrantedFees ¶
func (k Keeper) UseGrantedFees(ctx sdk.Context, subspaceID uint64, grantee sdk.AccAddress, fees sdk.Coins, msgs []sdk.Msg) bool
UseGrantedFees will try to pay the given fees from the treasury account as requested by the grantee. If no valid allowance exists, then returns false to show the fees will not be paid in this phase.
func (Keeper) UseGroupGrantedFees ¶
func (k Keeper) UseGroupGrantedFees(ctx sdk.Context, subspaceID uint64, grantee sdk.AccAddress, fee sdk.Coins, msgs []sdk.Msg) (used bool)
UseGroupGrantedFees will try to use group grant to pay the given fee from the granter's account as requested by the grantee. If no valid allowance exists, then returns false to show the fees will not be paid in this phase.
func (Keeper) UseUserGrantedFees ¶
func (k Keeper) UseUserGrantedFees(ctx sdk.Context, subspaceID uint64, grantee sdk.AccAddress, fees sdk.Coins, msgs []sdk.Msg) (used bool)
UseUserGrantedFees will try to use the user grant to pay the given fees from treasury as requested by the grantee. If no valid allowance exists, then returns false to show the fees will not be paid in this phase.
func (Keeper) UserAllowances ¶
func (k Keeper) UserAllowances(ctx context.Context, request *types.QueryUserAllowancesRequest) (*types.QueryUserAllowancesResponse, error)
UserAllowances implements the Query/UserAllowances gRPC method
func (Keeper) UserGroup ¶
func (k Keeper) UserGroup(ctx context.Context, request *types.QueryUserGroupRequest) (*types.QueryUserGroupResponse, error)
UserGroup implements the Query/UserGroup gRPC method
func (Keeper) UserGroupMembers ¶
func (k Keeper) UserGroupMembers(ctx context.Context, request *types.QueryUserGroupMembersRequest) (*types.QueryUserGroupMembersResponse, error)
UserGroupMembers implements the Query/UserGroupMembers gRPC method
func (Keeper) UserGroups ¶
func (k Keeper) UserGroups(ctx context.Context, request *types.QueryUserGroupsRequest) (*types.QueryUserGroupsResponse, error)
UserGroups implements the Query/UserGroups gRPC method
func (Keeper) UserPermissions ¶
func (k Keeper) UserPermissions(ctx context.Context, request *types.QueryUserPermissionsRequest) (*types.QueryUserPermissionsResponse, error)
UserPermissions implements the Query/UserPermissions gRPC method
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, authzKeeper authzkeeper.Keeper, ak types.AccountKeeper) Migrator
NewMigrator returns a new Migrator
func (Migrator) Migrate1to2 ¶
Migrate1to2 migrates from version 1 to 2.
func (Migrator) Migrate2to3 ¶
Migrate2to3 migrates from version 2 to 3.
func (Migrator) Migrate3to4 ¶
Migrate3to4 migrates from version 3 to 4.
func (Migrator) Migrate4to5 ¶
Migrate4to5 migrates from version 4 to 5.