Documentation ¶
Index ¶
- Constants
- Variables
- func GetAddressBytes(user sdk.AccAddress) []byte
- func GetAddressFromBytes(bz []byte) sdk.AccAddress
- func GetGroupIDBytes(groupID uint32) (groupIDBz []byte)
- func GetGroupIDFromBytes(bz []byte) (subspaceID uint32)
- func GetSubspaceIDBytes(subspaceID uint64) (subspaceIDBz []byte)
- func GetSubspaceIDFromBytes(bz []byte) (subspaceID uint64)
- func GroupIDStoreKey(subspaceID uint64) []byte
- func GroupMemberStoreKey(subspaceID uint64, groupID uint32, user sdk.AccAddress) []byte
- func GroupMembersStoreKey(subspaceID uint64, groupID uint32) []byte
- func GroupStoreKey(subspaceID uint64, groupID uint32) []byte
- func GroupsStoreKey(subspaceID uint64) []byte
- func MarshalPermission(permission Permission) (permissionBytes []byte)
- func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.BinaryCodec) error
- func PermissionsStoreKey(subspaceID uint64) []byte
- func RegisterInterfaces(registry types.InterfaceRegistry)
- func SplitUserPermissionKey(key []byte) (subspaceID uint64, user sdk.AccAddress)
- func SubspaceKey(subspaceID uint64) []byte
- func UserPermissionStoreKey(subspaceID uint64, user sdk.AccAddress) []byte
- type GenericSubspaceAuthorization
- func (a GenericSubspaceAuthorization) Accept(ctx sdk.Context, msg sdk.Msg) (authz.AcceptResponse, error)
- func (*GenericSubspaceAuthorization) Descriptor() ([]byte, []int)
- func (m *GenericSubspaceAuthorization) GetMsg() string
- func (m *GenericSubspaceAuthorization) GetSubspacesIDs() []uint64
- func (m *GenericSubspaceAuthorization) Marshal() (dAtA []byte, err error)
- func (m *GenericSubspaceAuthorization) MarshalTo(dAtA []byte) (int, error)
- func (m *GenericSubspaceAuthorization) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (a GenericSubspaceAuthorization) MsgTypeURL() string
- func (*GenericSubspaceAuthorization) ProtoMessage()
- func (m *GenericSubspaceAuthorization) Reset()
- func (m *GenericSubspaceAuthorization) Size() (n int)
- func (m *GenericSubspaceAuthorization) String() string
- func (m *GenericSubspaceAuthorization) Unmarshal(dAtA []byte) error
- func (a GenericSubspaceAuthorization) ValidateBasic() error
- func (m *GenericSubspaceAuthorization) XXX_DiscardUnknown()
- func (m *GenericSubspaceAuthorization) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenericSubspaceAuthorization) XXX_Merge(src proto.Message)
- func (m *GenericSubspaceAuthorization) XXX_Size() int
- func (m *GenericSubspaceAuthorization) XXX_Unmarshal(b []byte) error
- type Permission
- type PermissionDetail
- func (*PermissionDetail) Descriptor() ([]byte, []int)
- func (this *PermissionDetail) Equal(that interface{}) bool
- func (m *PermissionDetail) GetGroup() *PermissionDetail_Group
- func (m *PermissionDetail) GetSum() isPermissionDetail_Sum
- func (m *PermissionDetail) GetUser() *PermissionDetail_User
- func (m *PermissionDetail) Marshal() (dAtA []byte, err error)
- func (m *PermissionDetail) MarshalTo(dAtA []byte) (int, error)
- func (m *PermissionDetail) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PermissionDetail) ProtoMessage()
- func (m *PermissionDetail) Reset()
- func (m *PermissionDetail) Size() (n int)
- func (m *PermissionDetail) String() string
- func (m *PermissionDetail) Unmarshal(dAtA []byte) error
- func (m *PermissionDetail) XXX_DiscardUnknown()
- func (m *PermissionDetail) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PermissionDetail) XXX_Merge(src proto.Message)
- func (*PermissionDetail) XXX_OneofWrappers() []interface{}
- func (m *PermissionDetail) XXX_Size() int
- func (m *PermissionDetail) XXX_Unmarshal(b []byte) error
- type PermissionDetail_Group
- func (*PermissionDetail_Group) Descriptor() ([]byte, []int)
- func (this *PermissionDetail_Group) Equal(that interface{}) bool
- func (m *PermissionDetail_Group) Marshal() (dAtA []byte, err error)
- func (m *PermissionDetail_Group) MarshalTo(dAtA []byte) (int, error)
- func (m *PermissionDetail_Group) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PermissionDetail_Group) ProtoMessage()
- func (m *PermissionDetail_Group) Reset()
- func (m *PermissionDetail_Group) Size() (n int)
- func (m *PermissionDetail_Group) String() string
- func (m *PermissionDetail_Group) Unmarshal(dAtA []byte) error
- func (m *PermissionDetail_Group) XXX_DiscardUnknown()
- func (m *PermissionDetail_Group) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PermissionDetail_Group) XXX_Merge(src proto.Message)
- func (m *PermissionDetail_Group) XXX_Size() int
- func (m *PermissionDetail_Group) XXX_Unmarshal(b []byte) error
- type PermissionDetail_Group_
- type PermissionDetail_User
- func (*PermissionDetail_User) Descriptor() ([]byte, []int)
- func (this *PermissionDetail_User) Equal(that interface{}) bool
- func (m *PermissionDetail_User) Marshal() (dAtA []byte, err error)
- func (m *PermissionDetail_User) MarshalTo(dAtA []byte) (int, error)
- func (m *PermissionDetail_User) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PermissionDetail_User) ProtoMessage()
- func (m *PermissionDetail_User) Reset()
- func (m *PermissionDetail_User) Size() (n int)
- func (m *PermissionDetail_User) String() string
- func (m *PermissionDetail_User) Unmarshal(dAtA []byte) error
- func (m *PermissionDetail_User) XXX_DiscardUnknown()
- func (m *PermissionDetail_User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PermissionDetail_User) XXX_Merge(src proto.Message)
- func (m *PermissionDetail_User) XXX_Size() int
- func (m *PermissionDetail_User) XXX_Unmarshal(b []byte) error
- type PermissionDetail_User_
- type Subspace
- func (*Subspace) Descriptor() ([]byte, []int)
- func (this *Subspace) Equal(that interface{}) bool
- func (m *Subspace) GetCreationTime() time.Time
- func (m *Subspace) GetCreator() string
- func (m *Subspace) GetDescription() string
- func (m *Subspace) GetID() uint64
- func (m *Subspace) GetName() string
- func (m *Subspace) GetOwner() string
- func (m *Subspace) GetTreasury() string
- func (m *Subspace) Marshal() (dAtA []byte, err error)
- func (m *Subspace) MarshalTo(dAtA []byte) (int, error)
- func (m *Subspace) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Subspace) ProtoMessage()
- func (m *Subspace) Reset()
- func (m *Subspace) Size() (n int)
- func (m *Subspace) String() string
- func (m *Subspace) Unmarshal(dAtA []byte) error
- func (m *Subspace) XXX_DiscardUnknown()
- func (m *Subspace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Subspace) XXX_Merge(src proto.Message)
- func (m *Subspace) XXX_Size() int
- func (m *Subspace) XXX_Unmarshal(b []byte) error
- type UserGroup
- func (*UserGroup) Descriptor() ([]byte, []int)
- func (this *UserGroup) Equal(that interface{}) bool
- func (m *UserGroup) GetDescription() string
- func (m *UserGroup) GetID() uint32
- func (m *UserGroup) GetName() string
- func (m *UserGroup) GetPermissions() uint32
- func (m *UserGroup) GetSubspaceID() uint64
- func (m *UserGroup) Marshal() (dAtA []byte, err error)
- func (m *UserGroup) MarshalTo(dAtA []byte) (int, error)
- func (m *UserGroup) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*UserGroup) ProtoMessage()
- func (m *UserGroup) Reset()
- func (m *UserGroup) Size() (n int)
- func (m *UserGroup) String() string
- func (m *UserGroup) Unmarshal(dAtA []byte) error
- func (m *UserGroup) XXX_DiscardUnknown()
- func (m *UserGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *UserGroup) XXX_Merge(src proto.Message)
- func (m *UserGroup) XXX_Size() int
- func (m *UserGroup) XXX_Unmarshal(b []byte) error
Constants ¶
const ( // PermissionNothing represents the permission to do nothing PermissionNothing = Permission(0b000000) // PermissionWrite identifies users that can create content inside the subspace PermissionWrite = Permission(0b000001) // PermissionModerateContent allows users to moderate contents of other users (e.g. deleting it) PermissionModerateContent = Permission(0b000010) // PermissionChangeInfo allows to change the information of the subspace PermissionChangeInfo = Permission(0b000100) // PermissionManageGroups allows users to manage user groups and members PermissionManageGroups = Permission(0b001000) // PermissionSetPermissions allows users to set other users' permissions (except PermissionSetPermissions). // This includes managing user groups and the associated permissions PermissionSetPermissions = Permission(0b010000) // PermissionDeleteSubspace allows users to delete the subspace. PermissionDeleteSubspace = Permission(0b100000) // PermissionEverything allows to do everything. // This should usually be reserved only to the owner (which has it by default) PermissionEverything = Permission(0b111111) )
Variables ¶
var ( ErrInvalidLengthAuthz = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowAuthz = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupAuthz = fmt.Errorf("proto: unexpected end of group") )
Functions ¶
func GetAddressBytes ¶
func GetAddressBytes(user sdk.AccAddress) []byte
func GetAddressFromBytes ¶
func GetAddressFromBytes(bz []byte) sdk.AccAddress
func GetGroupIDBytes ¶
GetGroupIDBytes returns the byte representation of the groupID
func GetGroupIDFromBytes ¶
GetGroupIDFromBytes returns groupID in uint32 format from a byte array
func GetSubspaceIDBytes ¶
GetSubspaceIDBytes returns the byte representation of the subspaceID
func GetSubspaceIDFromBytes ¶
GetSubspaceIDFromBytes returns subspaceID in uint64 format from a byte array
func GroupIDStoreKey ¶
GroupIDStoreKey returns the store key that is used to store the group id to be used next for the given subspace
func GroupMemberStoreKey ¶
func GroupMemberStoreKey(subspaceID uint64, groupID uint32, user sdk.AccAddress) []byte
GroupMemberStoreKey returns the key used to store the membership of the given user to the specified group inside the provided subspace
func GroupMembersStoreKey ¶
GroupMembersStoreKey returns the key used to store all the members of the given group inside the given subspace
func GroupStoreKey ¶
GroupStoreKey returns the key used to store a group for a subspace
func GroupsStoreKey ¶
GroupsStoreKey returns the key used to store all the groups of a given subspace
func MarshalPermission ¶
func MarshalPermission(permission Permission) (permissionBytes []byte)
MarshalPermission marshals the given permission to a byte array
func MigrateStore ¶
func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.BinaryCodec) error
MigrateStore migrates the store from version 1 to version 2. The migration process will fix all user and group permissions sanitizing their values.
func PermissionsStoreKey ¶
PermissionsStoreKey returns the key used to store the entire ACL for a given subspace
func RegisterInterfaces ¶
func RegisterInterfaces(registry types.InterfaceRegistry)
RegisterInterfaces registers the interfaces types with the interface registry
func SplitUserPermissionKey ¶
func SplitUserPermissionKey(key []byte) (subspaceID uint64, user sdk.AccAddress)
SplitUserPermissionKey splits the provided UserPermissionStoreKey into the related subspace id and user address
func SubspaceKey ¶
SubspaceKey returns the key for a specific subspace
func UserPermissionStoreKey ¶
func UserPermissionStoreKey(subspaceID uint64, user sdk.AccAddress) []byte
UserPermissionStoreKey returns the key used to store the permission for the given user inside the given subspace
Types ¶
type GenericSubspaceAuthorization ¶
type GenericSubspaceAuthorization struct { // Ids of the subspaces inside which to grant the permission SubspacesIDs []uint64 `protobuf:"varint,1,rep,packed,name=subspaces_ids,json=subspacesIds,proto3" json:"subspaces_ids,omitempty"` // Msg, identified by it's type URL, to grant unrestricted permissions to // execute within the subspace Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` }
GenericSubspaceAuthorization defines an authorization to perform any operation only inside a specific subspace.
func NewGenericSubspaceAuthorization ¶
func NewGenericSubspaceAuthorization(subspacesIDs []uint64, msgTypeURL string) *GenericSubspaceAuthorization
NewGenericSubspaceAuthorization creates a new GenericSubspaceAuthorization object.
func (GenericSubspaceAuthorization) Accept ¶
func (a GenericSubspaceAuthorization) Accept(ctx sdk.Context, msg sdk.Msg) (authz.AcceptResponse, error)
Accept implements Authorization.Accept.
func (*GenericSubspaceAuthorization) Descriptor ¶
func (*GenericSubspaceAuthorization) Descriptor() ([]byte, []int)
func (*GenericSubspaceAuthorization) GetMsg ¶
func (m *GenericSubspaceAuthorization) GetMsg() string
func (*GenericSubspaceAuthorization) GetSubspacesIDs ¶
func (m *GenericSubspaceAuthorization) GetSubspacesIDs() []uint64
func (*GenericSubspaceAuthorization) Marshal ¶
func (m *GenericSubspaceAuthorization) Marshal() (dAtA []byte, err error)
func (*GenericSubspaceAuthorization) MarshalTo ¶
func (m *GenericSubspaceAuthorization) MarshalTo(dAtA []byte) (int, error)
func (*GenericSubspaceAuthorization) MarshalToSizedBuffer ¶
func (m *GenericSubspaceAuthorization) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (GenericSubspaceAuthorization) MsgTypeURL ¶
func (a GenericSubspaceAuthorization) MsgTypeURL() string
MsgTypeURL implements Authorization.MsgTypeURL.
func (*GenericSubspaceAuthorization) ProtoMessage ¶
func (*GenericSubspaceAuthorization) ProtoMessage()
func (*GenericSubspaceAuthorization) Reset ¶
func (m *GenericSubspaceAuthorization) Reset()
func (*GenericSubspaceAuthorization) Size ¶
func (m *GenericSubspaceAuthorization) Size() (n int)
func (*GenericSubspaceAuthorization) String ¶
func (m *GenericSubspaceAuthorization) String() string
func (*GenericSubspaceAuthorization) Unmarshal ¶
func (m *GenericSubspaceAuthorization) Unmarshal(dAtA []byte) error
func (GenericSubspaceAuthorization) ValidateBasic ¶
func (a GenericSubspaceAuthorization) ValidateBasic() error
ValidateBasic implements Authorization.ValidateBasic.
func (*GenericSubspaceAuthorization) XXX_DiscardUnknown ¶
func (m *GenericSubspaceAuthorization) XXX_DiscardUnknown()
func (*GenericSubspaceAuthorization) XXX_Marshal ¶
func (m *GenericSubspaceAuthorization) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GenericSubspaceAuthorization) XXX_Merge ¶
func (m *GenericSubspaceAuthorization) XXX_Merge(src proto.Message)
func (*GenericSubspaceAuthorization) XXX_Size ¶
func (m *GenericSubspaceAuthorization) XXX_Size() int
func (*GenericSubspaceAuthorization) XXX_Unmarshal ¶
func (m *GenericSubspaceAuthorization) XXX_Unmarshal(b []byte) error
type Permission ¶
type Permission = uint32
Permission represents a permission that can be set to a user or user group
func CombinePermissions ¶
func CombinePermissions(permissions ...Permission) Permission
CombinePermissions combines all the given permissions into a single Permission object using the OR operator
func SanitizePermission ¶
func SanitizePermission(permission Permission) Permission
SanitizePermission sanitizes the given permission to remove any unwanted bits set to 1
func SplitPermissions ¶
func SplitPermissions(permission Permission) []Permission
SplitPermissions splits the given combined permission value into its individual values
func UnmarshalPermission ¶
func UnmarshalPermission(bz []byte) (permission Permission)
UnmarshalPermission reads the given byte array as a Permission object
type PermissionDetail ¶
type PermissionDetail struct { // sum is the oneof that specifies whether this represents a user or // group permission detail // // Types that are valid to be assigned to Sum: // // *PermissionDetail_User_ // *PermissionDetail_Group_ Sum isPermissionDetail_Sum `protobuf_oneof:"sum"` }
PermissionDetail contains the details data of a permission
func (*PermissionDetail) Descriptor ¶
func (*PermissionDetail) Descriptor() ([]byte, []int)
func (*PermissionDetail) Equal ¶
func (this *PermissionDetail) Equal(that interface{}) bool
func (*PermissionDetail) GetGroup ¶
func (m *PermissionDetail) GetGroup() *PermissionDetail_Group
func (*PermissionDetail) GetSum ¶
func (m *PermissionDetail) GetSum() isPermissionDetail_Sum
func (*PermissionDetail) GetUser ¶
func (m *PermissionDetail) GetUser() *PermissionDetail_User
func (*PermissionDetail) Marshal ¶
func (m *PermissionDetail) Marshal() (dAtA []byte, err error)
func (*PermissionDetail) MarshalToSizedBuffer ¶
func (m *PermissionDetail) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PermissionDetail) ProtoMessage ¶
func (*PermissionDetail) ProtoMessage()
func (*PermissionDetail) Reset ¶
func (m *PermissionDetail) Reset()
func (*PermissionDetail) Size ¶
func (m *PermissionDetail) Size() (n int)
func (*PermissionDetail) String ¶
func (m *PermissionDetail) String() string
func (*PermissionDetail) Unmarshal ¶
func (m *PermissionDetail) Unmarshal(dAtA []byte) error
func (*PermissionDetail) XXX_DiscardUnknown ¶
func (m *PermissionDetail) XXX_DiscardUnknown()
func (*PermissionDetail) XXX_Marshal ¶
func (m *PermissionDetail) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PermissionDetail) XXX_Merge ¶
func (m *PermissionDetail) XXX_Merge(src proto.Message)
func (*PermissionDetail) XXX_OneofWrappers ¶
func (*PermissionDetail) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*PermissionDetail) XXX_Size ¶
func (m *PermissionDetail) XXX_Size() int
func (*PermissionDetail) XXX_Unmarshal ¶
func (m *PermissionDetail) XXX_Unmarshal(b []byte) error
type PermissionDetail_Group ¶
type PermissionDetail_Group struct { // Unique id of the group GroupID uint32 `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty" yaml:"group_id"` // Permission set to the group Permission uint32 `protobuf:"varint,2,opt,name=permission,proto3" json:"permission,omitempty"` }
Group is a permission that has been set to a user group
func (*PermissionDetail_Group) Descriptor ¶
func (*PermissionDetail_Group) Descriptor() ([]byte, []int)
func (*PermissionDetail_Group) Equal ¶
func (this *PermissionDetail_Group) Equal(that interface{}) bool
func (*PermissionDetail_Group) Marshal ¶
func (m *PermissionDetail_Group) Marshal() (dAtA []byte, err error)
func (*PermissionDetail_Group) MarshalTo ¶
func (m *PermissionDetail_Group) MarshalTo(dAtA []byte) (int, error)
func (*PermissionDetail_Group) MarshalToSizedBuffer ¶
func (m *PermissionDetail_Group) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PermissionDetail_Group) ProtoMessage ¶
func (*PermissionDetail_Group) ProtoMessage()
func (*PermissionDetail_Group) Reset ¶
func (m *PermissionDetail_Group) Reset()
func (*PermissionDetail_Group) Size ¶
func (m *PermissionDetail_Group) Size() (n int)
func (*PermissionDetail_Group) String ¶
func (m *PermissionDetail_Group) String() string
func (*PermissionDetail_Group) Unmarshal ¶
func (m *PermissionDetail_Group) Unmarshal(dAtA []byte) error
func (*PermissionDetail_Group) XXX_DiscardUnknown ¶
func (m *PermissionDetail_Group) XXX_DiscardUnknown()
func (*PermissionDetail_Group) XXX_Marshal ¶
func (m *PermissionDetail_Group) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PermissionDetail_Group) XXX_Merge ¶
func (m *PermissionDetail_Group) XXX_Merge(src proto.Message)
func (*PermissionDetail_Group) XXX_Size ¶
func (m *PermissionDetail_Group) XXX_Size() int
func (*PermissionDetail_Group) XXX_Unmarshal ¶
func (m *PermissionDetail_Group) XXX_Unmarshal(b []byte) error
type PermissionDetail_Group_ ¶
type PermissionDetail_Group_ struct {
Group *PermissionDetail_Group `protobuf:"bytes,2,opt,name=group,proto3,oneof" json:"group,omitempty"`
}
func (*PermissionDetail_Group_) Equal ¶
func (this *PermissionDetail_Group_) Equal(that interface{}) bool
func (*PermissionDetail_Group_) MarshalTo ¶
func (m *PermissionDetail_Group_) MarshalTo(dAtA []byte) (int, error)
func (*PermissionDetail_Group_) MarshalToSizedBuffer ¶
func (m *PermissionDetail_Group_) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PermissionDetail_Group_) Size ¶
func (m *PermissionDetail_Group_) Size() (n int)
type PermissionDetail_User ¶
type PermissionDetail_User struct { // User for which the permission was set User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty" yaml:"user"` // Permission set to the user Permission uint32 `protobuf:"varint,2,opt,name=permission,proto3" json:"permission,omitempty" yaml:"permission"` }
User is a permission that has been set to a specific user
func (*PermissionDetail_User) Descriptor ¶
func (*PermissionDetail_User) Descriptor() ([]byte, []int)
func (*PermissionDetail_User) Equal ¶
func (this *PermissionDetail_User) Equal(that interface{}) bool
func (*PermissionDetail_User) Marshal ¶
func (m *PermissionDetail_User) Marshal() (dAtA []byte, err error)
func (*PermissionDetail_User) MarshalTo ¶
func (m *PermissionDetail_User) MarshalTo(dAtA []byte) (int, error)
func (*PermissionDetail_User) MarshalToSizedBuffer ¶
func (m *PermissionDetail_User) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PermissionDetail_User) ProtoMessage ¶
func (*PermissionDetail_User) ProtoMessage()
func (*PermissionDetail_User) Reset ¶
func (m *PermissionDetail_User) Reset()
func (*PermissionDetail_User) Size ¶
func (m *PermissionDetail_User) Size() (n int)
func (*PermissionDetail_User) String ¶
func (m *PermissionDetail_User) String() string
func (*PermissionDetail_User) Unmarshal ¶
func (m *PermissionDetail_User) Unmarshal(dAtA []byte) error
func (*PermissionDetail_User) XXX_DiscardUnknown ¶
func (m *PermissionDetail_User) XXX_DiscardUnknown()
func (*PermissionDetail_User) XXX_Marshal ¶
func (m *PermissionDetail_User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PermissionDetail_User) XXX_Merge ¶
func (m *PermissionDetail_User) XXX_Merge(src proto.Message)
func (*PermissionDetail_User) XXX_Size ¶
func (m *PermissionDetail_User) XXX_Size() int
func (*PermissionDetail_User) XXX_Unmarshal ¶
func (m *PermissionDetail_User) XXX_Unmarshal(b []byte) error
type PermissionDetail_User_ ¶
type PermissionDetail_User_ struct {
User *PermissionDetail_User `protobuf:"bytes,1,opt,name=user,proto3,oneof" json:"user,omitempty"`
}
func (*PermissionDetail_User_) Equal ¶
func (this *PermissionDetail_User_) Equal(that interface{}) bool
func (*PermissionDetail_User_) MarshalTo ¶
func (m *PermissionDetail_User_) MarshalTo(dAtA []byte) (int, error)
func (*PermissionDetail_User_) MarshalToSizedBuffer ¶
func (m *PermissionDetail_User_) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PermissionDetail_User_) Size ¶
func (m *PermissionDetail_User_) Size() (n int)
type Subspace ¶
type Subspace struct { // Unique id that identifies the subspace ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` // Human-readable name of the subspace Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty" yaml:"name"` // Optional description of this subspace Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty" yaml:"description"` // Represents the account that is associated with the subspace and // should be used to connect external applications to verify this subspace Treasury string `protobuf:"bytes,4,opt,name=treasury,proto3" json:"treasury,omitempty" yaml:"treasury"` // Address of the user that owns the subspace Owner string `protobuf:"bytes,5,opt,name=owner,proto3" json:"owner,omitempty" yaml:"owner"` // Address of the subspace creator Creator string `protobuf:"bytes,6,opt,name=creator,proto3" json:"creator,omitempty" yaml:"creator"` // the creation time of the subspace CreationTime time.Time `protobuf:"bytes,7,opt,name=creation_time,json=creationTime,proto3,stdtime" json:"creation_time" yaml:"creation_time"` }
Subspace contains all the data of a Desmos subspace
func (*Subspace) Descriptor ¶
func (*Subspace) GetCreationTime ¶
func (*Subspace) GetCreator ¶
func (*Subspace) GetDescription ¶
func (*Subspace) GetTreasury ¶
func (*Subspace) MarshalToSizedBuffer ¶
func (*Subspace) ProtoMessage ¶
func (*Subspace) ProtoMessage()
func (*Subspace) XXX_DiscardUnknown ¶
func (m *Subspace) XXX_DiscardUnknown()
func (*Subspace) XXX_Marshal ¶
func (*Subspace) XXX_Unmarshal ¶
type UserGroup ¶
type UserGroup struct { // ID of the subspace inside which this group exists SubspaceID uint64 `protobuf:"varint,1,opt,name=subspace_id,json=subspaceId,proto3" json:"subspace_id,omitempty" yaml:"subspace_id"` // Unique id that identifies the group ID uint32 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` // Human-readable name of the user group Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty" yaml:"name"` // Optional description of this group Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty" yaml:"description"` // Permissions that will be granted to all the users part of this group Permissions uint32 `protobuf:"varint,5,opt,name=permissions,proto3" json:"permissions,omitempty" yaml:"permissions"` }
UserGroup represents a group of users
func NewUserGroup ¶
func NewUserGroup(subspaceID uint64, id uint32, name, description string, permissions Permission) UserGroup
NewUserGroup returns a new UserGroup instance
func (*UserGroup) Descriptor ¶
func (*UserGroup) GetDescription ¶
func (*UserGroup) GetPermissions ¶
func (*UserGroup) GetSubspaceID ¶
func (*UserGroup) MarshalToSizedBuffer ¶
func (*UserGroup) ProtoMessage ¶
func (*UserGroup) ProtoMessage()
func (*UserGroup) XXX_DiscardUnknown ¶
func (m *UserGroup) XXX_DiscardUnknown()