api

package
v0.0.0-...-d0dd730 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2019 License: Apache-2.0 Imports: 36 Imported by: 1

Documentation

Index

Constants

View Source
const (
	BaseAPIUrl     = "/portal/admin/"
	BaseAPIUrlProt = "/portal/admin/dash/"
)

Some constants used in the APIs

View Source
const (
	//CustomerRoutePrefix is the prefix for the customer group. We need this in order to get all the routes for this base url
	CustomerRoutePrefix = "customer"
)
View Source
const (
	//ICORoutePrefix for the ico manangement
	ICORoutePrefix = "ico"
)
View Source
const (
	//KnownCurrenciesRoutePrefix for the known currencies routes
	KnownCurrenciesRoutePrefix = "known_currencies"
)
View Source
const (
	//KnownInflationDestinationsRoutePrefix for the known inflation destinations routes
	KnownInflationDestinationsRoutePrefix = "known_inflation_destinations"
)
View Source
const (
	//PromoRoutePrefix for the promo routes
	PromoRoutePrefix = "promo"
)
View Source
const (
	//StellarAccountRoutePrefix for the account routes
	StellarAccountRoutePrefix = "stellar_account"
)
View Source
const (
	//UserRoutePrefix is the prefix for the user group. We need this in order to get all the routes for this base url
	UserRoutePrefix = "user"
)

Variables

This section is empty.

Functions

func Activate

func Activate(uc *mw.AdminContext, c *gin.Context)

Activate - activates or deactivates a user swagger:route POST /portal/admin/dash/user/activate user Activate

Activates or deactivates a user

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:ActivateResponse

func ActivatePromo

func ActivatePromo(uc *mw.AdminContext, c *gin.Context)

ActivatePromo activates/deactivates the promo swagger:route POST /portal/admin/dash/promo/changeOrder Promo ActivatePromo

Activates/deactivates the promo

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:

func AddAllowtrustSigner

func AddAllowtrustSigner(uc *mw.AdminContext, c *gin.Context)

AddAllowtrustSigner - adds an allow trust signer swagger:route POST /portal/admin/dash/stellar_account/add_allowtrust_signer StellarAccount AddAllowtrustSigner

Adds an allow trust signer

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:

func AddCustomerRoutes

func AddCustomerRoutes(rg *gin.RouterGroup)

AddCustomerRoutes adds all the routes for the user handling

func AddICORoutes

func AddICORoutes(rg *gin.RouterGroup)

AddICORoutes adds all the routes for the ico management

func AddIco

func AddIco(uc *mw.AdminContext, c *gin.Context)

AddIco - adds new ico swagger:route POST /portal/admin/dash/ico/add ico AddIco

Adds new ico

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:

func AddIcoPhase

func AddIcoPhase(uc *mw.AdminContext, c *gin.Context)

AddIcoPhase - adds new ico phase swagger:route POST /portal/admin/dash/ico/add_phase ico AddIcoPhase

Adds new ico phase

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:

func AddIssuerAssetCode

func AddIssuerAssetCode(uc *mw.AdminContext, c *gin.Context)

AddIssuerAssetCode - adds an asset code swagger:route POST /portal/admin/dash/stellar_account/add_asset_code StellarAccount AddIssuerAssetCode

Adds an asset code

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:

func AddKnownCurrenciesRoutes

func AddKnownCurrenciesRoutes(rg *gin.RouterGroup)

AddKnownCurrenciesRoutes adds all the routes for the known currencies handling

func AddKnownCurrency

func AddKnownCurrency(uc *mw.AdminContext, c *gin.Context)

AddKnownCurrency adds a new currency swagger:route POST /portal/admin/dash/known_currencies/add KnownCurrencies AddKnownCurrency

Adds a new currency

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:

func AddKnownInflationDestination

func AddKnownInflationDestination(uc *mw.AdminContext, c *gin.Context)

AddKnownInflationDestination adds a new inflation destination swagger:route POST /portal/admin/dash/known_inflation_destinations/add KnownInflationDestinations AddKnownInflationDestination

Adds a new inflation destination

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:

func AddKnownInflationDestinationsRoutes

func AddKnownInflationDestinationsRoutes(rg *gin.RouterGroup)

AddKnownInflationDestinationsRoutes adds all the routes for the known inflation destinations handling

func AddOtherSigner

func AddOtherSigner(uc *mw.AdminContext, c *gin.Context)

AddOtherSigner - adds other signer swagger:route POST /portal/admin/dash/stellar_account/add_other_signer StellarAccount AddOtherSigner

Adds other signer

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:

func AddPromo

func AddPromo(uc *mw.AdminContext, c *gin.Context)

AddPromo adds a new promo swagger:route POST /portal/admin/dash/promo/add Promo AddPromo

Adds a new promo

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:

func AddPromoRoutes

func AddPromoRoutes(rg *gin.RouterGroup)

AddPromoRoutes adds all the routes for the promo handling

func AddStellarAccount

func AddStellarAccount(uc *mw.AdminContext, c *gin.Context)

AddStellarAccount creates new account in the db swagger:route POST /portal/admin/dash/stellar_account/add StellarAccount AddStellarAccount

Creates new account in the db

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:

func AddStellarAccountRoutes

func AddStellarAccountRoutes(rg *gin.RouterGroup)

AddStellarAccountRoutes adds all the routes for the account handling

func AddTrustline

func AddTrustline(uc *mw.AdminContext, c *gin.Context)

AddTrustline creates new entry in the db swagger:route POST /portal/admin/dash/stellar_account/add_unathorized_trustline StellarAccount AddTrustline

Creates new entry in the db

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:

func AddUserRoutes

func AddUserRoutes(rg *gin.RouterGroup)

AddUserRoutes adds all the routes for the user handling

func AllKnownCurrencies

func AllKnownCurrencies(uc *mw.AdminContext, c *gin.Context)

AllKnownCurrencies returns all currencies swagger:route GET /portal/admin/dash/known_currencies/all KnownCurrencies AllKnownCurrencies

Returns all currencies

Produces:
- application/json

Responses:
  200:GetKnownCurrenciesResponse

func AllKnownInflationDestinations

func AllKnownInflationDestinations(uc *mw.AdminContext, c *gin.Context)

AllKnownInflationDestinations returns all inflation destinations swagger:route GET /portal/admin/dash/known_inflation_destinations/all KnownInflationDestinations AllKnownInflationDestinations

Returns all inflation destinations

Produces:
- application/json

Responses:
  200: []GetKnownInflationDestinationsResponse

func AllPromos

func AllPromos(uc *mw.AdminContext, c *gin.Context)

AllPromos returns all promos swagger:route GET /portal/admin/dash/promo/all Promo AllPromos

Returns all promos

Produces:
- application/json

Responses:
  200:[]GetPromoResponse

func AllStellarAccounts

func AllStellarAccounts(uc *mw.AdminContext, c *gin.Context)

