timestamp

package
v0.0.0-...-7ab38c0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 20, 2024 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	IssueFactHint = hint.MustNewHint("mitum-timestamp-issue-operation-fact-v0.0.1")
	IssueHint     = hint.MustNewHint("mitum-timestamp-issue-operation-v0.0.1")
)
View Source
var (
	RegisterModelFactHint = hint.MustNewHint("mitum-timestamp-register-model-operation-fact-v0.0.1")
	RegisterModelHint     = hint.MustNewHint("mitum-timestamp-register-model-operation-v0.0.1")
)

Functions

func NewRegisterModelProcessor

func NewRegisterModelProcessor() currencytypes.GetNewProcessor

Types

type Issue

type Issue struct {
	common.BaseOperation
}

func NewIssue

func NewIssue(fact IssueFact) (Issue, error)

func (*Issue) DecodeBSON

func (op *Issue) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*Issue) DecodeJSON

func (op *Issue) DecodeJSON(b []byte, enc encoder.Encoder) error

func (Issue) MarshalBSON

func (op Issue) MarshalBSON() ([]byte, error)

func (Issue) MarshalJSON

func (op Issue) MarshalJSON() ([]byte, error)

type IssueFact

type IssueFact struct {
	mitumbase.BaseFact
	// contains filtered or unexported fields
}

func NewIssueFact

func NewIssueFact(
	token []byte, sender, contract mitumbase.Address, projectID string,
	requestTimeStamp uint64, data string, currency currencytypes.CurrencyID) IssueFact

func (IssueFact) Addresses

func (fact IssueFact) Addresses() ([]mitumbase.Address, error)

func (IssueFact) Bytes

func (fact IssueFact) Bytes() []byte

func (IssueFact) Contract

func (fact IssueFact) Contract() mitumbase.Address

func (IssueFact) Currency

func (fact IssueFact) Currency() currencytypes.CurrencyID

func (IssueFact) Data

func (fact IssueFact) Data() string

func (*IssueFact) DecodeBSON

func (fact *IssueFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*IssueFact) DecodeJSON

func (fact *IssueFact) DecodeJSON(b []byte, enc encoder.Encoder) error

func (IssueFact) GenerateHash

func (fact IssueFact) GenerateHash() util.Hash

func (IssueFact) Hash

func (fact IssueFact) Hash() util.Hash

func (IssueFact) IsValid

func (fact IssueFact) IsValid(b []byte) error

func (IssueFact) MarshalBSON

func (fact IssueFact) MarshalBSON() ([]byte, error)

func (IssueFact) MarshalJSON

func (fact IssueFact) MarshalJSON() ([]byte, error)

func (IssueFact) ProjectId

func (fact IssueFact) ProjectId() string

func (IssueFact) RequestTimeStamp

func (fact IssueFact) RequestTimeStamp() uint64

func (IssueFact) Sender

func (fact IssueFact) Sender() mitumbase.Address

func (IssueFact) Token

func (fact IssueFact) Token() mitumbase.Token

type IssueFactBSONUnmarshaler

type IssueFactBSONUnmarshaler struct {
	Hint             string `bson:"_hint"`
	Sender           string `bson:"sender"`
	Contract         string `bson:"contract"`
	ProjectID        string `bson:"project_id"`
	RequestTimeStamp uint64 `bson:"request_timestamp"`
	Data             string `bson:"data"`
	Currency         string `bson:"currency"`
}

type IssueFactJSONMarshaler

type IssueFactJSONMarshaler struct {
	mitumbase.BaseFactJSONMarshaler
	Sender           mitumbase.Address `json:"sender"`
	Contract         mitumbase.Address `json:"contract"`
	ProjectID        string            `json:"project_id"`
	RequestTimeStamp uint64            `json:"request_timestamp"`
	Data             string            `json:"data"`
	Currency         types.CurrencyID  `json:"currency"`
}

type IssueFactJSONUnmarshaler

