Documentation ¶
Overview ¶
Package frostfsid
FrostFSID contract is a contract deployed in FrostFS sidechain.
Contract notifications ¶
FrostFSID contract does not produce notifications to process.
Contract storage scheme ¶
| Key | Value | Description | |------------------------------------------------------------------------------|--------------------------------|-----------------------------------------------| | `o` + [ owner address ] | []byte{1} | contract owners that can invoke write methods | | `s` + [ subject address ] | Serialized Subject structure | subject into | | `a` + [ pk address ] + [ subject address ] | []byte{1} | link extra public keys for subject | | `n` + [ RIPEMD160 of namespace ] | Serialized Namespace structure | namespace info | | `N` + [ RIPEMD160 of namespace ] + [ subject address ] | []byte{1} | subject that belongs to the namespace | | `l` + [ RIPEMD160 of namespace ] + [ RIPEMD160 of subject name ] | Subject public key | subject name to public key index | | `g` + [ RIPEMD160 of namespace ] + [ 8 byte group id ] | Serialized Group structure | group into | | `G` + [ RIPEMD160 of namespace ] + [ 8 byte group id ] + [ subject address ] | []byte{1} | subject that belongs to the group | | `c` | Int | group id counter | | `m` + [ RIPEMD160 of namespace ] + [ RIPEMD160 of subject name ] | Serialized group id int | group name to group id index |
Index ¶
- func AddSubjectKey(addr interop.Hash160, key interop.PublicKey)
- func AddSubjectToGroup(addr interop.Hash160, groupID int)
- func ClearAdmin()
- func CreateGroup(ns, group string) int
- func CreateNamespace(ns string)
- func CreateSubject(ns string, key interop.PublicKey)
- func DeleteGroup(ns string, groupID int)
- func DeleteGroupKV(ns string, groupID int, key string)
- func DeleteSubject(addr interop.Hash160)
- func DeleteSubjectKV(addr interop.Hash160, key string)
- func GetAdmin() interop.Hash160
- func GetGroupIDByName(ns, name string) int
- func GetSubjectKeyByName(ns, name string) interop.PublicKey
- func ListGroupSubjects(ns string, groupID int) iterator.Iterator
- func ListGroups(ns string) iterator.Iterator
- func ListNamespaceSubjects(ns string) iterator.Iterator
- func ListNamespaces() iterator.Iterator
- func ListSubjects() iterator.Iterator
- func RemoveSubjectFromGroup(addr interop.Hash160, groupID int)
- func RemoveSubjectKey(addr interop.Hash160, key interop.PublicKey)
- func SetAdmin(addr interop.Hash160)
- func SetGroupKV(ns string, groupID int, key, val string)
- func SetGroupName(ns string, groupID int, name string)
- func SetSubjectKV(addr interop.Hash160, key, val string)
- func SetSubjectName(addr interop.Hash160, name string)
- func Update(script []byte, manifest []byte, data any)
- func Version() int
- type Group
- type GroupExtended
- type Namespace
- type NamespaceExtended
- type Subject
- type SubjectExtended
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddSubjectKey ¶ added in v0.19.0
func AddSubjectToGroup ¶ added in v0.19.0
func ClearAdmin ¶ added in v0.19.0
func ClearAdmin()
func CreateGroup ¶ added in v0.19.0
func CreateNamespace ¶ added in v0.19.0
func CreateNamespace(ns string)
func CreateSubject ¶ added in v0.19.0
func DeleteGroup ¶ added in v0.19.0
func DeleteGroupKV ¶ added in v0.19.0
func DeleteSubject ¶ added in v0.19.0
func DeleteSubjectKV ¶ added in v0.19.0
func GetGroupIDByName ¶ added in v0.19.0
func GetSubjectKeyByName ¶ added in v0.19.0
func ListGroupSubjects ¶ added in v0.19.0
func ListGroups ¶ added in v0.19.0
func ListNamespaceSubjects ¶ added in v0.19.0
func ListNamespaces ¶ added in v0.19.0
func ListSubjects ¶ added in v0.19.0
func RemoveSubjectFromGroup ¶ added in v0.19.0
func RemoveSubjectKey ¶ added in v0.19.0
func SetGroupKV ¶ added in v0.19.0
func SetGroupName ¶ added in v0.19.0
func SetSubjectKV ¶ added in v0.19.0
func SetSubjectName ¶ added in v0.19.0
Types ¶
type Group ¶ added in v0.19.0
func GetGroupByName ¶ added in v0.19.0
type GroupExtended ¶ added in v0.19.0
type GroupExtended struct { ID int Name string Namespace string KV map[string]string SubjectsCount int }
func GetGroupExtended ¶ added in v0.19.0
func GetGroupExtended(ns string, groupID int) GroupExtended
type Namespace ¶ added in v0.19.0
type Namespace struct {
Name string
}
func GetNamespace ¶ added in v0.19.0
type NamespaceExtended ¶ added in v0.19.0
func GetNamespaceExtended ¶ added in v0.19.0
func GetNamespaceExtended(ns string) NamespaceExtended
type Subject ¶ added in v0.19.0
type Subject struct { PrimaryKey interop.PublicKey AdditionalKeys []interop.PublicKey Namespace string Name string KV map[string]string }
func GetSubject ¶ added in v0.19.0
func GetSubjectByKey ¶ added in v0.19.0
func GetSubjectByName ¶ added in v0.19.0
type SubjectExtended ¶ added in v0.19.0
type SubjectExtended struct { PrimaryKey interop.PublicKey AdditionalKeys []interop.PublicKey Namespace string Name string KV map[string]string Groups []Group }
func GetSubjectExtended ¶ added in v0.19.0
func GetSubjectExtended(addr interop.Hash160) SubjectExtended
Click to show internal directories.
Click to hide internal directories.