AllStellarAccounts - returns all stellar accounts swagger:route GET /portal/admin/dash/stellar_account/accounts_list StellarAccount AllStellarAccounts

Returns all stellar accounts

Produces:
- application/json

Responses:
  200:[]StellarAccountItem

func ChangeOrderKnownCurrency

func ChangeOrderKnownCurrency(uc *mw.AdminContext, c *gin.Context)

ChangeOrderKnownCurrency alters a currency and changes the order index with +-1 swagger:route POST /portal/admin/dash/known_currencies/changeOrder KnownCurrencies ChangeOrderKnownCurrency

Alters a currency and changes the order index with +-1

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:

func ChangeOrderKnownInflationDestination

func ChangeOrderKnownInflationDestination(uc *mw.AdminContext, c *gin.Context)

ChangeOrderKnownInflationDestination alters a inflation destination and changes the order index with +-1 swagger:route POST /portal/admin/dash/known_inflation_destinations/changeOrder KnownInflationDestinations ChangeOrderKnownInflationDestination

Alters an inflation destination and changes the order index with +-1

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:

func ChangeOrderPromo

func ChangeOrderPromo(uc *mw.AdminContext, c *gin.Context)

ChangeOrderPromo alters a promo and changes the order index with +-1 swagger:route POST /portal/admin/dash/promo/changeOrder Promo ChangeOrderPromo

Alters a promo and changes the order index with +-1

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:

func CustomerDetails

func CustomerDetails(uc *mw.AdminContext, c *gin.Context)

CustomerDetails returns details of specified customer swagger:route GET /portal/admin/dash/customer/details/:id customer CustomerDetails

Returns details of specified customer

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:CustomerDetailsResponse

func CustomerEdit

func CustomerEdit(uc *mw.AdminContext, c *gin.Context)

CustomerEdit updates customer details and returns customer swagger:route POST /portal/admin/dash/customer/update_personal_data customer CustomerEdit

Updates customer details and returns customer

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:CustomerDetailsResponse

func CustomerList

func CustomerList(uc *mw.AdminContext, c *gin.Context)

CustomerList returns list of all customers, filtered by given params swagger:route GET /portal/admin/dash/customer/list customer CustomerList

Returns list of all customers, filtered by given params

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:CustomerListResponse

func CustomerOrders

func CustomerOrders(uc *mw.AdminContext, c *gin.Context)

CustomerOrders returns list of all customer's orders swagger:route GET /portal/admin/dash/customer/orders customer CustomerOrders

Returns list of all customer's orders

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:OrderListResponse

func CustomerUpdateKYCStatus

func CustomerUpdateKYCStatus(uc *mw.AdminContext, c *gin.Context)

CustomerUpdateKYCStatus updates status swagger:route POST /portal/admin/dash/customer/update_kyc_status customer CustomerUpdateKYCStatus

Updates KYC status

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:

func CustomerWallets

func CustomerWallets(uc *mw.AdminContext, c *gin.Context)

CustomerWallets returns list of all customer's wallets swagger:route GET /portal/admin/dash/customer/wallets/:id customer CustomerWallets

Returns list of all customer's wallets

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:WalletListResponse

func DeleteKnownCurrency

func DeleteKnownCurrency(uc *mw.AdminContext, c *gin.Context)

DeleteKnownCurrency deletes known currency swagger:route POST /portal/admin/dash/known_currencies/delete KnownCurrencies DeleteKnownCurrency

Deletes known currency

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:

func DeleteKnownInflationDestination

func DeleteKnownInflationDestination(uc *mw.AdminContext, c *gin.Context)

DeleteKnownInflationDestination deletes known inflation destination swagger:route POST /portal/admin/dash/known_inflation_destinations/delete KnownInflationDestinations DeleteKnownInflationDestination

Deletes known inflation destination

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:

func DeletePromo

func DeletePromo(uc *mw.AdminContext, c *gin.Context)

DeletePromo deletes the given promo swagger:route POST /portal/admin/dash/promo/delete Promo DeletePromo

Deletes the given promo

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:

func EditAllowtrustSigner

func EditAllowtrustSigner(uc *mw.AdminContext, c *gin.Context)

EditAllowtrustSigner - edits signer swagger:route POST /portal/admin/dash/stellar_account/edit_allowtrust_signer StellarAccount EditAllowtrustSigner

Edits signer's details

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:

func EditKnownCurrency

func EditKnownCurrency(uc *mw.AdminContext, c *gin.Context)

EditKnownCurrency edits known currency details swagger:route POST /portal/admin/dash/known_currencies/edit KnownCurrencies EditKnownCurrency

Edits known currency details

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:

func EditKnownInflationDestination

func EditKnownInflationDestination(uc *mw.AdminContext, c *gin.Context)

EditKnownInflationDestination edits known inflation destination details swagger:route POST /portal/admin/dash/known_inflation_destinations/edit KnownInflationDestinations EditKnownInflationDestination

Edits known inflation destination details

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:

func EditOtherSigner

func EditOtherSigner(uc *mw.AdminContext, c *gin.Context)

EditOtherSigner - edits signer swagger:route POST /portal/admin/dash/stellar_account/edit_other_signer StellarAccount EditOtherSigner

Edits signer's details

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:

func EditPromo

func EditPromo(uc *mw.AdminContext, c *gin.Context)

EditPromo edits promo details swagger:route POST /portal/admin/dash/promo/edit Promo EditPromo

Edits promo details

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:

func EditStellarAccount

func EditStellarAccount(uc *mw.AdminContext, c *gin.Context)

EditStellarAccount edits the given account details swagger:route POST /portal/admin/dash/stellar_account/edit StellarAccount EditStellarAccount

Edits the given account details

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:

func EditUser

func EditUser(uc *mw.AdminContext, c *gin.Context)

EditUser - edits the user's properties swagger:route POST /portal/admin/dash/user/edit user EditUser

Edits the user's properties

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:UserResponse

func ExchangeCurrencyList

func ExchangeCurrencyList(uc *mw.AdminContext, c *gin.Context)

ExchangeCurrencyList returns the list of exchange currencies swagger:route GET /portal/admin/dash/ico/exchange_currencies ico ExchangeCurrencyList

Returns the list of exchange currencies

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:ExchangeCurrencyListResponse

func GetHorizonAccount

func GetHorizonAccount(account string) (horizon.Account, bool, error)

GetHorizonAccount returns the horizon-account for the given address or false if it does not exist

func GetKnownCurrency

func GetKnownCurrency(uc *mw.AdminContext, c *gin.Context)

GetKnownCurrency returns currency by id swagger:route GET /portal/admin/dash/known_currencies/get/:id KnownCurrencies GetKnownCurrency

Returns currency by id

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:GetKnownCurrenciesResponse

func GetKnownInflationDestination

func GetKnownInflationDestination(uc *mw.AdminContext, c *gin.Context)

GetKnownInflationDestination returns inflation destination by id swagger:route GET /portal/admin/dash/known_inflation_destinations/get/:id KnownInflationDestinations GetKnownInflationDestination

