Documentation
¶
Index ¶
- Constants
- Variables
- func Keccak256(data []byte) *[32]byte
- type AccessObject
- type Index
- func (i *Index) AddEhrDoc(docType types.DocumentType, docMeta *model.DocumentMeta, privKey *[32]byte) ([]byte, error)
- func (i *Index) DataUpdate(ctx context.Context, groupID, dataID, ehrID *uuid.UUID, data []byte) (string, error)
- func (i *Index) DeleteDoc(ctx context.Context, ehrUUID *uuid.UUID, docType types.DocumentType, ...) (string, error)
- func (i *Index) DocAccessSet(ctx context.Context, CID, CIDEncr, keyEncr []byte, accessLevel uint8, ...) ([]byte, error)
- func (i *Index) DocGroupAddDoc(gID *uuid.UUID, docCIDHash *[32]byte, docCIDEncr []byte, userPrivKey *[32]byte) ([]byte, error)
- func (i *Index) DocGroupCreate(ctx context.Context, gID *uuid.UUID, gIDEncr, gKeyEncr, gNameEncr []byte, ...) ([]byte, error)
- func (i *Index) DocGroupGetByID(ctx context.Context, gID *uuid.UUID, userPubKey, userPrivateKey *[32]byte) (*model.DocumentGroup, error)
- func (i *Index) DocGroupGetDocs(ctx context.Context, gID *uuid.UUID) ([][]byte, error)
- func (i *Index) GetAccessKey(ctx context.Context, userIDHash *[32]byte, kind access.Kind, accessID []byte, ...) (*chachaPoly.Key, error)
- func (i *Index) GetAccessList(ctx context.Context, IDHash *[32]byte, kind access.Kind) (access.List, error)
- func (i *Index) GetDocByTime(ctx context.Context, ehrUUID *uuid.UUID, docType types.DocumentType, ...) (*model.DocumentMeta, error)
- func (i *Index) GetDocByVersion(ctx context.Context, ehrUUID *uuid.UUID, docType types.DocumentType, ...) (*model.DocumentMeta, error)
- func (i *Index) GetDocKeyEncrypted(ctx context.Context, userID, systemID string, CID []byte) ([]byte, error)
- func (i *Index) GetDocLastByBaseID(ctx context.Context, userID, systemID string, docType types.DocumentType, ...) (*model.DocumentMeta, error)
- func (i *Index) GetDocLastByType(ctx context.Context, ehrUUID *uuid.UUID, docType types.DocumentType) (*model.DocumentMeta, error)
- func (i *Index) GetEhrUUIDBySubject(ctx context.Context, subjectID, subjectNamespace string) (*uuid.UUID, error)
- func (i *Index) GetEhrUUIDByUserID(ctx context.Context, userID, systemID string) (*uuid.UUID, error)
- func (i *Index) GetTxStatus(ctx context.Context, hash string) (uint64, error)
- func (i *Index) GetUser(ctx context.Context, userAddr common.Address) (*userModel.User, error)
- func (i *Index) GetUserAccess(ctx context.Context, userIDHash *[32]byte, kind access.Kind, accessID []byte) ([]byte, access.Level, error)
- func (i *Index) GetUserByCode(ctx context.Context, code uint64) (*userModel.User, error)
- func (i *Index) GetUserPasswordHash(ctx context.Context, userAddr common.Address) ([]byte, error)
- func (i *Index) ListDocByType(ctx context.Context, userID, systemID string, docType types.DocumentType) ([]model.DocumentMeta, error)
- func (i *Index) MultiCallEhrNew() *MultiCallTx
- func (i *Index) MultiCallUsersNew() *MultiCallTx
- func (i *Index) SendSingle(ctx context.Context, data []byte, kind MulticallKind) (string, error)
- func (i *Index) SetAccess(ctx context.Context, subjectIDHash *[32]byte, accessObj *AccessObject, ...) (string, error)
- func (i *Index) SetAccessWrapper(subjectIDHash *[32]byte, accessObj *AccessObject, userPrivKey *[32]byte) ([]byte, error)
- func (i *Index) SetAllowed(ctx context.Context, address string) (string, error)
- func (i *Index) SetEhrSubject(ctx context.Context, ehrUUID *uuid.UUID, subjectID, subjectNamespace string, ...) ([]byte, error)
- func (i *Index) SetEhrUser(ctx context.Context, userID, systemID string, ehrUUID *uuid.UUID, ...) ([]byte, error)
- func (i *Index) TxWait(ctx context.Context, hash string) (uint64, error)
- func (i *Index) UserGroupAddUser(ctx context.Context, addUserID, addSystemID string, level access.Level, ...) (string, error)
- func (i *Index) UserGroupCreate(ctx context.Context, groupID *uuid.UUID, idEncr, keyEncr, contentEncr []byte, ...) ([]byte, error)
- func (i *Index) UserGroupGetByID(ctx context.Context, groupID *uuid.UUID) (*userModel.UserGroup, error)
- func (i *Index) UserGroupRemoveUser(removeUserID, removeSystemID string, groupID *uuid.UUID, privKey *[32]byte) ([]byte, error)
- func (i *Index) UserNew(ctx context.Context, userID, systemID string, role uint8, ...) ([]byte, error)
- type MultiCallTx
- type MulticallKind
Constants ¶
View Source
const ( ExecutionRevertedNFD = "execution reverted: NFD" ExecutionRevertedDNY = "execution reverted: DNY" ExecutionRevertedAEX = "execution reverted: AEX" )
Variables ¶
View Source
var (
String, _ = abi.NewType("string", "", nil)
Bytes32, _ = abi.NewType("bytes32", "", nil)
Bytes, _ = abi.NewType("bytes", "", nil)
Uint8, _ = abi.NewType("uint8", "", nil)
Uint256, _ = abi.NewType("uint256", "", nil)
Address, _ = abi.NewType("address", "", nil)
Access, _ = abi.NewType("tuple", "", []abi.ArgumentMarshaling{
{Name: "IdHash", Type: "bytes32"},
{Name: "IdEncr", Type: "bytes"},
{Name: "KeyEncr", Type: "bytes"},
{Name: "Level", Type: "uint8"},
})
DocMeta, _ = abi.NewType("tuple", "", []abi.ArgumentMarshaling{
{Name: "docType", Type: "uint8"},
{Name: "status", Type: "uint8"},
{Name: "CID", Type: "bytes"},
{Name: "dealCID", Type: "bytes"},
{Name: "minerAddress", Type: "bytes"},
{Name: "docUIDEncrypted", Type: "bytes"},
{Name: "docBaseUIDHash", Type: "bytes32"},
{Name: "version", Type: "bytes32"},
{Name: "isLast", Type: "bool"},
{Name: "timestamp", Type: "uint32"},
})
)
Functions ¶
Types ¶
type AccessObject ¶
type AccessObject = accessStore.IAccessStoreAccess
type Index ¶
func (*Index) AddEhrDoc ¶
func (i *Index) AddEhrDoc(docType types.DocumentType, docMeta *model.DocumentMeta, privKey *[32]byte) ([]byte, error)
func (*Index) DataUpdate ¶
func (*Index) DocAccessSet ¶
func (*Index) DocGroupAddDoc ¶
func (*Index) DocGroupCreate ¶
func (*Index) DocGroupGetByID ¶
func (*Index) DocGroupGetDocs ¶
Returns: []CIDEncr
func (*Index) GetAccessKey ¶
func (*Index) GetAccessList ¶
func (*Index) GetDocByTime ¶
func (*Index) GetDocByVersion ¶
func (*Index) GetDocKeyEncrypted ¶
func (*Index) GetDocLastByBaseID ¶
func (i *Index) GetDocLastByBaseID(ctx context.Context, userID, systemID string, docType types.DocumentType, UIDHash *[32]byte) (*model.DocumentMeta, error)
func (*Index) GetDocLastByType ¶
func (i *Index) GetDocLastByType(ctx context.Context, ehrUUID *uuid.UUID, docType types.DocumentType) (*model.DocumentMeta, error)
func (*Index) GetEhrUUIDBySubject ¶
func (*Index) GetEhrUUIDByUserID ¶
func (*Index) GetTxStatus ¶
func (*Index) GetUserAccess ¶
func (*Index) GetUserByCode ¶
func (*Index) GetUserPasswordHash ¶
func (*Index) ListDocByType ¶
func (i *Index) ListDocByType(ctx context.Context, userID, systemID string, docType types.DocumentType) ([]model.DocumentMeta, error)
func (*Index) MultiCallEhrNew ¶
func (i *Index) MultiCallEhrNew() *MultiCallTx
func (*Index) MultiCallUsersNew ¶
func (i *Index) MultiCallUsersNew() *MultiCallTx
func (*Index) SendSingle ¶
func (*Index) SetAccessWrapper ¶
func (*Index) SetAllowed ¶
func (*Index) SetEhrSubject ¶
func (*Index) SetEhrUser ¶
func (*Index) UserGroupAddUser ¶
func (*Index) UserGroupCreate ¶
func (*Index) UserGroupGetByID ¶
func (*Index) UserGroupRemoveUser ¶
type MultiCallTx ¶
type MultiCallTx struct {
// contains filtered or unexported fields
}
func (*MultiCallTx) Add ¶
func (m *MultiCallTx) Add(kind uint8, packed []byte)
func (*MultiCallTx) Commit ¶
func (m *MultiCallTx) Commit() (string, error)
func (*MultiCallTx) GetTxKinds ¶
func (m *MultiCallTx) GetTxKinds() []uint8
type MulticallKind ¶
type MulticallKind uint8
const ( MulticallEhr MulticallKind = iota MulticallUsers )
Source Files
¶
Click to show internal directories.
Click to hide internal directories.