type IssueFactJSONUnmarshaler struct {
	mitumbase.BaseFactJSONUnmarshaler
	Sender           string `json:"sender"`
	Contract         string `json:"contract"`
	ProjectID        string `json:"project_id"`
	RequestTimeStamp uint64 `json:"request_timestamp"`
	Data             string `json:"data"`
	Currency         string `json:"currency"`
}

type IssueProcessor

type IssueProcessor struct {
	*mitumbase.BaseOperationProcessor
	// contains filtered or unexported fields
}

func (*IssueProcessor) Close

func (opp *IssueProcessor) Close() error

func (*IssueProcessor) PreProcess

type RegisterModel

type RegisterModel struct {
	common.BaseOperation
}

func NewRegisterModel

func NewRegisterModel(fact RegisterModelFact) (RegisterModel, error)

func (*RegisterModel) DecodeBSON

func (op *RegisterModel) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*RegisterModel) DecodeJSON

func (op *RegisterModel) DecodeJSON(b []byte, enc encoder.Encoder) error

func (RegisterModel) MarshalBSON

func (op RegisterModel) MarshalBSON() ([]byte, error)

func (RegisterModel) MarshalJSON

func (op RegisterModel) MarshalJSON() ([]byte, error)

type RegisterModelFact

type RegisterModelFact struct {
	mitumbase.BaseFact
	// contains filtered or unexported fields
}

func NewRegisterModelFact

func NewRegisterModelFact(token []byte, sender, contract mitumbase.Address, currency types.CurrencyID) RegisterModelFact

func (RegisterModelFact) Addresses

func (fact RegisterModelFact) Addresses() ([]mitumbase.Address, error)

func (RegisterModelFact) Bytes

func (fact RegisterModelFact) Bytes() []byte

func (RegisterModelFact) Contract

func (fact RegisterModelFact) Contract() mitumbase.Address

func (RegisterModelFact) Currency

func (fact RegisterModelFact) Currency() types.CurrencyID

func (*RegisterModelFact) DecodeBSON

func (fact *RegisterModelFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*RegisterModelFact) DecodeJSON

func (fact *RegisterModelFact) DecodeJSON(b []byte, enc encoder.Encoder) error

func (RegisterModelFact) GenerateHash

func (fact RegisterModelFact) GenerateHash() util.Hash

func (RegisterModelFact) Hash

func (fact RegisterModelFact) Hash() util.Hash

func (RegisterModelFact) IsValid

func (fact RegisterModelFact) IsValid(b []byte) error

func (RegisterModelFact) MarshalBSON

func (fact RegisterModelFact) MarshalBSON() ([]byte, error)

func (RegisterModelFact) MarshalJSON

func (fact RegisterModelFact) MarshalJSON() ([]byte, error)

func (RegisterModelFact) Sender

func (fact RegisterModelFact) Sender() mitumbase.Address

func (RegisterModelFact) Token

func (fact RegisterModelFact) Token() mitumbase.Token

type RegisterModelFactBSONUnmarshaler

type RegisterModelFactBSONUnmarshaler struct {
	Hint     string `bson:"_hint"`
	Sender   string `bson:"sender"`
	Contract string `bson:"contract"`
	Currency string `bson:"currency"`
}

type RegisterModelFactJSONMarshaler

type RegisterModelFactJSONMarshaler struct {
	mitumbase.BaseFactJSONMarshaler
	Sender   mitumbase.Address `json:"sender"`
	Contract mitumbase.Address `json:"contract"`
	Currency types.CurrencyID  `json:"currency"`
}

type RegisterModelFactJSONUnmarshaler

type RegisterModelFactJSONUnmarshaler struct {
	mitumbase.BaseFactJSONUnmarshaler
	Sender   string `json:"sender"`
	Contract string `json:"contract"`
	Currency string `json:"currency"`
}

type RegisterModelProcessor

type RegisterModelProcessor struct {
	*mitumbase.BaseOperationProcessor
}

func (*RegisterModelProcessor) Close

func (opp *RegisterModelProcessor) Close() error

