Documentation ¶
Index ¶
- Variables
- func AddGroupConfig(groupId, key, tp, value, memo string) (*handlers.AppConfigResult, error)
- func AnnouncedProducers(groupId string) ([]*handlers.AnnouncedProducerListItem, error)
- func AnnouncedUsers(groupId string) ([]*handlers.AnnouncedUserListItem, error)
- func ApproveAnnouncedProducer(groupId string, user *handlers.AnnouncedProducerListItem, removal bool) (*handlers.GrpProducerResult, error)
- func Content(groupId string, opt PagerOpt) (contents *[]ContentStruct, err error)
- func CreateGroup(data CreateGroupReqStruct) ([]byte, error)
- func DelGroupConfig(groupId, key, tp, value, memo string) (*handlers.AppConfigResult, error)
- func GetBlockById(groupId string, id string) (*pb.Block, error)
- func GetChainAllowList(groupId string) ([]*handlers.ChainSendTrxRuleListItem, error)
- func GetChainAuthMode(groupId, trxType string) (*handlers.TrxAuthItem, error)
- func GetChainDenyList(groupId string) ([]*handlers.ChainSendTrxRuleListItem, error)
- func GetGroupConfig(groupId, key string) (*handlers.AppConfigKeyItem, error)
- func GetGroupConfigList(groupId string) ([]*handlers.AppConfigKeyListItem, error)
- func GetGroupSeed(gid string) (*handlers.GroupSeed, error)
- func GetPubQueue(groupId string, trxId string, status string) (*handlers.PubQueueInfo, error)
- func Groups() (groupsInfo *qApi.GroupInfoList, err error)
- func IsQuorumContentMessage(content ContentStruct) bool
- func IsQuorumContentUserInfo(content ContentStruct) bool
- func IsValidApiServer() bool
- func ModifyGroupConfig(action, groupId, key, tp, value, memo string) (*handlers.AppConfigResult, error)
- func Ping() (res *map[string]PingInfoItemStruct, err error)
- func PubQueueAck(trxIds []string) ([]string, error)
- func SetApiServer(apiServer string)
- func TrxInfo(groupId string, trxId string) (trx *pb.Trx, err error)
- func UpdateChainConfig(groupId, tp, config, memo string) (*handlers.ChainConfigResult, error)
- type ApproveGrpUserParam
- type ApproveGrpUserResult
- type BackupResult
- type ContentInnerMsgStruct
- type ContentInnerProfileStruct
- type ContentInnerStruct
- type ContentList
- type ContentReqObjectStruct
- type ContentReqStruct
- type ContentReqTargetStruct
- type ContentRespStruct
- type ContentStruct
- type CreateGroupReqStruct
- type DeleteGroupReqStruct
- type GenesisBlockStruct
- type GroupDelRetStruct
- type GroupForceSyncRetStruct
- type GroupLeaveRetStruct
- type JoinRespStruct
- type LeaveGroupReqStruct
- type NetworkInfoGroupStruct
- type NetworkInfoNodeStruct
- type NetworkInfoStruct
- type NickReqStruct
- type NickRespStruct
- type NodeInfoStruct
- type PagerOpt
- type PingInfoItemStruct
- type QuorumPersonStruct
- type QuorumTargetStruct
- type ReplyToStruct
- type TokenRespStruct
- type TrxRespStruct
- type WalletStruct
Constants ¶
This section is empty.
Variables ¶
View Source
var ApiServer string
Functions ¶
func AddGroupConfig ¶
func AddGroupConfig(groupId, key, tp, value, memo string) (*handlers.AppConfigResult, error)
func AnnouncedProducers ¶
func AnnouncedProducers(groupId string) ([]*handlers.AnnouncedProducerListItem, error)
func AnnouncedUsers ¶
func AnnouncedUsers(groupId string) ([]*handlers.AnnouncedUserListItem, error)
func ApproveAnnouncedProducer ¶
func ApproveAnnouncedProducer(groupId string, user *handlers.AnnouncedProducerListItem, removal bool) (*handlers.GrpProducerResult, error)
func CreateGroup ¶
func CreateGroup(data CreateGroupReqStruct) ([]byte, error)
func DelGroupConfig ¶
func DelGroupConfig(groupId, key, tp, value, memo string) (*handlers.AppConfigResult, error)
func GetChainAllowList ¶
func GetChainAllowList(groupId string) ([]*handlers.ChainSendTrxRuleListItem, error)
/v1/group/:group_id/trx/allowlist
func GetChainAuthMode ¶
func GetChainAuthMode(groupId, trxType string) (*handlers.TrxAuthItem, error)
/v1/group/:group_id/trx/auth/:trx_type
func GetChainDenyList ¶
func GetChainDenyList(groupId string) ([]*handlers.ChainSendTrxRuleListItem, error)
/v1/group/:group_id/trx/denylist
func GetGroupConfig ¶
func GetGroupConfig(groupId, key string) (*handlers.AppConfigKeyItem, error)
func GetGroupConfigList ¶
func GetGroupConfigList(groupId string) ([]*handlers.AppConfigKeyListItem, error)
func GetPubQueue ¶
func Groups ¶
func Groups() (groupsInfo *qApi.GroupInfoList, err error)
func IsQuorumContentMessage ¶
func IsQuorumContentMessage(content ContentStruct) bool
func IsQuorumContentUserInfo ¶
func IsQuorumContentUserInfo(content ContentStruct) bool
func IsValidApiServer ¶
func IsValidApiServer() bool
func ModifyGroupConfig ¶
func ModifyGroupConfig(action, groupId, key, tp, value, memo string) (*handlers.AppConfigResult, error)
func Ping ¶
func Ping() (res *map[string]PingInfoItemStruct, err error)
func PubQueueAck ¶
func SetApiServer ¶
func SetApiServer(apiServer string)
func UpdateChainConfig ¶
func UpdateChainConfig(groupId, tp, config, memo string) (*handlers.ChainConfigResult, error)
/v1/group/chainconfig
Types ¶
type ApproveGrpUserParam ¶
type ApproveGrpUserParam struct { Action string `from:"action" json:"action" validate:"required,oneof=add remove"` UserPubkey string `from:"user_pubkey" json:"user_pubkey" validate:"required"` GroupId string `from:"group_id" json:"group_id" validate:"required"` Memo string `from:"memo" json:"memo"` }
POST approve user
type ApproveGrpUserResult ¶
type ApproveGrpUserResult struct { GroupId string `json:"group_id"` UserPubkey string `json:"user_pubkey"` EncryptPubkey string `json:"encrypt_pubkey"` OwnerPubkey string `json:"owner_pubkey"` Sign string `json:"sign"` TrxId string `json:"trx_id"` Memo string `json:"memo"` Action string `json:"action"` }
func ApproveAnnouncedUser ¶
func ApproveAnnouncedUser(groupId string, user *handlers.AnnouncedUserListItem, removal bool) (*ApproveGrpUserResult, error)
type BackupResult ¶
type BackupResult struct { // encrypt json.Marshal([]GroupSeed) Seeds string `json:"seeds"` Keystore string `json:"keystore"` Config string `json:"config" validate:"required"` }
func DoBackup ¶
func DoBackup() (*BackupResult, error)
type ContentInnerMsgStruct ¶
type ContentInnerMsgStruct struct { Name string `json:"name"` Content string `json:"content"` ReplyTo ReplyToStruct `json:"inreplyto"` }
type ContentInnerProfileStruct ¶
type ContentInnerProfileStruct struct { Name string `json:"name"` Wallet []WalletStruct `json:"wallet"` }
type ContentInnerStruct ¶
type ContentInnerStruct map[string]interface{}
/api/v1/group/$group/content
type ContentList ¶
type ContentList []ContentStruct
func (ContentList) Len ¶
func (a ContentList) Len() int
func (ContentList) Less ¶
func (a ContentList) Less(i, j int) bool
func (ContentList) Swap ¶
func (a ContentList) Swap(i, j int)
type ContentReqObjectStruct ¶
type ContentReqObjectStruct struct { Content string `json:"content"` Name string `json:"name"` Type string `json:"type"` }
POST /api/v1/group/content
type ContentReqStruct ¶
type ContentReqStruct struct { Object ContentReqObjectStruct `json:"object"` Target ContentReqTargetStruct `json:"target"` Type string `json:"type"` }
type ContentReqTargetStruct ¶
type ContentRespStruct ¶
type ContentRespStruct TrxRespStruct
func CreateContent ¶
func CreateContent(groupId string, content string) (*ContentRespStruct, error)
type ContentStruct ¶
type ContentStruct struct { TrxId string `json:"TrxId"` Publisher string `json:"Publisher"` Content ContentInnerStruct `json:"Content"` TypeUrl string `json:"TypeUrl"` TimeStamp int64 `json:"TimeStamp"` }
type CreateGroupReqStruct ¶
type CreateGroupReqStruct struct { Name string `json:"group_name"` ConsensusType string `json:"consensus_type"` // poa(proof of authority) EncryptionType string `json:"encryption_type"` // public | private AppKey string `json:"app_key"` // mode }
POST /api/v1/group
type DeleteGroupReqStruct ¶
type DeleteGroupReqStruct struct {
GroupId string `json:"group_id"`
}
type GenesisBlockStruct ¶
type GenesisBlockStruct struct { BlockId string `json:"BlockId"` GroupId string `json:"GroupId"` BlockNum int `json:"BlockNum"` TimeStamp int64 `json:"TimeStamp"` ProducerId string `json:"ProducerId"` ProducerPubKey string `json:"ProducerPubKey"` Hash string `json:"Hash"` Signature string `json:"Signature"` }
type GroupDelRetStruct ¶
type GroupDelRetStruct struct { GroupId string `json:"group_id"` OwnerPubKey string `json:"owner_pubkey"` Signature string `json:"signature"` }
func DelGroup ¶
func DelGroup(gid string) (*GroupDelRetStruct, error)
type GroupForceSyncRetStruct ¶
func ForceSyncGroup ¶
func ForceSyncGroup(groupId string) (syncRes *GroupForceSyncRetStruct, err error)
type GroupLeaveRetStruct ¶
type GroupLeaveRetStruct struct { GroupId string `json:"group_id"` Signature string `json:"signature"` }
func LeaveGroup ¶
func LeaveGroup(gid string) (*GroupLeaveRetStruct, error)
type JoinRespStruct ¶
POST /api/v1/group/join
func JoinGroup ¶
func JoinGroup(seed string) (*JoinRespStruct, error)
type LeaveGroupReqStruct ¶
type LeaveGroupReqStruct struct {
GroupId string `json:"group_id"`
}
type NetworkInfoGroupStruct ¶
type NetworkInfoGroupStruct struct { GroupId string `json:"GroupId"` GroupName string `json:"GroupName"` Peers []string `json:"Peers"` }
/api/v1/network
type NetworkInfoNodeStruct ¶
type NetworkInfoStruct ¶
type NetworkInfoStruct struct { Groups []NetworkInfoGroupStruct `json:"groups"` Node NetworkInfoNodeStruct `json:"node"` }
func Network ¶
func Network() (networkInfo *NetworkInfoStruct, err error)
type NickReqStruct ¶
type NickReqStruct struct { Person QuorumPersonStruct `json:"person"` Target QuorumTargetStruct `json:"target"` Type string `json:"type"` }
type NickRespStruct ¶
type NickRespStruct TrxRespStruct
type NodeInfoStruct ¶
type NodeInfoStruct struct { NodeId string `json:"node_id"` NodePubKey string `json:"node_publickey"` NodeStatus string `json:"node_status"` NodeType string `json:"node_type"` NodeVersion string `json:"node_version"` Peers map[string][]string `json:"peers"` }
/api/v1/node
func Node ¶
func Node() (*NodeInfoStruct, error)
type PingInfoItemStruct ¶
type PingInfoItemStruct struct { Addrs []string `json:"addrs"` Protocols []string `json:"protocols"` RTT [10]int64 `json:"rtt"` Connections []qApi.AddrProtoPair `json:"connections"` }
GET /api/v1/network/peers/ping
type QuorumPersonStruct ¶
type QuorumPersonStruct struct {
Name string `json:"name"`
}
/api/v1/group/profile
type QuorumTargetStruct ¶
type ReplyToStruct ¶
type ReplyToStruct struct {
TrxId string `json:"trxid"`
}
type TokenRespStruct ¶
type TokenRespStruct struct {
Token string `json:"token"`
}
func TokenApply ¶
func TokenApply() (*TokenRespStruct, error)
type TrxRespStruct ¶
type TrxRespStruct struct {
TrxId string `json:"trx_id"`
}
type WalletStruct ¶
Click to show internal directories.
Click to hide internal directories.