Returns inflation destination by id

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200: GetKnownInflationDestinationsResponse

func GetPromo

func GetPromo(uc *mw.AdminContext, c *gin.Context)

GetPromo returns promo by id swagger:route GET /portal/admin/dash/promo/get/:id Promo GetPromo

Returns promo by id

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:GetPromoResponse

func GetSignerSeed

func GetSignerSeed(uc *mw.AdminContext, c *gin.Context)

GetSignerSeed - returns the signer's seed swagger:route GET /portal/admin/dash/stellar_account/signer_seed/:publickey StellarAccount GetSignerSeed

Returns the signer's seed

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:

func GetStellarAccount

func GetStellarAccount(uc *mw.AdminContext, c *gin.Context)

GetStellarAccount - returns account details swagger:route GET /portal/admin/dash/stellar_account/details/:publickey StellarAccount GetStellarAccount

Returns account details

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200: StellarAccountResponse

func ICOList

func ICOList(uc *mw.AdminContext, c *gin.Context)

ICOList returns the list of ICOs swagger:route GET /portal/admin/dash/ico/list ico ICOList

Returns the list of ICOs

Produces:
- application/json

Responses:
  200:ICOListResponse

func IssuerAccountTrustlines

func IssuerAccountTrustlines(uc *mw.AdminContext, c *gin.Context)

IssuerAccountTrustlines returns list of all accounts, filtered by given params swagger:route GET /portal/admin/dash/stellar_account/search_trusting_accounts StellarAccount IssuerAccountTrustlines

Returns list of all accounts, filtered by given params

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:SearchAccountsResponse

func IssuerAssetCodes

func IssuerAssetCodes(uc *mw.AdminContext, c *gin.Context)

IssuerAssetCodes - returns the issuer asset codes swagger:route GET /portal/admin/dash/stellar_account/asset_codes/:publickey StellarAccount IssuerAssetCodes

Returns, in a string array, the asset codes of the given issuer

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:

func KycDetails

func KycDetails(uc *mw.AdminContext, c *gin.Context)

KycDetails returns details of kyc status and documents swagger:route GET /portal/admin/dash/customer/kyc_details/:id kyc KycDetails

Returns details of kyc status and documents

Produces:
- application/json

Responses:
  200:KycDetailsResponse

func KycDocumentDownload

func KycDocumentDownload(uc *mw.AdminContext, c *gin.Context)

KycDocumentDownload returns the document swagger:route GET /portal/admin/dash/customer/kyc_document/:id kyc KycDocumentDownload

Returns the document

Produces:
- application/json

Responses:
  200:KycDocumentDownloadResponse

func Login

func Login(email string, password string, uc *mw.AdminContext, c *gin.Context) (string, bool)

Login logs in the user swagger:route POST /portal/admin/login auth Login

Logs in the user

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:

func LoginFunc

func LoginFunc(f func(email string, password string, uc *mw.AdminContext, c *gin.Context) (string, bool)) func(string, string, *gin.Context) (string, bool)

LoginFunc is used to wrap the gin function this is just an example on how to implement such functions, if the AdminContext is needed inside the api we could also have used a default gin handler and construct e.g. the log from the gin.Request, which also holds the RequestID and ServiceName

func Register

func Register(uc *mw.AdminContext, c *gin.Context)

Register creates new user in the db swagger:route POST /portal/admin/dash/user/register user Register

Creates a new user in the db

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:RegisterResponse

func RemoveAllowtrustSigner

func RemoveAllowtrustSigner(uc *mw.AdminContext, c *gin.Context)

RemoveAllowtrustSigner - removes an allow trust signer swagger:route POST /portal/admin/dash/stellar_account/remove_allowtrust_signer StellarAccount RemoveAllowtrustSigner

Removes an allow trust signer

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:

func RemoveIco

func RemoveIco(uc *mw.AdminContext, c *gin.Context)

RemoveIco - deletes ico from db swagger:route POST /portal/admin/dash/ico/remove ico RemoveIco

Deletes ico from db

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:

func RemoveIssuerAssetCode

func RemoveIssuerAssetCode(uc *mw.AdminContext, c *gin.Context)

RemoveIssuerAssetCode - removes an asset code swagger:route POST /portal/admin/dash/stellar_account/remove_asset_code StellarAccount RemoveIssuerAssetCode

Removes an asset code

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:

func RemoveOtherSigner

func RemoveOtherSigner(uc *mw.AdminContext, c *gin.Context)

RemoveOtherSigner - removes other signer swagger:route POST /portal/admin/dash/stellar_account/remove_other_signer StellarAccount RemoveOtherSigner

Removes other signer

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:

func RemoveStellarAccount

func RemoveStellarAccount(uc *mw.AdminContext, c *gin.Context)

RemoveStellarAccount - removes a stellar account swagger:route POST /portal/admin/dash/stellar_account/remove StellarAccount RemoveStellarAccount

Removes a stellar account

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:

func RemoveTrustline

func RemoveTrustline(uc *mw.AdminContext, c *gin.Context)

RemoveTrustline deletes trustline swagger:route POST /portal/admin/dash/stellar_account/remove_unathorized_trustline StellarAccount RemoveTrustline

Deletes trustline from the DB

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:

func Reset2fa

func Reset2fa(uc *mw.AdminContext, c *gin.Context)

Reset2fa resets the flag and sends the email swagger:route POST /portal/admin/dash/customer/reset2fa customer Reset2fa

Resets the flag and sends the email

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:

func SetGroups

func SetGroups(uc *mw.AdminContext, c *gin.Context)

SetGroups updates the groups for the specified user swagger:route POST /portal/admin/dash/user/setgroups user SetGroups

Updates the groups for the specified user

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:UserResponse

func UpdateIcoCurrencies

func UpdateIcoCurrencies(uc *mw.AdminContext, c *gin.Context)

UpdateIcoCurrencies - updates the supported currencies swagger:route POST /portal/admin/dash/ico/update_supported_currencies ico UpdateIcoCurrencies

Updates the supported currencies

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:

func UpdateIcoIssuer

func UpdateIcoIssuer(uc *mw.AdminContext, c *gin.Context)

UpdateIcoIssuer - updates the issuer data swagger:route POST /portal/admin/dash/ico/update_issuer_data ico UpdateIcoIssuer

Updates the issuer data

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:

func UpdateIcoKyc

func UpdateIcoKyc(uc *mw.AdminContext, c *gin.Context)

UpdateIcoKyc - updates the kyc flag swagger:route POST /portal/admin/dash/ico/update_kyc ico UpdateIcoKyc

Updates the KYC flag

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:

func UpdateIcoName

func UpdateIcoName(uc *mw.AdminContext, c *gin.Context)

UpdateIcoName - updates the name swagger:route POST /portal/admin/dash/ico/update_name ico UpdateIcoName

Updates the ico name

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:

func User

func User(uc *mw.AdminContext, c *gin.Context)

