/* * Micro Service * Package: gitlab.hexacode.org/go-libs/microservice * Maintainer: Azzis Arswendo * * Copyright (C) 2023 Hexacode Teknologi Indonesia * All Rights Reserved */ package main import ( "fmt" "gitlab.hexacode.org/go-libs/hctypes" "gitlab.hexacode.org/go-libs/microservice/config" ) func Registration(ctx *config.ConfigContext) (int, hctypes.Dict, *config.ReturnHTTPError) { fmt.Println(ctx.Config.ToDict().ToColoredJson()) fmt.Println(ctx.ConfigApi.ToDict().ToColoredJson()) fmt.Println(ctx.URLParams.ToColoredJson()) fmt.Println(ctx.Params.ToColoredJson()) fmt.Println(ctx.Headers.ToColoredJson()) return 200, hctypes.Dict{ "id": 1, "otp": 123456, }, nil } func Verification(ctx *config.ConfigContext) (int, hctypes.Dict, *config.ReturnHTTPError) { fmt.Println(ctx.Config.ToDict().ToColoredJson()) fmt.Println(ctx.ConfigApi.ToDict().ToColoredJson()) fmt.Println(ctx.URLParams.ToColoredJson()) fmt.Println(ctx.Params.ToColoredJson()) fmt.Println(ctx.Headers.ToColoredJson()) return 200, hctypes.Dict{ "success": true, "message": "OTP verified", }, nil }