Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DepObtainUserDid ¶
func DepObtainUserDid(ctx iris.Context) dto.InjectedParam
DepObtainUserDid depObtainUserDid this tries to get the user DID stored in the previously generated auth Bearer token.
Types ¶
type HAuth ¶
type HAuth struct {
// contains filtered or unexported fields
}
func NewAuthHandler ¶
func NewAuthHandler(app *iris.Application, MdwAuthChecker *context.Handler, svcR *utils.SvcResponse, svcC *utils.SvcConfig) HAuth
NewAuthHandler create and register the authentication handlers for the App. For the moment, all the auth handlers emulates the Oauth2 "password" grant-type using the "client-credentials" flow.
- app *iris.Application ~ Iris App instance
- MdwAuthChecker *context.Handler ~ Authentication checker middleware
- svcR *utils.SvcResponse ~ GrantIntentResponse service instance
- svcC utils.SvcConfig ~ Configuration service instance
type HBlockchainTxs ¶
type HBlockchainTxs struct {
// contains filtered or unexported fields
}
HBlockchainTxs endpoint handler struct for HLF blockchain transactions
func NewBlockchainTxsHandler ¶
func NewBlockchainTxsHandler(app *iris.Application, mdwAuthChecker *context.Handler, svcR *utils.SvcResponse, svcC *utils.SvcConfig) HBlockchainTxs
NewBlockchainTxsHandler create and register the handler for HLF blockchain transactions (txs)
- app *iris.Application ~ Iris App instance
- MdwAuthChecker *context.Handler ~ Authentication checker middleware
- svcR *utils.SvcResponse ~ GrantIntentResponse service instance
- svcC utils.SvcConfig ~ Configuration service instance
func (HBlockchainTxs) CreateAsset ¶
func (h HBlockchainTxs) CreateAsset(ctx iris.Context)
CreateAsset create an asset in the world state with provided parameters. @Summary create an asset in the world state with provided parameters. @Tags Txs.mycc @Security ApiKeyAuth @Accept json @Produce json @Param Authorization header string true "Insert access token" default(Bearer <Add access token here>) @Param Asset body dto.Asset true "Asset Data" @Success 204 "OK" @Failure 401 {object} dto.Problem "err.unauthorized" @Failure 400 {object} dto.Problem "err.processing_param" @Failure 502 {object} dto.Problem "err.bad_gateway" @Failure 504 {object} dto.Problem "err.network" @Router /txs/create_asset [post]
func (HBlockchainTxs) InitLedger ¶
func (h HBlockchainTxs) InitLedger(ctx iris.Context)
InitLedger populate the ledger with first data @Summary populate the ledger with first data @Description populate the ledger with first data @Tags Txs.mycc @Security ApiKeyAuth @Accept json @Produce json @Param Authorization header string true "Insert access token" default(Bearer <Add access token here>) @Success 200 {object} dto.DevPopulateOut "OK" @Failure 401 {object} dto.Problem "err.unauthorized" @Failure 502 {object} dto.Problem "err.bad_gateway" @Failure 504 {object} dto.Problem "err.network" @Router /txs/init_ledger [post]
func (HBlockchainTxs) ReadAsset ¶
func (h HBlockchainTxs) ReadAsset(ctx iris.Context)
ReadAsset Get asset from the blockchain ledger. Contracts: mycc @Summary Get asset from the blockchain ledger. @description.markdown ReadAsset_Request @Tags Txs.mycc @Security ApiKeyAuth @Accept json @Produce json @Param Authorization header string true "Insert access token" default(Bearer <Add access token here>) @Param id path string true "ID" Format(string) @Success 200 {object} byte "OK" @Failure 401 {object} dto.Problem "err.unauthorized" @Failure 400 {object} dto.Problem "err.processing_param" @Failure 502 {object} dto.Problem "err.bad_gateway" @Failure 504 {object} dto.Problem "err.network" @Router /txs/read_asset/{id} [get]
func (HBlockchainTxs) UpdateAsset ¶
func (h HBlockchainTxs) UpdateAsset(ctx iris.Context)
UpdateAsset updates an existing asset in the world state with provided parameters. @Summary updates an existing asset in the world state with provided parameters. @Tags Txs.mycc @Security ApiKeyAuth @Accept json @Produce json @Param Authorization header string true "Insert access token" default(Bearer <Add access token here>) @Param Asset body dto.Asset true "Asset Data" @Success 204 "OK" @Failure 401 {object} dto.Problem "err.unauthorized" @Failure 400 {object} dto.Problem "err.processing_param" @Failure 502 {object} dto.Problem "err.bad_gateway" @Failure 504 {object} dto.Problem "err.network" @Router /txs/update_asset [patch]