User gets the specified user by id swagger:route GET /portal/admin/dash/user/details/:id user User

Gets the specified user by id

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:UserResponse

func UserData

func UserData(uc *mw.AdminContext, c *gin.Context)

UserData returns the current logged in user info swagger:route GET /portal/admin/dash/user/user_data user UserData

Returns the current logged in user info

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:UserAuthData

func Users

func Users(uc *mw.AdminContext, c *gin.Context)

Users reads the list of users from the db swagger:route GET /portal/admin/dash/user/list user Users

Reads the list of users from the db

Produces:
- application/json

Responses:
  200:UsersResponse

func WorkerAccountTrustlines

func WorkerAccountTrustlines(uc *mw.AdminContext, c *gin.Context)

WorkerAccountTrustlines - returns worker account trustlines swagger:route GET /portal/admin/dash/stellar_account/worker_account_trustlines/:publickey StellarAccount WorkerAccountTrustlines

Returns worker account trustlines

Consumes:

  • multipart/form-data

    Produces:

  • application/json

    Responses: 200:[]WorkerTrustlineItem

Types

type ActivatePromoRequest

type ActivatePromoRequest struct {
	//required : true
	ID int `form:"id" json:"id"  validate:"required"`
	//required : true
	Active bool `form:"active" json:"active"`
}

ActivatePromoRequest request

type ActivateRequest

type ActivateRequest struct {
	//required : true
	ID int `form:"id" json:"id" validate:"required"`
	//required : true
	Active bool `form:"active" json:"active"`
}

ActivateRequest for activate/deactivate

type ActivateResponse

type ActivateResponse struct {
	ID     int  `form:"id" json:"id"`
	Active bool `form:"active" json:"active"`
}

ActivateResponse after activation/deactivation swagger:model

type AddAllowtrustRequest

type AddAllowtrustRequest struct {
	//required : true
	IssuingPublicKey  string  `form:"issuing_account_public_key" json:"issuing_account_public_key" validate:"required,base64,len=56"`
	SignerName        string  `form:"signer_name" json:"signer_name" validate:"max=256"`
	SignerDescription *string `form:"signer_description" json:"signer_description"`
	//required : true
	SignerPublicKey string `form:"signer_public_key" json:"signer_public_key" validate:"required,base64,len=56"`
	//required : true
	SignerSecretSeed string `form:"signer_secret_seed" json:"signer_secret_seed" validate:"required,base64,len=56"`
}

AddAllowtrustRequest signer info

type AddIcoPhaseRequest

type AddIcoPhaseRequest struct {
	//required : true
	IcoID int `form:"ico_id" json:"ico_id"`
	//required : true
	Name string `form:"phase_name" json:"phase_name" validate:"required,max=256"`
	//required : true
	DistributionPublicKey string `form:"distribution_account_pk" json:"distribution_account_pk" validate:"required,base64,len=56"`
	//required : true
	PreSignerPublicKey string `form:"pre_signer_pk" json:"pre_signer_pk" validate:"required,base64,len=56"`
	//required : true
	PreSignerSeed string `form:"pre_signer_seed" json:"pre_signer_seed" validate:"required,base64,len=56"`
	//required : true
	PostSignerPublicKey string `form:"post_signer_pk" json:"post_signer_pk" validate:"required,base64,len=56"`
	//required : true
	PostSignerSeed string `form:"post_signer_seed" json:"post_signer_seed" validate:"required,base64,len=56"`
	//required : true
	StartDate string `form:"start" json:"start" validate:"required"`
	//required : true
	EndDate string `form:"end" json:"end" validate:"required"`
	//required : true
	TokensToDistribute int64 `form:"tokens_to_distribute" json:"tokens_to_distribute"`
	//required : true
	MinPerOrder int64 `form:"min_tokens_per_order" json:"min_tokens_per_order"`
	//required : true
	MaxPerOrder int64 `form:"max_tokens_per_order" json:"max_tokens_per_order"`
	//required : true
	ActivatedCurrencies []PhaseCurrency `form:"activated_currencies" json:"activated_currencies" validate:"required"`
}

AddIcoPhaseRequest - request

type AddIcoRequest

type AddIcoRequest struct {
	//required : true
	Name string `form:"name" json:"name" validate:"required,max=256"`
	Kyc  bool   `form:"kyc" json:"kyc"`
	//required : true
	SalesModel string `form:"sales_model" json:"sales_model" validate:"required"`
	//required : true
	IssuerPublicKey string `form:"issuing_account_pk" json:"issuing_account_pk" validate:"required,base64,len=56"`
	//required : true
	AssetCode string `form:"asset_code" json:"asset_code" validate:"required,icop_assetcode"`
	//required : true
	SupportedCurrencies []int `form:"supported_currencies" json:"supported_currencies" validate:"required"`
}

AddIcoRequest - request

type AddKnownCurrencyRequest

type AddKnownCurrencyRequest struct {
	//required : true
	Name string `form:"name" json:"name"  validate:"required,max=500"`
	//required : true
	IssuerPublicKey string `form:"issuer_public_key" json:"issuer_public_key"  validate:"required,max=500"`
	//required : true
	AssetCode string `form:"asset_code" json:"asset_code"  validate:"required,max=500"`
	//required : true
	ShortDescription string `form:"short_description" json:"short_description"  validate:"required,max=500"`
	//required : true
	LongDescription string `form:"long_description" json:"long_description"  validate:"required,max=500"`
}

AddKnownCurrencyRequest request

type AddKnownInflationDestinationRequest

type AddKnownInflationDestinationRequest struct {
	//required : true
	Name string `form:"name" json:"name"  validate:"required,max=500"`
	//required : true
	IssuerPublicKey string `form:"issuer_public_key" json:"issuer_public_key"  validate:"required,max=500"`
	//required : true
	ShortDescription string `form:"short_description" json:"short_description"  validate:"required,max=500"`
	//required : true
	LongDescription string `form:"long_description" json:"long_description"  validate:"required,max=500"`
}

AddKnownInflationDestinationRequest request

type AddOtherSignerRequest

type AddOtherSignerRequest struct {
	//required : true
	IssuingPublicKey  string  `form:"account_public_key" json:"account_public_key" validate:"required,base64,len=56"`
	SignerName        string  `form:"signer_name" json:"signer_name" validate:"max=256"`
	SignerDescription *string `form:"signer_description" json:"signer_description"`
	//required : true
	SignerPublicKey string `form:"signer_public_key" json:"signer_public_key" validate:"required,base64,len=56"`
	//required : true
	SignerSecretSeed *string `form:"signer_secret_seed" json:"signer_secret_seed" validate:"omitempty,base64,len=56"`
}

AddOtherSignerRequest signer info

type AddPromoRequest

type AddPromoRequest struct {
	//required : true
	Name  string `form:"name" json:"name"  validate:"required,max=256"`
	Title string `form:"title" json:"title" validate:"max=512"`
	Text  string `form:"text" json:"text"`
	//required : true
	Type string `form:"type" json:"type" validate:"required,max=32"`
}

AddPromoRequest request

type AddTrustlineRequest

type AddTrustlineRequest struct {
	//required : true
	TrustorPublicKey string `form:"trusting_account_public_key" json:"trusting_account_public_key" validate:"required,base64,len=56"`
	//required : true
	IssuingPublicKey string `form:"issuing_account_public_key" json:"issuing_account_public_key" validate:"required,base64,len=56"`
	//required : true
	AssetCode string `form:"asset_code" json:"asset_code" validate:"required,icop_assetcode"`
	//required : true
	Status string `form:"status" json:"status" validate:"required,max=50"`
	//required : true
	Reason string `form:"reason" json:"reason" validate:"required,max=1000"`
}

AddTrustlineRequest - info

type AssetCodesRequest

type AssetCodesRequest struct {
	//required : true
	PublicKey string `form:"public_key" json:"public_key" validate:"required,base64,len=56"`
}

AssetCodesRequest new user information

type Button

type Button struct {
	Name string `form:"name" json:"name"`
	Link string `form:"link" json:"link"`
}

Button - one button swagger:model

type ChangeOrderKnownCurrencyRequest

type ChangeOrderKnownCurrencyRequest struct {
	//required : true
	ID int `form:"id" json:"id"  validate:"required"`
	//required : true
	OrderModifier int `form:"order_modifier" json:"order_modifier" validate:"required"`
}

ChangeOrderKnownCurrencyRequest request

type ChangeOrderKnownInflationDestinationRequest

type ChangeOrderKnownInflationDestinationRequest struct {
	//required : true
	ID int `form:"id" json:"id"  validate:"required"`
	//required : true
	OrderModifier int `form:"order_modifier" json:"order_modifier" validate:"required"`
}

ChangeOrderKnownInflationDestinationRequest request

type ChangeOrderPromoRequest

type ChangeOrderPromoRequest struct {
	//required : true
	ID int `form:"id" json:"id"  validate:"required"`
	//required : true
	OrderModifier int `form:"order_modifier" json:"order_modifier" validate:"required"`
}

ChangeOrderPromoRequest request

type CustomerDetailsResponse

type CustomerDetailsResponse struct {
	ID         int    `json:"id"`
	Email      string `json:"email"`
	Forename   string `json:"forename"`
	Lastname   string `json:"lastname"`
	Salutation string `json:"salutation"`
	//LastLogin        time.Time `json:"last_login"`
	Address           string     `json:"address"`
	ZipCode           string     `json:"zip_code"`
	City              string     `json:"city"`
	State             string     `json:"state"`
	CountryCode       string     `json:"country_code"`
	Nationality       string     `json:"nationality"`
	MobileNR          string     `json:"mobile_nr"`
	BirthDay          *time.Time `json:"birth_day"`
	BirthPlace        string     `json:"birth_place"`
	AdditionalName    string     `json:"additional_name"`
	BirthCountryCode  string     `json:"birth_country_code"`
	BankAccountNumber string     `json:"bank_account_number"`
	BankNumber        string     `json:"bank_number"`
	BankPhoneNumber   string     `json:"bank_phone_number"`
	TaxID             string     `json:"tax_id"`
	TaxIDName         string     `json:"tax_id_name"`
	OccupationName    string     `json:"occupation_name"`
	OccupationCode08  string     `json:"occupation_code08"`
	OccupationCode88  string     `json:"occupation_code88"`
	EmployerName      string     `json:"employer_name"`
	EmployerAddress   string     `json:"employer_address"`
	LanguageCode      string     `json:"language_code"`
	RegistrationDate  time.Time  `json:"registration_date"`
}

CustomerDetailsResponse - customer details response swagger:model

type CustomerEditRequest

type CustomerEditRequest struct {
	//required : true
	ID                int    `form:"id" json:"id"`
	Forename          string `form:"forename" json:"forename" validate:"required,icop_nonum,min_trim=2,max=64"`
	Lastname          string `form:"lastname" json:"lastname" validate:"required,icop_nonum,min_trim=2,max=64"`
	Salutation        string `form:"salutation" json:"salutation" validate:"max=64"`
	Address           string `form:"address" json:"address" validate:"max=512"`
	ZipCode           string `form:"zip_code" json:"zip_code" validate:"max=32"`
	City              string `form:"city" json:"city" validate:"max=128"`
	State             string `form:"state" json:"state" validate:"max=128"`
	CountryCode       string `form:"country_code" json:"country_code" validate:"max=2"`
	Nationality       string `form:"nationality" json:"nationality" validate:"max=128"`
	MobileNR          string `form:"mobile_nr" json:"mobile_nr" validate:"max=64"`
	BirthDay          string `form:"birth_day" json:"birth_day"`
	BirthPlace        string `form:"birth_place" json:"birth_place" validate:"max=128"`
	AdditionalName    string `form:"additional_name" json:"additional_name" validate:"max=255"`
	BirthCountryCode  string `form:"birth_country_code" json:"birth_country_code" validate:"max=3"`
	BankAccountNumber string `form:"bank_account_number" json:"bank_account_number" validate:"max=255"`
	BankNumber        string `form:"bank_number" json:"bank_number" validate:"max=255"`
	BankPhoneNumber   string `form:"bank_phone_number" json:"bank_phone_number" validate:"max=255"`
	TaxID             string `form:"tax_id" json:"tax_id" validate:"max=255"`
	TaxIDName         string `form:"tax_id_name" json:"tax_id_name" validate:"max=255"`
	OccupationName    string `form:"occupation_name" json:"occupation_name" validate:"max=256"`
	OccupationCode08  string `form:"occupation_code08" json:"occupation_code08" validate:"max=8"`
	OccupationCode88  string `form:"occupation_code88" json:"occupation_code88" validate:"max=8"`
	EmployerName      string `form:"employer_name" json:"employer_name" validate:"max=500"`
	EmployerAddress   string `form:"employer_address" json:"employer_address" validate:"max=500"`
	LanguageCode      string `form:"language_code" json:"language_code" validate:"max=10"`
}

CustomerEditRequest - request data

type CustomerListItem

type CustomerListItem struct {
	ID               int       `json:"id"`
	Forename         string    `json:"forename"`
	Lastname         string    `json:"last_name"`
	Email            string    `json:"email"`
	KycStatus        string    `json:"kyc_status"`
	RegistrationDate time.Time `json:"registration_date"`
	LastLogin        time.Time `json:"last_login"`
}

CustomerListItem is one item in the list swagger:model

type CustomerListRequest

type CustomerListRequest struct {
	pageinate.PaginationRequestStruct

	FilterCustomerID int      `form:"filter_customer_id" json:"filter_customer_id"`
	FilterForeName   string   `form:"filter_forename" json:"filter_forename"`
	FilterLastName   string   `form:"filter_lastname" json:"filter_lastname"`
	FilterEmail      string   `form:"filter_email" json:"filter_email"`
	FilterKycStatus  []string `form:"filter_kyc_status" json:"filter_kyc_status"`

	SortCustomerID       string `form:"sort_customer_id" json:"sort_customer_id"`
	SortForeName         string `form:"sort_forename" json:"sort_forename"`
	SortLastName         string `form:"sort_lastname" json:"sort_lastname"`
	SortEmail            string `form:"sort_email" json:"sort_email"`
	SortRegistrationDate string `form:"sort_registration_date" json:"sort_registration_date"`
	SortLastLogin        string `form:"sort_last_login" json:"sort_last_login"`
}

CustomerListRequest for filtering the customers

type CustomerListResponse

type CustomerListResponse struct {
	pageinate.PaginationResponseStruct
	Items []CustomerListItem `json:"items"`
}

CustomerListResponse list of customers swagger:model

type CustomerOrdersRequest

type CustomerOrdersRequest struct {
	pageinate.PaginationRequestStruct
}

CustomerOrdersRequest to get the orders

type CustomerUpdateKYCStatusRequest

type CustomerUpdateKYCStatusRequest struct {
	// the customer id
	//required : true
	ID int `form:"id" json:"id"`
	//KYC status, e.g. InReview, Pending
	//required : true
	KycStatus string `form:"kyc_status" json:"kyc_status" validate:"required,max=64"`
}

CustomerUpdateKYCStatusRequest - request

type CustomerWalletsRequest

type CustomerWalletsRequest struct {
	pageinate.PaginationRequestStruct
}

CustomerWalletsRequest to get the wallets

type DeleteKnownInflationDestinationRequest

type DeleteKnownInflationDestinationRequest struct {
	//required : true
	ID int `form:"id" json:"id"  validate:"required"`
}

DeleteKnownInflationDestinationRequest request used to delete

type EditAllowtrustSignerRequest

type EditAllowtrustSignerRequest struct {
	//required : true
	PublicKey string `form:"public_key" json:"public_key" validate:"required,base64,len=56"`
	//required : true
	Name        string  `form:"name" json:"name" validate:"required,max=256"`
	Description *string `form:"description" json:"description"`
}

EditAllowtrustSignerRequest edits signer

type EditKnownCurrencyRequest

type EditKnownCurrencyRequest struct {
	//required : true
	ID               int     `form:"id" json:"id"  validate:"required"`
	Name             *string `form:"name" json:"name"  validate:"max=500"`
	IssuerPublicKey  *string `form:"issuer_public_key" json:"issuer_public_key"  validate:"max=500"`
	AssetCode        *string `form:"asset_code" json:"asset_code"  validate:"max=500"`
	ShortDescription *string `form:"short_description" json:"short_description"  validate:"max=500"`
	LongDescription  *string `form:"long_description" json:"long_description"  validate:"max=500"`
}

EditKnownCurrencyRequest request

type EditKnownInflationDestinationRequest

type EditKnownInflationDestinationRequest struct {
	//required : true
	ID               int     `form:"id" json:"id"  validate:"required"`
	Name             *string `form:"name" json:"name"  validate:"max=500"`
	IssuerPublicKey  *string `form:"issuer_public_key" json:"issuer_public_key"  validate:"max=500"`
	ShortDescription *string `form:"short_description" json:"short_description"  validate:"max=500"`
	LongDescription  *string `form:"long_description" json:"long_description"  validate:"max=500"`
}

EditKnownInflationDestinationRequest request

type EditOtherSignerRequest

type EditOtherSignerRequest struct {
	//required : true
	PublicKey string `form:"public_key" json:"public_key" validate:"required,base64,len=56"`
	//required : true
	Name        string  `form:"name" json:"name" validate:"required,max=256"`
	Description *string `form:"description" json:"description"`
}

EditOtherSignerRequest edits signer

type EditPromoRequest

type EditPromoRequest struct {
	//required : true
	ID    int     `form:"id" json:"id"  validate:"required"`
	Name  *string `form:"name" json:"name"  validate:"omitempty,max=256"`
	Title *string `form:"title" json:"title" validate:"omitempty,max=512"`
	Text  *string `form:"text" json:"text"`
	Type  *string `form:"type" json:"type" validate:"omitempty,max=32"`
}

EditPromoRequest request

type EditRequest

type EditRequest struct {
	//required : true
	ID        int    `form:"id" json:"id" validate:"required"`
	Password  string `form:"password" json:"password"`
	FirstName string `form:"firstname" json:"firstname"`
	LastName  string `form:"lastname" json:"lastname"`
	Phone     string `form:"phone" json:"phone"`
	Active    bool   `form:"active" json:"active"`
}

EditRequest - edits user information

type ExchangeCurrencyListRequest

type ExchangeCurrencyListRequest struct {
	//required : true
	IcoID int `form:"ico_id" json:"ico_id"`
}

ExchangeCurrencyListRequest request

type ExchangeCurrencyListResponse

type ExchangeCurrencyListResponse struct {
	ID        int    `json:"id"`
	Name      string `json:"name"`
	Type      string `json:"type"`
	AssetCode string `json:"asset_code"`
	Issuer    string `json:"issuer"`
	Enabled   string `json:"enabled"`
}

ExchangeCurrencyListResponse response swagger:model

type GetKnownCurrenciesResponse

type GetKnownCurrenciesResponse struct {
	ID               int    `form:"id" json:"id"`
	Name             string `form:"name" json:"name"`
	IssuerPublicKey  string `form:"issuer_public_key" json:"issuer_public_key"`
	AssetCode        string `form:"asset_code" json:"asset_code"`
	ShortDescription string `form:"short_description" json:"short_description"`
	LongDescription  string `form:"long_description" json:"long_description"`
	OrderIndex       int    `form:"order_index" json:"order_index"`
}

GetKnownCurrenciesResponse response swagger:model

type GetKnownInflationDestinationsResponse

type GetKnownInflationDestinationsResponse struct {
	ID               int    `form:"id" json:"id"`
	Name             string `form:"name" json:"name"`
	IssuerPublicKey  string `form:"issuer_public_key" json:"issuer_public_key"`
	ShortDescription string `form:"short_description" json:"short_description"`
	LongDescription  string `form:"long_description" json:"long_description"`
	OrderIndex       int    `form:"order_index" json:"order_index"`
}

GetKnownInflationDestinationsResponse response swagger:model

type GetPromoRequest

type GetPromoRequest struct {
	//required : true
	ID int `form:"id" json:"id" query:"id" validate:"required"`
}

GetPromoRequest request used in get one and delete

type GetPromoResponse

type GetPromoResponse struct {
	ID      int                `form:"id" json:"id"`
	Name    string             `form:"name" json:"name"`
	Title   string             `form:"title" json:"title"`
	Text    string             `form:"text" json:"text"`
	Image   PromoImageResponse `form:"image" json:"image"`
	Active  bool               `form:"active" json:"active"`
	Type    string             `form:"type" json:"type"`
	Buttons []Button           `form:"buttons" json:"buttons"`
}

GetPromoResponse response swagger:model

type GetSignerSeedRequest

type GetSignerSeedRequest struct {
	//required : true
	PublicKey string `form:"public_key" json:"public_key" validate:"required,base64,len=56"`
}

GetSignerSeedRequest new user information

type ICOListResponse

type ICOListResponse struct {
	ID                 int    `json:"ico_id"`
	Name               string `json:"name"`
	Status             string `json:"status"`
	KYC                bool   `json:"kyc"`
	SaleModel          string `json:"sale_model"`
	TokensReleased     int64  `json:"tokens_released"`
	IssuingAccountName string `json:"issuing_account_name"`
	IssuingAccountPK   string `json:"issuing_account_pk"`
	AssetCode          string `json:"asset_code"`
}

ICOListResponse response swagger:model

type IssuerAssetCodeRequest

type IssuerAssetCodeRequest struct {
	//required : true
	PublicKey string `form:"public_key" json:"public_key" validate:"required,base64,len=56"`
	//required : true
	AssetCode string `form:"asset_code" json:"asset_code" validate:"required,icop_assetcode"`
}

IssuerAssetCodeRequest new user information

type KnownCurrencyDeleteRequest

type KnownCurrencyDeleteRequest struct {
	//required : true
	ID int `form:"id" json:"id"  validate:"required"`
}

KnownCurrencyDeleteRequest request used in get one and delete

type KnownCurrencyIDRequest

type KnownCurrencyIDRequest struct {
	//required : true
	ID int `form:"id" json:"id"  validate:"required"`
}

KnownCurrencyIDRequest request used in get one and delete

type KnownInflationDestinationIDRequest

type KnownInflationDestinationIDRequest struct {
	//required : true
	ID int `form:"id" json:"id"  validate:"required"`
}

KnownInflationDestinationIDRequest request used to get one

type KycDetailsResponse

type KycDetailsResponse struct {
	Status    string        `json:"status"`
	Documents []KycDocument `json:"documents"`
}

KycDetailsResponse - kyc details swagger:model

type KycDocument

type KycDocument struct {
	ID               int       `json:"id"`
	Type             string    `json:"type"`
	Format           string    `json:"format"`
	Side             string    `json:"side"`
	UploadDate       time.Time `json:"upload_date"`
	IDCountryCode    string    `json:"id_country_code"`
	IDNumber         string    `json:"id_number"`
	IDIssueDate      time.Time `json:"id_issue_date"`
	IDExpirationDate time.Time `json:"id_expiration_date"`
}

KycDocument - document item swagger:model

type KycDocumentDownloadResponse

type KycDocumentDownloadResponse struct {
	FileName string `json:"file_name"`
	Content  string `json:"content"`
	MimeType string `json:"mime_type"`
}

KycDocumentDownloadResponse - document content and details swagger:model

type OrderListItem

type OrderListItem struct {
	ID     int       `json:"id"`
	Date   time.Time `json:"date"`
	Amount int64     `json:"amount"`
	Price  float64   `json:"price"`
	Chain  string    `json:"chain"`
	Status string    `json:"status"`
}

OrderListItem is one item in the list swagger:model

type OrderListResponse

type OrderListResponse struct {
	pageinate.PaginationResponseStruct
	Items []OrderListItem `json:"items"`
}

OrderListResponse list of orders swagger:model

type PhaseCurrency

type PhaseCurrency struct {
	CurrencyID    int   `form:"currency_id" json:"currency_id"`
	Price         int64 `form:"price" json:"price"`
	BankAccountID *int  `form:"bank_account_id" json:"bank_account_id"`
}

PhaseCurrency - request

type PromoDeleteRequest

type PromoDeleteRequest struct {
	//required : true
	ID int `form:"id" json:"id"  validate:"required"`
}

PromoDeleteRequest request used in get one and delete

type PromoImageResponse

type PromoImageResponse struct {
	FileName string `json:"file_name"`
	Content  string `json:"content"`
	MimeType string `json:"mime_type"`
}

PromoImageResponse - image content and details swagger:model

type RegisterRequest

type RegisterRequest struct {
	//required : true
	Email string `form:"email" json:"email" validate:"required,icop_email"`
	//required : true
	Password string `form:"password" json:"password" validate:"required"`
	//required : true
	FirstName string `form:"firstname" json:"firstname" validate:"required"`
	//required : true
	LastName string `form:"lastname" json:"lastname" validate:"required"`
	//required : true
	Phone string `form:"phone" json:"phone" validate:"required,icop_phone"`
	//required : true
	Active bool `form:"active" json:"active"`
	//required : true
	Groups []string `form:"groups" json:"groups" validate:"required"`
}

RegisterRequest new user information

type RegisterResponse

type RegisterResponse struct {
	ID     int    `form:"id" json:"id"`
	Email  string `form:"email" json:"email"`
	Active bool   `form:"active" json:"active"`
}

RegisterResponse after registration swagger:model

type RemoveIcoRequest

type RemoveIcoRequest struct {
	//required : true
	ID int `form:"id" json:"id"`
}

RemoveIcoRequest - request

type RemoveOtherSignerRequest

type RemoveOtherSignerRequest struct {
	//required : true
	IssuingPublicKey string `form:"account_public_key" json:"account_public_key" validate:"required,base64,len=56"`
	//required : true
	SignerPublicKey string `form:"signer_public_key" json:"signer_public_key" validate:"required,base64,len=56"`
}

RemoveOtherSignerRequest new user information

type RemoveSignerRequest

type RemoveSignerRequest struct {
	//required : true
	IssuingPublicKey string `form:"issuing_account_public_key" json:"issuing_account_public_key" validate:"required,base64,len=56"`
	//required : true
	SignerPublicKey string `form:"signer_public_key" json:"signer_public_key" validate:"required,base64,len=56"`
}

RemoveSignerRequest new user information

type RemoveTrustlineRequest

type RemoveTrustlineRequest struct {
	//required : true
	TrustorPublicKey string `form:"trusting_account_public_key" json:"trusting_account_public_key" validate:"required,base64,len=56"`
	//required : true
	IssuingPublicKey string `form:"issuing_account_public_key" json:"issuing_account_public_key" validate:"required,base64,len=56"`
	//required : true
	AssetCode string `form:"asset_code" json:"asset_code" validate:"required,icop_assetcode"`
}

RemoveTrustlineRequest - info

type Reset2faRequest

type Reset2faRequest struct {
	// the customer id
	//required : true
	ID int `form:"id" json:"id"`
}

Reset2faRequest - request

type SearchAccountsItem

type SearchAccountsItem struct {
	Name      string `json:"name"`
	PublicKey string `json:"public_key"`
	AssetCode string `json:"asset_code"`
	Type      string `json:"type"`
	Status    string `json:"status"`
	Reason    string `json:"reason"`
}

SearchAccountsItem is one item in the list swagger:model

type SearchAccountsRequest

