interfaces

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository interface {
	// GetSession gets the session token from the previous login if it's available
	GetSession() (*model.Session, error)

	// SaveSession saves the session from the provided email, password and last access token
	SaveSession(session *model.Session) error
}

type UseCases

type UseCases interface {
	// BuyStaticPix creates a new static pix on BRLA
	// See more: https://brla-superuser-api.readme.io/reference/superuserbuystaticpix
	BuyStaticPix(options *model.BuyStaticPixOptions) (*model.Pix, error)

	// GetBalanceOf retrieves the balance of a wallet directly from the blockchain
	GetBalanceOf(options *model.BalanceOfOptions) (*model.BalanceOf, error)

	// GetKYCStatus retrieves KYC status from BRLA
	GetKYCStatus(taxId string) (*model.KYCHistory, error)

	// GetUsedLimit retrieves user used limit from BRLA
	GetUsedLimit(taxId string) (*model.Limits, error)

	// KycLevelOne creates a new KYC level one on BRLA
	// See more: https://brla-superuser-api.readme.io/reference/superuserkyclevelone
	KycLevelOne(options *model.KycLevelOneOptions) (*model.KycLevelOne, error)

	// KycLevelTwo creates a new KYC level two on BRLA
	// See more: https://brla-superuser-api.readme.io/reference/superuserkycleveltwo
	KycLevelTwo(options *model.KycLevelTwoOptions) error

	// Login logs in a super user into BRLA
	// See more: https://brla-superuser-api.readme.io/reference/superuserlogin
	Login(email string, password string) (*model.Session, error)

	// Sell sells tokens on BRLA
	// See more: https://brla-superuser-api.readme.io/reference/superusersell
	Sell(options *model.SellOptions) (*string, error)
}

type WebhookHandler

type WebhookHandler interface {
	// HandleQueued handles the `queued` webhook response.
	HandleQueued(c context.Context, req *model.WebhookResponse) error

	// HandlePosted handles the posted webhook response
	HandlePosted(c context.Context, req *model.WebhookResponse) error

	// HandleSuccess handles the success webhook response
	HandleSuccess(c context.Context, req *model.WebhookResponse) error

	// HandleFailed handles the failed webhook response
	HandleFailed(c context.Context, req *model.WebhookResponse) error
}

Jump to

Keyboard shortcuts

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