Documentation ¶
Index ¶
- Constants
- func ApplyModelCommand(command *model.Command, signerKey string, transactionId string, ...) error
- func RunCommandForTest(c *Command, transactionId string, ba BlockchainAccess) error
- type BlockchainAccess
- type Bootstrap
- type Command
- func GetBootstrapCommand(bootstrap *Bootstrap, cryptoIdentity *CryptoIdentity) *Command
- func GetCommandEditorAcceptDuty(journalId string, signer string, cryptoIdentity *CryptoIdentity, price int32) *Command
- func GetCommandEditorInvite(journalId, editorId, signer string, cryptoIdentity *CryptoIdentity, ...) *Command
- func GetCommandEditorResign(journalId string, signer string, cryptoIdentity *CryptoIdentity) *Command
- func GetCommandJournalCreate(jc *Journal, signer string, cryptoIdentity *CryptoIdentity, price int32) (*Command, string)
- func GetCommandJournalOmitDescription(journalId string, origDescriptionHash string, signer string, ...) *Command
- func GetCommandJournalUpdateAuthorization(journalId string, makeSigned bool, signer string, ...) *Command
- func GetCommandJournalUpdateDescription(journalId string, origDescriptionHash string, updatedDescription []byte, ...) *Command
- func GetCommandJournalUpdateProperties(journalId string, orig, updated *Journal, signer string, ...) *Command
- func GetCommandManuscriptAcceptAuthorship(manuscript *dao.Manuscript, signerId string, cryptoIdentity *CryptoIdentity, ...) *Command
- func GetCommandManuscriptAllowReview(threadId string, daoThreadReference []dao.ReferenceThreadItem, ...) *Command
- func GetCommandManuscriptAssign(manuscriptAssign *ManuscriptAssign, journalId string, signerId string, ...) *Command
- func GetCommandManuscriptCreate(manuscriptCreate *ManuscriptCreate, signerId string, ...) (*Command, string)
- func GetCommandManuscriptCreateNewVersion(manuscriptCreateNewVersion *ManuscriptCreateNewVersion, ...) (*Command, string)
- func GetCommandManuscriptPublish(manuscriptJudge *ManuscriptJudge, journalId string, signerId string, ...) *Command
- func GetCommandManuscriptReject(manuscriptJudge *ManuscriptJudge, journalId string, signerId string, ...) *Command
- func GetCommandPersonOmitBiography(personId string, origBiographyHash string, signerId string, ...) *Command
- func GetCommandPersonUpdateBiography(personId string, origBiographyHash string, updatedBiography []byte, ...) *Command
- func GetCommandVolumeCreate(v *Volume, signer string, cryptoIdentity *CryptoIdentity, price int32) (*Command, string)
- func GetCommandWriteNegativeReview(reviewCreate *ReviewCreate, signerId string, cryptoIdentity *CryptoIdentity, ...) (*Command, string)
- func GetCommandWritePositiveReview(reviewCreate *ReviewCreate, signerId string, cryptoIdentity *CryptoIdentity, ...) (*Command, string)
- func GetPersonCreateCommand(pc *PersonCreate, signerId string, cryptoIdentity *CryptoIdentity, price int32) (*Command, string)
- func GetPersonUpdateIncBalanceCommand(personId string, amount int32, signerId string, cryptoIdentity *CryptoIdentity, ...) *Command
- func GetPersonUpdatePropertiesCommand(personId string, orig, updated *dao.PersonUpdate, signerId string, ...) *Command
- func GetPersonUpdateSetMajorCommand(personId, signerId string, cryptoIdentity *CryptoIdentity, price int32) *Command
- func GetPersonUpdateSetSignedCommand(personId, signerId string, cryptoIdentity *CryptoIdentity, price int32) *Command
- func GetPersonUpdateUnsetMajorCommand(personId, signerId string, cryptoIdentity *CryptoIdentity, price int32) *Command
- func GetPersonUpdateUnsetSignedCommand(personId, signerId string, cryptoIdentity *CryptoIdentity, price int32) *Command
- func GetSettingsUpdateCommand(orig, updated *dao.Settings, signerId string, cryptoIdentity *CryptoIdentity, ...) *Command
- type CryptoIdentity
- type EventHandler
- type Journal
- type ManuscriptAssign
- type ManuscriptCreate
- type ManuscriptCreateNewVersion
- type ManuscriptJudge
- type PersonCreate
- type ReviewCreate
- type Volume
Constants ¶
View Source
const ( ADDRESS_UNKNOWN = addressState(0) ADDRESS_EMPTY = addressState(1) ADDRESS_FILLED = addressState(2) )
Variables ¶
This section is empty.
Functions ¶
func ApplyModelCommand ¶
func RunCommandForTest ¶
func RunCommandForTest(c *Command, transactionId string, ba BlockchainAccess) error
Test running a command and check that only its input and output addresses are accessed.
Types ¶
type BlockchainAccess ¶
type BlockchainAccess interface { GetState(addresses []string) (map[string][]byte, error) SetState(pairs map[string][]byte) ([]string, error) AddEvent(eventType string, attributes []processor.Attribute, eventData []byte) error }
func NewBlockchainStub ¶
func NewBlockchainStub(eventHandler EventHandler, logger *log.Logger) BlockchainAccess
type Bootstrap ¶
type Bootstrap struct { PriceMajorEditSettings int32 PriceMajorCreatePerson int32 PriceMajorChangePersonAuthorization int32 PriceMajorChangeJournalAuthorization int32 PricePersonEdit int32 PriceAuthorSubmitNewManuscript int32 PriceAuthorSubmitNewVersion int32 PriceAuthorAcceptAuthorship int32 PriceReviewerSubmit int32 PriceEditorAllowManuscriptReview int32 PriceEditorRejectManuscript int32 PriceEditorPublishManuscript int32 PriceEditorAssignManuscript int32 PriceEditorCreateJournal int32 PriceEditorCreateVolume int32 PriceEditorEditJournal int32 PriceEditorAddColleague int32 PriceEditorAcceptDuty int32 Name string Email string }
type Command ¶
type Command struct { InputAddresses []string OutputAddresses []string CryptoIdentity *CryptoIdentity Command *model.Command }
func GetBootstrapCommand ¶
func GetBootstrapCommand(bootstrap *Bootstrap, cryptoIdentity *CryptoIdentity) *Command
func GetCommandEditorAcceptDuty ¶
func GetCommandEditorAcceptDuty( journalId string, signer string, cryptoIdentity *CryptoIdentity, price int32) *Command
func GetCommandEditorInvite ¶
func GetCommandEditorInvite( journalId, editorId, signer string, cryptoIdentity *CryptoIdentity, price int32) *Command
func GetCommandEditorResign ¶
func GetCommandEditorResign( journalId string, signer string, cryptoIdentity *CryptoIdentity) *Command
func GetCommandJournalCreate ¶
func GetCommandManuscriptAcceptAuthorship ¶
func GetCommandManuscriptAcceptAuthorship( manuscript *dao.Manuscript, signerId string, cryptoIdentity *CryptoIdentity, price int32) *Command
func GetCommandManuscriptAllowReview ¶
func GetCommandManuscriptAllowReview( threadId string, daoThreadReference []dao.ReferenceThreadItem, journalId string, signerId string, cryptoIdentity *CryptoIdentity, price int32) *Command
func GetCommandManuscriptAssign ¶
func GetCommandManuscriptAssign( manuscriptAssign *ManuscriptAssign, journalId string, signerId string, cryptoIdentity *CryptoIdentity, price int32) *Command
func GetCommandManuscriptCreate ¶
func GetCommandManuscriptCreate( manuscriptCreate *ManuscriptCreate, signerId string, cryptoIdentity *CryptoIdentity, price int32) (*Command, string)
func GetCommandManuscriptCreateNewVersion ¶
func GetCommandManuscriptCreateNewVersion( manuscriptCreateNewVersion *ManuscriptCreateNewVersion, daoThreadReference []dao.ReferenceThreadItem, historicAuthors []string, signerId string, cryptoIdentity *CryptoIdentity, price int32) (*Command, string)
func GetCommandManuscriptPublish ¶
func GetCommandManuscriptPublish( manuscriptJudge *ManuscriptJudge, journalId string, signerId string, cryptoIdentity *CryptoIdentity, price int32) *Command
func GetCommandManuscriptReject ¶
func GetCommandManuscriptReject( manuscriptJudge *ManuscriptJudge, journalId string, signerId string, cryptoIdentity *CryptoIdentity, price int32) *Command
func GetCommandVolumeCreate ¶
func GetCommandWriteNegativeReview ¶
func GetCommandWriteNegativeReview( reviewCreate *ReviewCreate, signerId string, cryptoIdentity *CryptoIdentity, price int32) (*Command, string)
func GetCommandWritePositiveReview ¶
func GetCommandWritePositiveReview( reviewCreate *ReviewCreate, signerId string, cryptoIdentity *CryptoIdentity, price int32) (*Command, string)
func GetPersonCreateCommand ¶
func GetPersonCreateCommand( pc *PersonCreate, signerId string, cryptoIdentity *CryptoIdentity, price int32) (*Command, string)
func GetPersonUpdatePropertiesCommand ¶
func GetPersonUpdatePropertiesCommand( personId string, orig, updated *dao.PersonUpdate, signerId string, cryptoIdentity *CryptoIdentity, price int32) *Command
func GetPersonUpdateSetMajorCommand ¶
func GetPersonUpdateSetMajorCommand( personId, signerId string, cryptoIdentity *CryptoIdentity, price int32) *Command
func GetPersonUpdateSetSignedCommand ¶
func GetPersonUpdateSetSignedCommand( personId, signerId string, cryptoIdentity *CryptoIdentity, price int32) *Command
func GetPersonUpdateUnsetMajorCommand ¶
func GetPersonUpdateUnsetMajorCommand( personId, signerId string, cryptoIdentity *CryptoIdentity, price int32) *Command
func GetPersonUpdateUnsetSignedCommand ¶
func GetPersonUpdateUnsetSignedCommand( personId, signerId string, cryptoIdentity *CryptoIdentity, price int32) *Command
type CryptoIdentity ¶
type CryptoIdentity struct { PublicKeyStr string PublicKey signing.PublicKey PrivateKey signing.PrivateKey }
type EventHandler ¶
type EventHandler func(*events_pb2.Event, *log.Logger) error
type ManuscriptAssign ¶
type ManuscriptCreate ¶
type ManuscriptJudge ¶
type PersonCreate ¶
type ReviewCreate ¶
Click to show internal directories.
Click to hide internal directories.