Documentation ¶
Index ¶
- Constants
- Variables
- func AppIDFromTextMemo(memo string) (appID string, ok bool)
- func SignEnvelope(envelope *xdr.TransactionEnvelope, network build.Network, seed string) (*xdr.TransactionEnvelope, error)
- type Authorization
- type AuthorizationResult
- type Authorizer
- type Limiter
- type Memo
- type Transaction
Constants ¶
View Source
const ( AuthorizationResultOK = iota AuthorizationResultRejected AuthorizationResultInvoiceError )
Variables ¶
View Source
var ( SubmitTransactionCounter = prometheus.NewCounterVec(prometheus.CounterOpts{ Namespace: "agora", Name: "submit_transaction", Help: "Number of submit transaction requests", }, []string{"api_version"}) )
Functions ¶
func AppIDFromTextMemo ¶ added in v0.2.3
AppIDFromTextMemo returns the canonical string AppID given a memo string.
If the provided memo is in the incorrect format, ok will be false.
func SignEnvelope ¶
func SignEnvelope(envelope *xdr.TransactionEnvelope, network build.Network, seed string) (*xdr.TransactionEnvelope, error)
SignEnvelope signs a transaction envelope with the specified seed and network passphrase.
Types ¶
type Authorization ¶ added in v0.2.3
type Authorization struct { Result int InvoiceErrors []*commonpb.InvoiceError SignResponse *signtransaction.SuccessResponse }
type AuthorizationResult ¶ added in v0.2.3
type AuthorizationResult int
type Authorizer ¶ added in v0.2.3
type Authorizer interface { // Authorize authorizes the provided transaction. // // Callers must perform actual submission, and any persistence // related to the transaction, such as invoice storing. Authorize(context.Context, Transaction) (Authorization, error) }
Authorizer authorizes transactions.
func NewAuthorizer ¶ added in v0.2.3
func NewAuthorizer( mapper app.Mapper, configStore app.ConfigStore, webhookClient *webhook.Client, limiter *Limiter, ) (Authorizer, error)
NewAuthorizer returns an authorizer.
type Limiter ¶ added in v0.2.3
type Limiter struct {
// contains filtered or unexported fields
}
Limiter limits transaction based on app index.
If no app index is provided, only the global rate limit applies.
func NewLimiter ¶ added in v0.2.3
func NewLimiter(ctor rate.LimiterCtor, globalLimit, appLimit int) *Limiter
NewLimiter creates a new TransactionLimiter.
type Transaction ¶ added in v0.2.3
type Transaction struct { Version version.KinVersion ID []byte Memo Memo OpCount int InvoiceList *commonpb.InvoiceList SignRequest *signtransaction.RequestBody }
Directories ¶
Path | Synopsis |
---|---|
ingestion/dynamodb/committer
Package dynamodb implements a dynamodb backed ingestion.Committer.
|
Package dynamodb implements a dynamodb backed ingestion.Committer. |
Click to show internal directories.
Click to hide internal directories.