func (*RegisterModelProcessor) PreProcess

type TestIssueProcessor

type TestIssueProcessor struct {
	*test.BaseTestOperationProcessorNoItem[Issue]
}

func NewTestIssueProcessor

func NewTestIssueProcessor(tp *test.TestProcessor) TestIssueProcessor

func (*TestIssueProcessor) Create

func (*TestIssueProcessor) LoadOperation

func (t *TestIssueProcessor) LoadOperation(fileName string,
) *TestIssueProcessor

func (*TestIssueProcessor) MakeOperation

func (t *TestIssueProcessor) MakeOperation(
	sender base.Address,
	privatekey base.Privatekey,
	contract base.Address,
	projectID string,
	requestTimeStamp uint64,
	data string,
	currency currencytypes.CurrencyID,
) *TestIssueProcessor

func (*TestIssueProcessor) Print

func (t *TestIssueProcessor) Print(fileName string,
) *TestIssueProcessor

func (*TestIssueProcessor) RunPreProcess

func (t *TestIssueProcessor) RunPreProcess() *TestIssueProcessor

func (*TestIssueProcessor) RunProcess

func (t *TestIssueProcessor) RunProcess() *TestIssueProcessor

func (*TestIssueProcessor) SetAccount

func (t *TestIssueProcessor) SetAccount(
	priv string, amount int64, cid currencytypes.CurrencyID, target []test.Account, inState bool,
) *TestIssueProcessor

func (*TestIssueProcessor) SetAmount

func (*TestIssueProcessor) SetContractAccount

func (t *TestIssueProcessor) SetContractAccount(
	owner base.Address, priv string, amount int64, cid currencytypes.CurrencyID, target []test.Account, inState bool,
) *TestIssueProcessor

func (*TestIssueProcessor) SetCurrency

func (t *TestIssueProcessor) SetCurrency(
	cid string, am int64, addr base.Address, target []currencytypes.CurrencyID, instate bool,
) *TestIssueProcessor

func (*TestIssueProcessor) SetService

func (t *TestIssueProcessor) SetService(
	contract base.Address,
) *TestIssueProcessor

type TestRegisterModelProcessor

type TestRegisterModelProcessor struct {
	*test.BaseTestOperationProcessorNoItem[RegisterModel]
}

func NewTestRegisterModelProcessor

func NewTestRegisterModelProcessor(tp *test.TestProcessor) TestRegisterModelProcessor

func (*TestRegisterModelProcessor) Create

func (*TestRegisterModelProcessor) LoadOperation

func (t *TestRegisterModelProcessor) LoadOperation(fileName string,
) *TestRegisterModelProcessor

func (*TestRegisterModelProcessor) MakeOperation

func (t *TestRegisterModelProcessor) MakeOperation(
	sender base.Address, privatekey base.Privatekey, contract base.Address, currency currencytypes.CurrencyID,
) *TestRegisterModelProcessor

func (*TestRegisterModelProcessor) Print

func (*TestRegisterModelProcessor) RunPreProcess

func (*TestRegisterModelProcessor) RunProcess

func (*TestRegisterModelProcessor) SetAccount

func (t *TestRegisterModelProcessor) SetAccount(
	priv string, amount int64, cid currencytypes.CurrencyID, target []test.Account, inState bool,
) *TestRegisterModelProcessor

func (*TestRegisterModelProcessor) SetAmount

func (*TestRegisterModelProcessor) SetContractAccount

func (t *TestRegisterModelProcessor) SetContractAccount(
	owner base.Address, priv string, amount int64, cid currencytypes.CurrencyID, target []test.Account, inState bool,
) *TestRegisterModelProcessor

func (*TestRegisterModelProcessor) SetCurrency

func (t *TestRegisterModelProcessor) SetCurrency(
	cid string, am int64, addr base.Address, target []currencytypes.CurrencyID, instate bool,
) *TestRegisterModelProcessor

func (*TestRegisterModelProcessor) SetService

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL