Hi, am new to go language and need help or ideas as how i can write a
server oauth2 to have a client authenticated..
If there is an already code or if i have to write my own then please help
with the guidlines of how write it
The client have to send a POST request and get authenticated and then
Hi,
Am new in Go programming and need help to write a PATCH method for my
go-server.
my data field look like these
type NFProfile struct {
NFType string `json:"nftype"`
NFInstanceID string `json:"instanceid"`
NFStatus string `json:"nfstatus"`
ID string `json:"id"`
}
Hi
I have this working main function code and would like to rewrite it such
that the middleware "validateToken" would be applied
to all my gorilla mux routes.
Please attached is the file containg the working code.
What i would like to do is to use the handler function
On Wednesday, April 3, 2019 at 11:28:55 AM UTC+3, afriyie...@gmail.com
wrote:
>
> Hi
>
> I have this working main function code and would like to rewrite it such
> that the middleware "validateToken" would be applied
> to all my gorilla mux routes.
> Please attached is the file containg the
On Wednesday, April 3, 2019 at 11:28:55 AM UTC+3, afriyie...@gmail.com
wrote:
>
> Hi
>
> I have this working main function code and would like to rewrite it such
> that the middleware "validateToken" would be applied
> to all my gorilla mux routes.
> Please attached is the file containg the
Hi,
Am using mongodb as database. Am able to query the database from the
command line using the command
db.nfinstances.distinct("ipv4Addresses",{"nfType":"AMF",
"amfInfo.amfSetId": "3fa85f64-5717-4562-b3fc-2c963f66af33"})
and this give me ipaddress [x.x.x.x] output that i want.
mongo
Hi,
I have this main function in a main.go file inside the main directory
func main() {
log.Printf("Server started")
router := sw.NewRouter()
manager := manage.NewDefaultManager()
manager.SetAuthorizeCodeTokenCfg(manage.DefaultAuthorizeCodeTokenCfg)
I have modify the middleware to the below but it only work if the handler
function "/protected" is in the main function.
I have many handlers and do not want to put all of them in the main.go.
You suggest i define a struct and use member function of the struct, can
you elaborate more about for
changing and using "router.Use(getTokenMW(server))" is validating all the
routes. How can i exclude routes
/oauth2/token and /credentials. I read that populate but i dont get the
idea.
Any clew about how to go about this?
On Wednesday, April 3, 2019 at 6:47:12 PM UTC+3, Burak Serdar wrote:
>
Hi,
Yes this make sense and it works. The code also look simple to read.
Thanks!!
On Thursday, April 4, 2019 at 7:54:27 PM UTC+3, car...@hotmail.com wrote:
>
> How about something like this? Unsure about concurrent access to global
> variables, but if you want to access srv and clientstore
hi,
This is what i have done so far but still need some help as to how to
return ""v.APIVersionInURI" in the loop function (FindAlluris()) .
Am trying to write a function which will return all the
field ""v.APIVersionInURI" in the mongo db and then
use this function in my API handler function.
Hi,
Am quite new in go language and asking for help.
I have this JSON object in mongodb with collection name "COLLECTION",
I have multiple object in the database (mongo) and would like to access all
the string
values """apiVersionInUri": "string", in all the objects.
Can anyone help me do this
hi,
currently am able to get the vlaues but will like to get both key and
values, how will i
be able to do it.
This is output i got now, a slice of the apiVersionInUri", which is corent
but want it with the keys, like "apiVersionInUri": "http://instance4.com";,
map form
[
Hi,
I have a json data in mongodb in the format be bellow, i need help to
access the data using
the "nfinstanceID" which is a uuid string ID part of an api request for
example example
"http://localhost:5050/nnrf-nfm/v1/nf-instances/3fa85f64-5717-4562-b3fc-2c963f66afaa;
The api route is
Hi,
Please attacted is app files (unnecessary codes deleted). I don’t if I
could made mode simpler
but this is how am able let you identify the problem am encountering when I
run this code.
I tried to print the request header and body and this is what am getting
]
&{{ObjectIdHex("") 0 0
Hi,
Am trying to write a simple api using gorm and Sqlite3 database. Am using
stuct and functions below.
However, after "PUT" of JSON format payload using Postman, the instances
get created but when try
to "GET" all the instances, the array content shows "plmnList : null"
without the array key
I have this simple http server. How can i access the request data to a
global variable and use it in any other part of my application (example in
different function).
package main
import (
"io"
"net/http")
var data string // Get http request URL data globally and use it in other
Am trying to create an app that can receive an api request and use the api
request parameters as input to send a new diameter request to a diamter
node. For examplehe
diameter interface<- App <-- api interface
So the app receive an http request from a client using some url
Hi,
I have this data or document in mongodb.
{
"nfInstanceId": "3fa85f64-5717-4562-b3fc-2c963f66af37",
"nfType": [
"AMF"
],
"nfStatus": [
"string"
],
"sNssais": [{
"sst": 1,
"sd": "sd1"
}
],
"nsiList": [
"string"
],
"ipv4Addresses": [
"198.51.100.100"
],
"allowedNssais": [{
Hi all,
I cannot see diameter messages of my custom diameter application
(Application-ID 16777255, code: 8388620) in Wireshark after modifying the
go-diameter example server and client codes. Can you explain why am not
seeing my custom application AVPs in Wireshark? What I did was to write a
HkI4mZ7Eg>
.
Thanks for the hint.
Abraham
On Wednesday, August 28, 2019 at 10:28:16 AM UTC+3, Afriyie Abraham Kwabena
wrote:
>
> Hi All,
>
> It it possible to modify the go-diameter package to implement Diameter EAP
> Application, that is
> instead of the current capabiliti
Hi All,
It it possible to modify the go-diameter package to implement Diameter EAP
Application, that is
instead of the current capabilities exchange request and answer, CER/CEA
exchange,
i would like to do a DER/DEA request and answer.
If possible how would go about it, which files or part of
I have tried to query mysql database table data but am getting the byte
data after trying many instances to convert the byte data to the
hexadecimal values. Any help about how can i get the hexadecimal values
from the database.
I created the table below as
CREATE TABLE
Hi
hex.EncodeString works!
The problem was the struct field types ([]byte) instead of string.
Thanks!
On Wednesday, September 4, 2019 at 4:49:46 PM UTC+3, burak serdar wrote:
>
> On Wed, Sep 4, 2019 at 6:41 AM >
> wrote:
> >
> >
> > I have tried to query mysql database table data but am
Hi,
Am developing a diameter server using go-diameter package that need to
perform EAP-AKA authentication.
In the DER/DEA process, the client will be sending multiple request to the
server,
that is first the client sends an identity request to the server, the
server respond with
RAND,
Can anyone help me perform dynamic unmarshalling depending on the type of
messages received from a diameter client. In the code below, I have to two
structures which represent two different messages received by a diameter
server. I would like to modify the current code which unmarshals the
Hi,
Am developing a diameter server using go-diameter package that need to
perform EAP-AKA authentication.
In the DER/DEA process, the client will be sending multiple request to the
server,
that is first the client sends an identity request to the server, the
server respond with
RAND, MAC,
I have trying to write a function that will accept a string as an input and
return another string in a slice but it not working. I have function that
unmarshal udp response to a type AuthVectors and then append the type
struct data into an array authVecSlice. Below is the code
type
I have trying to write a function that will accept a string as an input and
return another string in a slice but it not working. I have function that
unmarshal udp response to a type AuthVectors and then append the type
struct data into an array authVecSlice. Below is the code
type
I have trying to write a function that will accept a string as an input and
return another string in a slice but it not working. I have function that
unmarshal udp response to a type AuthVectors and then append the type
struct data into an array authVecSlice. Below is the code
type
I have trying to write a function that will accept a string as an input and
return another string in a slice but it not working. I have function that
unmarshal udp response to a type AuthVectors and then append the type
struct data into an array authVecSlice. Below is the code
type
I have trying to write a function that will accept a string as an input and
return another string in a slice but it not working. I have function that
unmarshal udp response to a type AuthVectors and then append the type
struct data into an array authVecSlice. Below is the code
type
I have trying to write a function that will accept a string as an input and
return another string in a slice but it not working. I have function that
unmarshal udp response to a type AuthVectors and then append the type
struct data into an array authVecSlice. Below is the code
type
I have trying to write a function that will accept a string as an input and
return another string in a slice but it not working. I have function that
unmarshal udp response to a type AuthVectors and then append the type
struct data into an array authVecSlice. Below is the code
type
I have trying to write a function that will accept a string as an input and
return another string in a slice but it not working. I have function that
unmarshal udp response to a type AuthVectors and then append the type
struct data into an array authVecSlice. Below is the code
type
Hi,
How I can use the .toml file to parse IP address and port to simple http
server instead of using flags
I have a config.toml file which contains these parameters in
PORT = "8000"
Address = "localhost"
//Parameters type struct as
type Config struct {
PORTstring
Address string
}
I can
Hi,
I have applied similar scenario to the function below but am not getting
the Ip address and the port number. Below is the function
var addr string
func init(){
var conf Config
if _, err := toml.Decode("config.toml", ); err != nil {
// handle error
}
addr =
Hi,
I have solve the problem and it works now. Thanks.
On Monday, September 30, 2019 at 11:06:20 AM UTC+3, Afriyie Abraham Kwabena
wrote:
>
> Hi,
>
> I have applied similar scenario to the function below but am not getting
> the Ip address and the port number. Below is the f
Hi,
I have been trying to create a dynamic mongodb query using golang interface
but the logical $or does not work.
It only return a documents when the input matches the bson.M{"sNssais.sst":
args[0].(int32), "sNssais.sd": args[1].(string)}.
other matches like bson.M{"amfInfo.taiList.tac":
": "string"
},
"tac": "3022",
"nid": "string"
}],
},
"customInfo": {}
}
The args in the *.tac are string values, even if i set the type casting
like bson.M{"amfInfo.taiList.ta
Hi,
The problem wa about the index, i solved it by using the right index
bson.M{"amfInfo.taiList.tac": args[2]} since the fuction is called
Da.FindIp(targetNfType, sst, sd, tac)
Thanks!
On Thursday, January 16, 2020 at 5:04:40 PM UTC+2, Afriyie Abraham Kwabena
wrote:
>
> Hi,
Hi I have in my collection this JSON
{
"allowedSnssaiList": [
{
"allowedSnssai": {
"sst": 1,
"sd": "1"
},
"allowedSnssai": {
"sst": 2,
"sd": "3"
}
}
]
}
how can query using the key sst and sd to return a documents matching the
two exact values? Example when i query using sst:1, sd
Hi,
THanks!!
BR
Abraham
On Friday, November 27, 2020 at 11:12:53 AM UTC+2 b.ca...@pobox.com wrote:
> On Friday, 27 November 2020 at 06:14:48 UTC Afriyie Abraham Kwabena wrote:
>
>> What I would like to ask is, using mutex OK and if not the best way of
>> solving it, how can
if err != nil {
config.Logrus.Error(err)
}
delete(idtime, keyid)
}
}
mu.Unlock()
}
}
BR
Abraham
On Wednesday, November 18, 2020 at 10:51:49 AM UTC+2 Afriyie Abraham
Kwabena wrote:
> Hi Sulhan, Anderson,
>
> Th
common.WriteError(response, common.ErrMethodNotAllowed)
return
}
}
BR
Abraham
On Friday, November 27, 2020 at 6:38:52 AM UTC+2 Shulhan wrote:
>
>
> > On 27 Nov 2020, at 07.06, Afriyie Abraham Kwabena
> wrote:
> >
> > Hi,
> >
> > Am exp
+0x11e
net/http.(*conn).serve()
/usr/local/go/src/net/http/server.go:1834 +0x1d5b
Goroutine 18 (running) created at:
main.main()
/home/xxx/go/src/nfnrfapi/main.go:41 +0x2c6
On Friday, November 27, 2020 at 8:14:48 AM UTC+2 Afriyie Abraham Kwabena
wrote:
> Hi,
>
>
Hi,
My question is about multiple HTTP client polling an HTTP server randomly
with a PATCH request to update a resource at the server running in front of
MongoDB. The clients poll with their different ids and a valid time in
their request. At the server, I can keep their ids and their
wrote:
>
> > On 14 Nov 2020, at 20.06, Afriyie Abraham Kwabena
> wrote:
> >
> > Hi,
> >
> > My question is about multiple HTTP client polling an HTTP server
> randomly with a PATCH request to update a resource at the server running in
> front of MongoDB.
Hi,
My basic understanding of HTTP protocol is that an HTTP client sent
request, get response from the HTTP server and then the connection is
closed.
My question is how can an HTTP client detect if the underling transport
connection break. For example if the HTTP server shutdown, is there a
Hi,
Am new to programming and if you could explain further what you mean by
long lived process.
On Friday, November 20, 2020 at 11:41:42 AM UTC+2 amits...@gmail.com wrote:
>
>
> On Fri, 20 Nov 2020, 7:51 pm Afriyie Abraham Kwabena, <
> afriyie...@gmail.com> wrote:
>
>
Hi,
Yes, that is what intend to implement. Can you help with some information
about how
I could implement it.
If possible some libraries or example code.
Abraham
On Friday, November 20, 2020 at 1:07:12 PM UTC+2 Afriyie Abraham Kwabena
wrote:
> Hi,
>
> Am new to programming and if
>= 60 {
// delete resouce in database after 60 seconds
_ = DeleteNFInstance(ctx, keyid)
}
}
mu.Unlock()
}
}
BR
Abraham
On Tuesday, November 17, 2020 at 9:41:01 PM UTC+2 Shulhan wrote:
>
>
> > On 18 Nov 2020, at 01.06,
ve the 3 servers tracking the same
> client. It might happen server A doesn't receive any request from the
> client for a while, but not because the client isn't pooling any more, but
> because all requests are being directed to either B or C.
>
> On Tuesday, 17 November 2020 at
On Tuesday, November 17, 2020 at 3:48:44 PM UTC+2 Shulhan wrote:
> Hi Afriyie,
>
> Looks like you almost there ;)
>
> > On 17 Nov 2020, at 20.11, Afriyie Abraham Kwabena
> wrote:
> >
> > HI,
> >
> > This is what I have tried so far but am not able
func main() {
> r := NewRouter()
>
> go worker()
>
>
> fmt.Println("Start listening")
> fmt.Println(http.ListenAndServe(":8080", r))
> }
>
> I appreciate your help but am still not able to it work.
>
>
> On Tuesday, Nov
Hi,
I have been learning Golang for some few months now but still find it
difficult to design some applications. I have two HTTP servers A and B and
would like to do the following
1. server A send an HTTP PUT request with JSON body to server B.
2. If server B is not available, server A retry
56 matches
Mail list logo