Documentation
¶
Index ¶
- func Auth(jwtSecretKey string) gin.HandlerFunc
- func CORSMiddleware(cfg config.HTTP, l *logger.Logger) gin.HandlerFunc
- func CORSMiddlewareAllowAllOrigins(l *logger.Logger) gin.HandlerFunc
- func GenerateJWT(user entity.User, jwtSecretKey string) (tokenString string, err error)
- func NewRouter(handler *gin.Engine, pKp, pHor, pEnv, pSub, pSig entity.ProducerInterface, ...)
- func ValidateToken(signedToken string, jwtSecretKey string) (err error)
- type AddContractHistoryRequest
- type BurnAssetRequest
- type ClawbackAssetRequest
- type CreateAssetRequest
- type CreateContractRequest
- type CreateVaultCategoryRequest
- type CreateVaultRequest
- type CreateWalletRequest
- type FiltersRequest
- type FundWalletRequest
- type HTTPControllerMessenger
- type JWTClaim
- type MintAssetRequest
- type PaginatedAssetsResponse
- type PaginatedContractsResponse
- type PaginatedVaultsResponse
- type PriceConversionResponse
- type RolePermissionRequest
- type SignedTransactionRequest
- type SubmitTransactionRequest
- type TransferAssetRequest
- type UpdateAuthFlagsRequest
- type UpdateContractHistoryRequest
- type UpdateContractIdRequest
- type UpdateNameRequest
- type UpdateVaultAssetRequest
- type UpdateVaultCategoryRequest
- type UploadAssetImageRequest
- type UserPermissionsResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Auth ¶
func Auth(jwtSecretKey string) gin.HandlerFunc
func CORSMiddleware ¶
func CORSMiddlewareAllowAllOrigins ¶
func CORSMiddlewareAllowAllOrigins(l *logger.Logger) gin.HandlerFunc
func GenerateJWT ¶
func NewRouter ¶
func NewRouter( handler *gin.Engine, pKp, pHor, pEnv, pSub, pSig entity.ProducerInterface, authUseCase usecase.AuthUseCase, userUseCase usecase.UserUseCase, walletUseCase usecase.WalletUseCase, assetUseCase usecase.AssetUseCase, roleUseCase usecase.RoleUseCase, rolePermissionUc usecase.RolePermissionUseCase, vaultCategoryUc usecase.VaultCategoryUseCase, vaultUc usecase.VaultUseCase, contractUc usecase.ContractUseCase, logUc usecase.LogTransactionUseCase, cfg config.HTTP, logger *logger.Logger, profanityF profanity.ProfanityFilter, )
Swagger spec: @title Token Factory API @version 1.0 @BasePath /
func ValidateToken ¶
Types ¶
type BurnAssetRequest ¶
type BurnAssetRequest struct {
Id string `json:"id" binding:"required" example:"001"`
SponsorId int `json:"sponsor_id" example:"2"`
Amount string `json:"amount" binding:"required" example:"1000"`
CurrentSupply float64 `json:"current_supply" example:"1000"`
CurrentMainVault float64 `json:"current_main_vault" example:"1000"`
}
type ClawbackAssetRequest ¶
type ClawbackAssetRequest struct {
SponsorId int `json:"sponsor_id" example:"2"`
Code string `json:"code" binding:"required" example:"USDC"`
Amount string `json:"amount" binding:"required" example:"1000"`
From string `json:"from" binding:"required" example:"GDKIJJIKXLOM2NRMPNQZUUYK24ZPVFC6426GZAICZ6E5PQG2MIPIMB2L"`
CurrentSupply float64 `json:"current_supply" example:"1000"`
CurrentMainVault float64 `json:"current_main_vault" example:"1000"`
}
type CreateAssetRequest ¶
type CreateAssetRequest struct {
SponsorId int `json:"sponsor_id" example:"2"`
Name string `json:"name" binding:"required" example:"USDC"`
AssetType string `json:"asset_type" binding:"required" example:"security_token"`
Code string `json:"code" binding:"required" example:"USDC"`
Limit *int `json:"limit" example:"1000"`
Amount string `json:"amount" example:"1000"`
SetFlags []string `json:"set_flags" example:"[\"AUTH_REQUIRED_FLAGS\", \"AUTH_REVOCABLE_FLAGS\",\"AUTH_CLAWBACK_ENABLED\"]"`
Image string `json:"image" example:"iVBORw0KGgoAAAANSUhEUgAACqoAAAMMCAMAAAAWqpRaAAADAFBMVEX///..."`
}
type CreateContractRequest ¶
type CreateContractRequest struct {
Name string `json:"name" binding:"required" example:"Treasury"`
AssetId string `json:"asset_id" binding:"required" example:"1"`
VaultId string `json:"vault_id" binding:"required" example:"1"`
Address string `json:"address" binding:"required" example:"GSDSC..."`
YieldRate int `json:"yield_rate" binding:"required" example:"1"`
Term int `json:"term" binding:"required" example:"60"`
MinDeposit int `json:"min_deposit" binding:"required" example:"1"`
PenaltyRate int `json:"penalty_rate" binding:"required" example:"1"`
Compound int `json:"compound" example:"1"`
}
type CreateVaultRequest ¶
type CreateWalletRequest ¶
type CreateWalletRequest struct {
Type string `json:"type" binding:"required" example:"sponsor"`
}
type FiltersRequest ¶
type FundWalletRequest ¶
type FundWalletRequest struct {
Id int `json:"id" binding:"required" example:"1"`
}
type HTTPControllerMessenger ¶
type HTTPControllerMessenger struct {
// contains filtered or unexported fields
}
func (*HTTPControllerMessenger) SendMessage ¶
func (m *HTTPControllerMessenger) SendMessage(chanName string, value interface{}) (*entity.NotifyData, error)
type MintAssetRequest ¶
type MintAssetRequest struct {
Id string `json:"id" binding:"required" example:"12"`
SponsorId int `json:"sponsor_id" example:"2"`
Code string `json:"code" binding:"required" example:"USDC"`
Amount string `json:"amount" binding:"required" example:"1000"`
CurrentSupply float64 `json:"current_supply" example:"1000"`
CurrentMainVault float64 `json:"current_main_vault" example:"1000"`
}
type PaginatedAssetsResponse ¶
type PaginatedVaultsResponse ¶
type PriceConversionResponse ¶
type RolePermissionRequest ¶
type SubmitTransactionRequest ¶
type SubmitTransactionRequest struct {
Envelope string `json:"envelope" binding:"required" example:"KJDSKD..."`
}
type TransferAssetRequest ¶
type TransferAssetRequest struct {
SourceWalletID int `json:"source_wallet_id" binding:"required" example:"1"`
SponsorId int `json:"sponsor_id" example:"2"`
DestinationWalletPK string `json:"destination_wallet_pk" binding:"required" example:"GABCD...."`
AssetID string `json:"asset_id" binding:"required" example:"12"`
Amount string `json:"amount" binding:"required" example:"12"`
CurrentSupply float64 `json:"current_supply" example:"1000"`
CurrentMainVault float64 `json:"current_main_vault" example:"1000"`
}
type UpdateAuthFlagsRequest ¶
type UpdateAuthFlagsRequest struct {
TrustorId int `json:"trustor_id" example:"2"`
Issuer int `json:"issuer" binding:"required" example:"2"`
Code string `json:"code" binding:"required" example:"USDC"`
SetFlags []string `` /* 139-byte string literal not displayed */
ClearFlags []string `json:"clear_flags" example:"[\"TRUST_LINE_CLAWBACK_ENABLED\"]"`
TrustorPK string `json:"trustor_pk" example:"2"`
}
type UpdateContractIdRequest ¶
type UpdateContractIdRequest struct {
ContractId string `json:"contract_id" example:"iVBORw0KGgoAAAANSUhEUgAACqoAAAMMCAMAAAAWqpRaAAADAFBMVEX///..."`
}
type UpdateNameRequest ¶
type UpdateVaultAssetRequest ¶
type UploadAssetImageRequest ¶
type UploadAssetImageRequest struct {
Image string `json:"image" example:"iVBORw0KGgoAAAANSUhEUgAACqoAAAMMCAMAAAAWqpRaAAADAFBMVEX///..."`
}
type UserPermissionsResponse ¶
type UserPermissionsResponse struct {
Permissions []entity.UserPermissionResponse `json:"permissions"`
Admin bool `json:"admin" example:"true"`
}
Click to show internal directories.
Click to hide internal directories.