Documentation ¶
Index ¶
- Constants
- func BuildURL(uri string) string
- func GetCertifiedModel(vid uint16, pid uint16, softwareVersion uint32, ...) (compliance.ComplianceInfoInState, int)
- func GetComplianceInfo(vid uint16, pid uint16, softwareVersion uint32, ...) (compliance.ComplianceInfo, int)
- func GetModel(vid uint16, pid uint16) (model.Model, int)
- func GetModelVersion(vid uint16, pid uint16, softwareVersion uint32) (model.ModelVersion, int)
- func GetProposedX509RootCert(subject string, subjectKeyID string) (pki.ProposedCertificate, int)
- func GetProposedX509RootCertToRevoke(subject string, subjectKeyID string) (pki.ProposedCertificateRevocation, int)
- func GetRevokedModel(vid uint16, pid uint16, softwareVersion uint32, ...) (compliance.ComplianceInfoInState, int)
- func GetRevokedX509Cert(subject string, subjectKeyID string) (pki.Certificate, int)
- func GetTestingResult(vid uint16, pid uint16, softwareVersion uint32) (compliancetest.TestingResults, int)
- func GetVendorModels(vid uint16) (model.VendorProducts, int)
- func GetX509Cert(subject string, subjectKeyID string) (pki.Certificate, int)
- func GetX509CertChain(subject string, subjectKeyID string) (pki.Certificates, int)
- func InitStartData() (KeyInfo, KeyInfo, model.MsgAddModel, model.MsgAddModelVersion, ...)
- func NewMsgAddModel(owner sdk.AccAddress, vid uint16) model.MsgAddModel
- func NewMsgAddModelVersion(vid uint16, pid uint16, softwareVersion uint32, softwareVersionString string, ...) model.MsgAddModelVersion
- func NewMsgAddTestingResult(vid uint16, pid uint16, softwareVersion uint32, softwareVersionString string, ...) compliancetest.MsgAddTestingResult
- func NewMsgUpdateModel(vid uint16, pid uint16, owner sdk.AccAddress) model.MsgUpdateModel
- func NewMsgUpdateModelVersion(vid uint16, pid uint16, softwareVersion uint32, softwareVersionString string, ...) model.MsgUpdateModelVersion
- func ParseUint(num string) uint64
- func PrepareAddModelTransaction(model model.MsgAddModel) (types.StdTx, int)
- func PrepareAddModelVersionTransaction(modelVersion model.MsgAddModelVersion) (types.StdTx, int)
- func PrepareAddX509CertTransaction(addX509Cert pki.MsgAddX509Cert) (types.StdTx, int)
- func PrepareApproveAddX509RootCertTransaction(approveAddX509RootCert pki.MsgApproveAddX509RootCert) (types.StdTx, int)
- func PrepareApproveRevokeX509RootCertTransaction(approveRevokeX509RootCert pki.MsgApproveRevokeX509RootCert) (types.StdTx, int)
- func PrepareCertifiedModelTransaction(certifyModel compliance.MsgCertifyModel) (types.StdTx, int)
- func PrepareProposeAddX509RootCertTransaction(proposeAddX509RootCert pki.MsgProposeAddX509RootCert) (types.StdTx, int)
- func PrepareProposeRevokeX509RootCertTransaction(proposeRevokeX509RootCert pki.MsgProposeRevokeX509RootCert) (types.StdTx, int)
- func PrepareRevokeX509CertTransaction(revokeX509Cert pki.MsgRevokeX509Cert) (types.StdTx, int)
- func PrepareRevokedModelTransaction(revokeModel compliance.MsgRevokeModel) (types.StdTx, int)
- func PrepareTestingResultTransaction(testingResult compliancetest.MsgAddTestingResult) (types.StdTx, int)
- func PrepareUpdateModelTransaction(model model.MsgUpdateModel) (types.StdTx, int)
- func PrepareUpdateModelVersionTransaction(modelVersion model.MsgUpdateModelVersion) (types.StdTx, int)
- func RandString() string
- func ReadResponseBody(resp *http.Response) []byte
- func SendAddModelRequest(msgAddModel model.MsgAddModel, account string) ([]byte, int)
- func SendAddModelVersionRequest(msgAddModelVersion model.MsgAddModelVersion, account string) ([]byte, int)
- func SendAddX509CertRequest(addX509Cert pki.MsgAddX509Cert, account string, passphrase string) ([]byte, int)
- func SendApproveAddX509RootCertRequest(approveAddX509RootCert pki.MsgApproveAddX509RootCert, account string, ...) ([]byte, int)
- func SendApproveRevokeX509RootCertRequest(approveRevokeX509RootCert pki.MsgApproveRevokeX509RootCert, account string, ...) ([]byte, int)
- func SendCertifiedModelRequest(certifyModel compliance.MsgCertifyModel, name string) ([]byte, int)
- func SendDeleteRequest(uri string, body []byte, account string, passphrase string) ([]byte, int)
- func SendGetRequest(uri string) ([]byte, int)
- func SendPatchRequest(uri string, body []byte, account string, passphrase string) ([]byte, int)
- func SendPostRequest(uri string, body []byte, account string, passphrase string) ([]byte, int)
- func SendProposeAddX509RootCertRequest(proposeAddX509RootCert pki.MsgProposeAddX509RootCert, account string, ...) ([]byte, int)
- func SendProposeRevokeX509RootCertRequest(proposeRevokeX509RootCert pki.MsgProposeRevokeX509RootCert, account string, ...) ([]byte, int)
- func SendPutRequest(uri string, body []byte, account string, passphrase string) ([]byte, int)
- func SendRevokeX509CertRequest(revokeX509Cert pki.MsgRevokeX509Cert, account string, passphrase string) ([]byte, int)
- func SendRevokedModelRequest(revokeModel compliance.MsgRevokeModel, name string) ([]byte, int)
- func SendTestingResultRequest(testingResult compliancetest.MsgAddTestingResult, name string) ([]byte, int)
- func SendUpdateModelRequest(msgUpdateModel model.MsgUpdateModel, account string) ([]byte, int)
- func SendUpdateModelVersionRequest(msgUpdateModelVersion model.MsgUpdateModelVersion, account string) ([]byte, int)
- func SignMessage(sender KeyInfo, txn types.StdTx) (json.RawMessage, int)
- type AccountHeadersResult
- type AccountInfo
- type CertificatesHeadersResult
- func GetAllRevokedX509Certs() (CertificatesHeadersResult, int)
- func GetAllRevokedX509RootCerts() (CertificatesHeadersResult, int)
- func GetAllSubjectX509Certs(subject string) (CertificatesHeadersResult, int)
- func GetAllX509Certs() (CertificatesHeadersResult, int)
- func GetAllX509RootCerts() (CertificatesHeadersResult, int)
- type ComplianceInfosHeadersResult
- type KeyInfo
- type ModelHeadersResult
- type PendingAccountInfo
- type ProposedAccountHeadersResult
- type ProposedAccountToRevokeHeadersResult
- type ProposedCertificateRevocationsHeadersResult
- type ProposedCertificatesHeadersResult
- type ResponseWrapper
- type TxnResponse
- func AddModel(model model.MsgAddModel, sender KeyInfo) (TxnResponse, int)
- func AddModelVersion(modelVersion model.MsgAddModelVersion, sender KeyInfo) (TxnResponse, int)
- func AddX509Cert(addX509Cert pki.MsgAddX509Cert, account string, passphrase string) (TxnResponse, int)
- func ApproveAddAccount(keyInfo KeyInfo, signer KeyInfo) (TxnResponse, int)
- func ApproveAddX509RootCert(approveAddX509RootCert pki.MsgApproveAddX509RootCert, account string, ...) (TxnResponse, int)
- func ApproveRevokeAccount(keyInfo KeyInfo, signer KeyInfo) (TxnResponse, int)
- func ApproveRevokeX509RootCert(approveRevokeX509RootCert pki.MsgApproveRevokeX509RootCert, account string, ...) (TxnResponse, int)
- func BroadcastMessage(message interface{}) (TxnResponse, int)
- func ProposeAddAccount(keyInfo KeyInfo, signer KeyInfo, roles auth.AccountRoles, vendorID uint16) (TxnResponse, int)
- func ProposeAddX509RootCert(proposeAddX509RootCert pki.MsgProposeAddX509RootCert, account string, ...) (TxnResponse, int)
- func ProposeRevokeAccount(keyInfo KeyInfo, signer KeyInfo) (TxnResponse, int)
- func ProposeRevokeX509RootCert(proposeRevokeX509RootCert pki.MsgProposeRevokeX509RootCert, account string, ...) (TxnResponse, int)
- func PublishCertifiedModel(certifyModel compliance.MsgCertifyModel, sender KeyInfo) (TxnResponse, int)
- func PublishRevokedModel(revokeModel compliance.MsgRevokeModel, sender KeyInfo) (TxnResponse, int)
- func PublishTestingResult(testingResult compliancetest.MsgAddTestingResult, sender KeyInfo) (TxnResponse, int)
- func RevokeX509Cert(revokeX509Cert pki.MsgRevokeX509Cert, account string, passphrase string) (TxnResponse, int)
- func SignAndBroadcastMessage(sender KeyInfo, message sdk.Msg) (TxnResponse, int)
- func SignAndBroadcastTransaction(sender KeyInfo, txn types.StdTx) (TxnResponse, int)
- func UpdateModel(model model.MsgUpdateModel, sender KeyInfo) (TxnResponse, int)
- func UpdateModelVersion(modelVersion model.MsgUpdateModelVersion, sender KeyInfo) (TxnResponse, int)
- type VendorItemHeadersResult
Constants ¶
View Source
const (
BaseURL = "http://127.0.0.1:1317"
)
Variables ¶
This section is empty.
Functions ¶
func GetCertifiedModel ¶
func GetCertifiedModel(vid uint16, pid uint16, softwareVersion uint32, certificationType compliance.CertificationType) (compliance.ComplianceInfoInState, int)
func GetComplianceInfo ¶
func GetComplianceInfo(vid uint16, pid uint16, softwareVersion uint32, certificationType compliance.CertificationType) (compliance.ComplianceInfo, int)
func GetModelVersion ¶
func GetProposedX509RootCert ¶
func GetProposedX509RootCert(subject string, subjectKeyID string) (pki.ProposedCertificate, int)
func GetProposedX509RootCertToRevoke ¶
func GetProposedX509RootCertToRevoke(subject string, subjectKeyID string) (pki.ProposedCertificateRevocation, int)
func GetRevokedModel ¶
func GetRevokedModel(vid uint16, pid uint16, softwareVersion uint32, certificationType compliance.CertificationType) (compliance.ComplianceInfoInState, int)
func GetRevokedX509Cert ¶
func GetRevokedX509Cert(subject string, subjectKeyID string) (pki.Certificate, int)
func GetTestingResult ¶
func GetTestingResult(vid uint16, pid uint16, softwareVersion uint32) (compliancetest.TestingResults, int)
func GetVendorModels ¶
func GetVendorModels(vid uint16) (model.VendorProducts, int)
func GetX509Cert ¶
func GetX509Cert(subject string, subjectKeyID string) (pki.Certificate, int)
func GetX509CertChain ¶
func GetX509CertChain(subject string, subjectKeyID string) (pki.Certificates, int)
func InitStartData ¶
func InitStartData() (KeyInfo, KeyInfo, model.MsgAddModel, model.MsgAddModelVersion, ComplianceInfosHeadersResult, ComplianceInfosHeadersResult)
func NewMsgAddModel ¶
func NewMsgAddModel(owner sdk.AccAddress, vid uint16) model.MsgAddModel
func NewMsgAddModelVersion ¶
func NewMsgAddModelVersion(vid uint16, pid uint16, softwareVersion uint32, softwareVersionString string, owner sdk.AccAddress) model.MsgAddModelVersion
func NewMsgAddTestingResult ¶
func NewMsgAddTestingResult(vid uint16, pid uint16, softwareVersion uint32, softwareVersionString string, owner sdk.AccAddress) compliancetest.MsgAddTestingResult
func NewMsgUpdateModel ¶
func NewMsgUpdateModel(vid uint16, pid uint16, owner sdk.AccAddress) model.MsgUpdateModel
func NewMsgUpdateModelVersion ¶
func NewMsgUpdateModelVersion(vid uint16, pid uint16, softwareVersion uint32, softwareVersionString string, owner sdk.AccAddress) model.MsgUpdateModelVersion
func PrepareAddModelTransaction ¶
func PrepareAddModelTransaction(model model.MsgAddModel) (types.StdTx, int)
func PrepareAddModelVersionTransaction ¶
func PrepareAddModelVersionTransaction(modelVersion model.MsgAddModelVersion) (types.StdTx, int)
func PrepareAddX509CertTransaction ¶
func PrepareAddX509CertTransaction(addX509Cert pki.MsgAddX509Cert) (types.StdTx, int)
func PrepareApproveAddX509RootCertTransaction ¶
func PrepareApproveAddX509RootCertTransaction( approveAddX509RootCert pki.MsgApproveAddX509RootCert) (types.StdTx, int)
func PrepareApproveRevokeX509RootCertTransaction ¶
func PrepareApproveRevokeX509RootCertTransaction( approveRevokeX509RootCert pki.MsgApproveRevokeX509RootCert) (types.StdTx, int)
func PrepareCertifiedModelTransaction ¶
func PrepareCertifiedModelTransaction(certifyModel compliance.MsgCertifyModel) (types.StdTx, int)
func PrepareProposeAddX509RootCertTransaction ¶
func PrepareProposeAddX509RootCertTransaction(proposeAddX509RootCert pki.MsgProposeAddX509RootCert) (types.StdTx, int)
func PrepareProposeRevokeX509RootCertTransaction ¶
func PrepareProposeRevokeX509RootCertTransaction( proposeRevokeX509RootCert pki.MsgProposeRevokeX509RootCert) (types.StdTx, int)
func PrepareRevokeX509CertTransaction ¶
func PrepareRevokeX509CertTransaction(revokeX509Cert pki.MsgRevokeX509Cert) (types.StdTx, int)
func PrepareRevokedModelTransaction ¶
func PrepareRevokedModelTransaction(revokeModel compliance.MsgRevokeModel) (types.StdTx, int)
func PrepareTestingResultTransaction ¶
func PrepareTestingResultTransaction(testingResult compliancetest.MsgAddTestingResult) (types.StdTx, int)
func PrepareUpdateModelTransaction ¶
func PrepareUpdateModelTransaction(model model.MsgUpdateModel) (types.StdTx, int)
func PrepareUpdateModelVersionTransaction ¶
func PrepareUpdateModelVersionTransaction(modelVersion model.MsgUpdateModelVersion) (types.StdTx, int)
func RandString ¶
func RandString() string
func ReadResponseBody ¶
func SendAddModelRequest ¶
func SendAddModelRequest(msgAddModel model.MsgAddModel, account string) ([]byte, int)
func SendAddModelVersionRequest ¶
func SendAddModelVersionRequest(msgAddModelVersion model.MsgAddModelVersion, account string) ([]byte, int)
func SendAddX509CertRequest ¶
func SendCertifiedModelRequest ¶
func SendCertifiedModelRequest(certifyModel compliance.MsgCertifyModel, name string) ([]byte, int)
func SendDeleteRequest ¶
func SendGetRequest ¶
func SendPatchRequest ¶
func SendPostRequest ¶
func SendPutRequest ¶
func SendRevokedModelRequest ¶
func SendRevokedModelRequest(revokeModel compliance.MsgRevokeModel, name string) ([]byte, int)
func SendTestingResultRequest ¶
func SendTestingResultRequest(testingResult compliancetest.MsgAddTestingResult, name string) ([]byte, int)
func SendUpdateModelRequest ¶
func SendUpdateModelRequest(msgUpdateModel model.MsgUpdateModel, account string) ([]byte, int)
func SendUpdateModelVersionRequest ¶
func SendUpdateModelVersionRequest(msgUpdateModelVersion model.MsgUpdateModelVersion, account string) ([]byte, int)
func SignMessage ¶
Types ¶
type AccountHeadersResult ¶
type AccountHeadersResult struct { Total string `json:"total"` Items []AccountInfo `json:"items"` }
func GetAccounts ¶
func GetAccounts() (AccountHeadersResult, int)
type AccountInfo ¶
type AccountInfo struct { Address sdk.AccAddress `json:"address"` AccountNumber string `json:"account_number"` Sequence string `json:"sequence"` Roles auth.AccountRoles `json:"roles"` }
func GetAccount ¶
func GetAccount(address sdk.AccAddress) (AccountInfo, int)
type CertificatesHeadersResult ¶
type CertificatesHeadersResult struct { Total string `json:"total"` Items []pki.Certificate `json:"items"` }
func GetAllRevokedX509Certs ¶
func GetAllRevokedX509Certs() (CertificatesHeadersResult, int)
func GetAllRevokedX509RootCerts ¶
func GetAllRevokedX509RootCerts() (CertificatesHeadersResult, int)
func GetAllSubjectX509Certs ¶
func GetAllSubjectX509Certs(subject string) (CertificatesHeadersResult, int)
func GetAllX509Certs ¶
func GetAllX509Certs() (CertificatesHeadersResult, int)
func GetAllX509RootCerts ¶
func GetAllX509RootCerts() (CertificatesHeadersResult, int)
type ComplianceInfosHeadersResult ¶
type ComplianceInfosHeadersResult struct { Total string `json:"total"` Items []compliance.ComplianceInfo `json:"items"` }
func GetAllCertifiedModels ¶
func GetAllCertifiedModels() (ComplianceInfosHeadersResult, int)
func GetAllComplianceInfos ¶
func GetAllComplianceInfos(state string) (ComplianceInfosHeadersResult, int)
func GetAllRevokedModels ¶
func GetAllRevokedModels() (ComplianceInfosHeadersResult, int)
func GetComplianceInfos ¶
func GetComplianceInfos() (ComplianceInfosHeadersResult, int)
type KeyInfo ¶
type KeyInfo struct { Name string `json:"name"` Type string `json:"type"` Address sdk.AccAddress `json:"address"` PublicKey string `json:"pubkey"` }
func CreateNewAccount ¶
func CreateNewAccount(roles auth.AccountRoles, vendorID uint16) KeyInfo
func GetKeyInfo ¶
type ModelHeadersResult ¶
type ModelHeadersResult struct { Total string `json:"total"` Items []model.ModelItem `json:"items"` }
func GetModels ¶
func GetModels() (ModelHeadersResult, int)
type PendingAccountInfo ¶
type PendingAccountInfo struct { Address sdk.AccAddress `json:"address"` Roles auth.AccountRoles `json:"roles"` Approvals []sdk.AccAddress `json:"approvals"` }
type ProposedAccountHeadersResult ¶
type ProposedAccountHeadersResult struct { Total string `json:"total"` Items []PendingAccountInfo `json:"items"` }
func GetProposedAccounts ¶
func GetProposedAccounts() (ProposedAccountHeadersResult, int)
type ProposedAccountToRevokeHeadersResult ¶
type ProposedAccountToRevokeHeadersResult struct { Total string `json:"total"` Items []auth.PendingAccountRevocation `json:"items"` }
func GetProposedAccountsToRevoke ¶
func GetProposedAccountsToRevoke() (ProposedAccountToRevokeHeadersResult, int)
type ProposedCertificateRevocationsHeadersResult ¶
type ProposedCertificateRevocationsHeadersResult struct { Total string `json:"total"` Items []pki.ProposedCertificateRevocation `json:"items"` }
func GetAllProposedX509RootCertsToRevoke ¶
func GetAllProposedX509RootCertsToRevoke() (ProposedCertificateRevocationsHeadersResult, int)
type ProposedCertificatesHeadersResult ¶
type ProposedCertificatesHeadersResult struct { Total string `json:"total"` Items []pki.ProposedCertificate `json:"items"` }
func GetAllProposedX509RootCerts ¶
func GetAllProposedX509RootCerts() (ProposedCertificatesHeadersResult, int)
type ResponseWrapper ¶
type ResponseWrapper struct { Height string `json:"height"` Result json.RawMessage `json:"result"` }
type TxnResponse ¶
type TxnResponse struct { Height string `json:"height"` TxHash string `json:"txhash"` Code int `json:"code"` }
func AddModel ¶
func AddModel(model model.MsgAddModel, sender KeyInfo) (TxnResponse, int)
func AddModelVersion ¶
func AddModelVersion(modelVersion model.MsgAddModelVersion, sender KeyInfo) (TxnResponse, int)
func AddX509Cert ¶
func AddX509Cert(addX509Cert pki.MsgAddX509Cert, account string, passphrase string) (TxnResponse, int)
func ApproveAddAccount ¶
func ApproveAddAccount(keyInfo KeyInfo, signer KeyInfo) (TxnResponse, int)
func ApproveAddX509RootCert ¶
func ApproveAddX509RootCert(approveAddX509RootCert pki.MsgApproveAddX509RootCert, account string, passphrase string) (TxnResponse, int)
func ApproveRevokeAccount ¶
func ApproveRevokeAccount(keyInfo KeyInfo, signer KeyInfo) (TxnResponse, int)
func ApproveRevokeX509RootCert ¶
func ApproveRevokeX509RootCert(approveRevokeX509RootCert pki.MsgApproveRevokeX509RootCert, account string, passphrase string) (TxnResponse, int)
func BroadcastMessage ¶
func BroadcastMessage(message interface{}) (TxnResponse, int)
func ProposeAddAccount ¶
func ProposeAddAccount(keyInfo KeyInfo, signer KeyInfo, roles auth.AccountRoles, vendorID uint16) (TxnResponse, int)
func ProposeAddX509RootCert ¶
func ProposeAddX509RootCert(proposeAddX509RootCert pki.MsgProposeAddX509RootCert, account string, passphrase string) (TxnResponse, int)
func ProposeRevokeAccount ¶
func ProposeRevokeAccount(keyInfo KeyInfo, signer KeyInfo) (TxnResponse, int)
func ProposeRevokeX509RootCert ¶
func ProposeRevokeX509RootCert(proposeRevokeX509RootCert pki.MsgProposeRevokeX509RootCert, account string, passphrase string) (TxnResponse, int)
func PublishCertifiedModel ¶
func PublishCertifiedModel(certifyModel compliance.MsgCertifyModel, sender KeyInfo) (TxnResponse, int)
func PublishRevokedModel ¶
func PublishRevokedModel(revokeModel compliance.MsgRevokeModel, sender KeyInfo) (TxnResponse, int)
func PublishTestingResult ¶
func PublishTestingResult(testingResult compliancetest.MsgAddTestingResult, sender KeyInfo) (TxnResponse, int)
func RevokeX509Cert ¶
func RevokeX509Cert(revokeX509Cert pki.MsgRevokeX509Cert, account string, passphrase string) (TxnResponse, int)
func SignAndBroadcastMessage ¶
func SignAndBroadcastMessage(sender KeyInfo, message sdk.Msg) (TxnResponse, int)
func SignAndBroadcastTransaction ¶
func SignAndBroadcastTransaction(sender KeyInfo, txn types.StdTx) (TxnResponse, int)
func UpdateModel ¶
func UpdateModel(model model.MsgUpdateModel, sender KeyInfo) (TxnResponse, int)
func UpdateModelVersion ¶
func UpdateModelVersion(modelVersion model.MsgUpdateModelVersion, sender KeyInfo) (TxnResponse, int)
type VendorItemHeadersResult ¶
type VendorItemHeadersResult struct { Total string `json:"total"` Items []model.VendorItem `json:"items"` }
func GetVendors ¶
func GetVendors() (VendorItemHeadersResult, int)
Click to show internal directories.
Click to hide internal directories.