type SearchAccountsRequest struct {
	pageinate.PaginationRequestStruct
	//required : true
	IssueingPublicKey string `form:"issuing_account_public_key" json:"issuing_account_public_key" validate:"required,base64,len=56"`
	//required : true
	AssetCode       string `form:"asset_code" json:"asset_code" validate:"required,icop_assetcode"`
	FilterName      string `form:"filter_name" json:"filter_name"`
	FilterPublicKey string `form:"filter_public_key" json:"filter_public_key" validate:"omitempty,base64,len=56"`
	//required : true
	FilterType     string   `form:"filter_type" json:"filter_type" validate:"required"`
	FilterStatuses []string `form:"filter_statuses" json:"filter_statuses"`
}

SearchAccountsRequest for filtering the issuer's trusting accounts

type SearchAccountsResponse

type SearchAccountsResponse struct {
	pageinate.PaginationResponseStruct
	Items []SearchAccountsItem `json:"items"`
}

SearchAccountsResponse list of accounts swagger:model

type SetGroupsRequest

type SetGroupsRequest struct {
	//required : true
	ID int `form:"id" json:"id" validate:"required"`
	//required : true
	Groups []string `form:"groups" json:"groups" validate:"required"`
}

SetGroupsRequest information

type SignerType

type SignerType string

SignerType holds the type of a signer

type StellarAccountAddRequest

type StellarAccountAddRequest struct {
	//required : true
	PublicKey string `form:"public_key" json:"public_key" validate:"required,base64,len=56"`
	//required : true
	Name string `form:"name" json:"name" validate:"required,max=256"`
	//required : true
	Description string `form:"description" json:"description" validate:"required"`
	//required : true
	Type string `form:"type" json:"type" validate:"required"`
	//required : true
	AssetCode string `form:"asset_code" json:"asset_code" validate:"omitempty,icop_assetcode"`
}

StellarAccountAddRequest new user information

type StellarAccountEditRequest

type StellarAccountEditRequest struct {
	//required : true
	PublicKey   string  `form:"public_key" json:"public_key" validate:"required,base64,len=56"`
	Name        *string `form:"name" json:"name" validate:"max=256"`
	Description *string `form:"description" json:"description"`
}

StellarAccountEditRequest new user information

type StellarAccountItem

type StellarAccountItem struct {
	PublicKey   string `form:"public_key" json:"public_key"`
	Name        string `form:"name" json:"name"`
	Description string `form:"description" json:"description"`
	Type        string `form:"type" json:"type"`
}

StellarAccountItem new user information swagger:model

type StellarAccountRequest

type StellarAccountRequest struct {
	//required : true
	PublicKey string `form:"public_key" json:"public_key" validate:"required,base64,len=56"`
}

StellarAccountRequest new user information

type StellarAccountResponse

type StellarAccountResponse struct {
	PublicKey         string          `form:"public_key" json:"public_key"`
	Name              string          `form:"name" json:"name"`
	Description       string          `form:"description" json:"description"`
	Type              string          `form:"type" json:"type"`
	AssetCodes        []string        `form:"asset_codes" json:"asset_codes"`
	AllowTrustSigners []StellarSigner `form:"allow_trust_signers" json:"allow_trust_signers"`
	OtherSigners      []StellarSigner `form:"other_signers" json:"other_signers"`
}

StellarAccountResponse new user information swagger:model

type StellarAccountType

type StellarAccountType string

StellarAccountType holds the type of the account

type StellarSigner

type StellarSigner struct {
	SignerPublicKey string `form:"public_key" json:"public_key"`
	Name            string `form:"name" json:"name"`
	Description     string `form:"description" json:"description"`
}

StellarSigner - signer details swagger:model

type UpdateIcoCurrenciesRequest

type UpdateIcoCurrenciesRequest struct {
	//required : true
	ID int `form:"id" json:"id"`
	//required : true
	SupportedCurrencies []int `form:"supported_currencies" json:"supported_currencies" validate:"required"`
}

UpdateIcoCurrenciesRequest - request

type UpdateIcoIssuerRequest

type UpdateIcoIssuerRequest struct {
	//required : true
	ID int `form:"id" json:"id"`
	//required : true
	IssuerPublicKey string `form:"issuing_account_pk" json:"issuing_account_pk" validate:"required,base64,len=56"`
	//required : true
	AssetCode string `form:"asset_code" json:"asset_code" validate:"required,icop_assetcode"`
}

UpdateIcoIssuerRequest - request

type UpdateIcoKycRequest

type UpdateIcoKycRequest struct {
	//required : true
	ID int `form:"id" json:"id"`
	//required : true
	Kyc bool `form:"kyc" json:"kyc"`
}

UpdateIcoKycRequest - request

type UpdateIcoNameRequest

type UpdateIcoNameRequest struct {
	//required : true
	ID int `form:"id" json:"id"`
	//required : true
	Name string `form:"name" json:"name" validate:"required,max=256"`
}

UpdateIcoNameRequest - request

type UserAuthData

type UserAuthData struct {
	UserID      int      `json:"id"`
	Email       string   `json:"email"`
	FirstName   string   `json:"firstname"`
	LastName    string   `json:"lastname"`
	Phone       string   `json:"phone"`
	Active      bool     `json:"active"`
	Groups      []string `json:"groups"`
	IsAdmin     bool     `json:"is_admin"`
	IsDeveloper bool     `json:"is_developer"`
}

UserAuthData of the logged in user swagger:model

type UserResponse

type UserResponse struct {
	ID        int      `json:"id"`
	Email     string   `json:"email"`
	FirstName string   `json:"firstname"`
	LastName  string   `json:"lastname"`
	Phone     string   `json:"phone"`
	Active    bool     `json:"active"`
	Groups    []string `json:"groups"`
}

UserResponse holds the user reponse info swagger:model

type UsersResponse

type UsersResponse struct {
	Users []UserResponse `form:"users" json:"users"`
}

UsersResponse holds the user list swagger:model

type WalletListItem

type WalletListItem struct {
	Name       string `json:"name"`
	PublicKey  string `json:"public_key"`
	WalletType string `json:"wallet_type"`
}

WalletListItem is one item in the list swagger:model

type WalletListResponse

type WalletListResponse struct {
	pageinate.PaginationResponseStruct
	Items []WalletListItem `json:"items"`
}

WalletListResponse list of wallets swagger:model

type WorkerAccountTrustlinesRequest

type WorkerAccountTrustlinesRequest struct {
	//required : true
	PublicKey string `form:"public_key" json:"public_key" validate:"required,base64,len=56"`
}

WorkerAccountTrustlinesRequest - info

type WorkerTrustlineItem

type WorkerTrustlineItem struct {
	AssetCode string `json:"asset_code"`
	Issuer    string `json:"asset_issuer"`
	Status    string `json:"status"`
	Reason    string `json:"reason"`
}

WorkerTrustlineItem - response item swagger:model

Jump to

Keyboard shortcuts

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