Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 08:54

    kataras on master

    thanks @sankethpb for your dona… (compare)

  • 06:00

    kataras on master

    add the context.SimpleUser to t… (compare)

  • Nov 25 15:40
    kataras edited #1677
  • Nov 25 15:01

    kataras on new-basicauth-features

    (compare)

  • Nov 25 15:01

    kataras on master

    New basic auth middleware and G… more features and fix database/… basicauth: add session for curr… and 4 more (compare)

  • Nov 25 15:01
    kataras closed #1677
  • Nov 25 14:59
    kataras synchronize #1677
  • Nov 25 14:59

    kataras on new-basicauth-features

    fix #1681 (compare)

  • Nov 25 02:54
    kataras synchronize #1677
  • Nov 25 02:54

    kataras on new-basicauth-features

    update all basicauth code refer… (compare)

  • Nov 25 02:47
    kataras synchronize #1677
  • Nov 25 02:47

    kataras on new-basicauth-features

    update deps (compare)

  • Nov 25 02:21
    kataras synchronize #1677
  • Nov 25 02:21

    kataras on new-basicauth-features

    basicauth: add session for curr… (compare)

  • Nov 24 12:58
    kataras synchronize #1677
  • Nov 24 12:58

    kataras on new-basicauth-features

    more features and fix database/… (compare)

  • Nov 21 10:06
    kataras opened #1677
  • Nov 21 10:04

    kataras on new-basicauth-features

    New basic auth middleware and G… (compare)

  • Nov 21 10:03

    kataras on new-basicauth-features

    (compare)

  • Nov 17 05:05

    kataras on master

    update deps (minor) (compare)

Hamid Reza Hassni Yaqoti
@H4midR

I am sorry for not pushing new commits to Iris, I'm designing a custom JWT parser as the existing solutions do not fit the usage and the minimum performance cost when using JWT in requests we require for Iris.

@kataras
sounds interesting,
as it was explained before about our new startup , I'll eager to know about your advices and suggestions .
we have used OpenCV with C++ , iris ♥️ , redis , dgraph.io and RSA and JWT encrypted and signed so every critical information encrypted.
everybody can take a look . And I'm looking forward to hear about your advices ,
It will be our honor and reputation.
https://irisdev.net
@all

Hamid Reza Hassni Yaqoti
@H4midR
another problem is our servers located in Iran, so network is unreliable, if you have any idea about server sponsorship to relocate them, I'll be thank full.
4 replies
Gerasimos (Makis) Maropoulos
@kataras
Hello @H4midR! So this iris-captcha (funny it has the same prefix as the backend framework) is an anti-bot solution
I've just finished a big part of the new JWT parser and the public API and custom features(without encryption, JWE so far) - not yet published.
Good choices, Iris and Dgraph! The future

another problem is our servers located in Iran, so network is unreliable, if you have any idea about server sponsorship to relocate them, I'll be thank full.

About that, can you explain more, what do you mena by "server sponsporship"? You want a hosting company to host your app, why not go with Digital Ocean?

Gerasimos (Makis) Maropoulos
@kataras

The first results of the JWT packages benchmarks:

Comparison between: kataras/jwt, dgrijalva/jwt-go and go-jose/go-jose.

Sign

BenchmarkSign_Map                      324322              3534 ns/op            1904 B/op         30 allocs/op
BenchmarkSign_Struct                   446637              2653 ns/op            1344 B/op         21 allocs/op

BenchmarkSign_jwt_go_Map               233316              5161 ns/op            3057 B/op         50 allocs/op
BenchmarkSign_jwt_go_Struct            299694              3994 ns/op            2289 B/op         35 allocs/op
BenchmarkSign_jwt_go_Struct2           307395              3855 ns/op            2209 B/op         35 allocs/op

BenchmarkSign_go_jose_Map              151389              7927 ns/op            5299 B/op         85 allocs/op
BenchmarkSign_go_jose_Struct           109213             10932 ns/op            6692 B/op        108 allocs/op

Verify

BenchmarkVerify                        363290              3334 ns/op            1536 B/op         22 allocs/op

BenchmarkVerify_jwt_go                 176756              6819 ns/op            3656 B/op         66 allocs/op
BenchmarkVerify_go_jose                122252              9902 ns/op            6104 B/op         85 allocs/op

Benchmarks Total Repetitions - higher is better

Damon Blais
@AlbinoGeek
Nice ones :) Looks like iris is doing better on all accounts with JWT
Gerasimos (Makis) Maropoulos
@kataras

The repository is finally public now: https://github.com/kataras/jwt, please check it out i'm waiting for your feedback!

Benchmarks: open, just cd _benchmarks && go test -v -bench=.
Test Coverage: 92% (!)
Documentation: Full
JWE support: not yet

Black-Hole
@BlackHole1

Is there a ready method for iris?

Just like express in Nodejs:

app.listen(port, () => {
  console.log(`Example app listening at http://localhost:${port}`)
})
lee
@lihaotian0607
Damon Blais
@AlbinoGeek

Random link with no context whatsoever
Redirects to a login page with no home page
Says "LayerStack" and domain "LayerPanel"
All the links take you to YET ANOTHER domain [layerpanel.cloud]
Mentions a "Ximbo" Account (4th name in 2 pages!)

SeemsLegit.jpeg NotPhisphing.png

Javad Rajabzade
@Ja7adR

router.Get("/demo/:pid", ProductDemo.Product)

Cannot use 'ProductDemo.Product' (type func(ctx *iris.Context)) as type context.Handler

:(
Gerasimos (Makis) Maropoulos
@kataras

Hello @Ja7adR,

We have almost 200 examples, there is no a single example of :param or *iris.Context. Please check: https://iris-go.com/docs and https://github.com/kataras/iris/tree/master/_examples/routing.

router.Get("/demo/{pid:int}", ProductDemo.Product)

Your handler must accept iris.Context NOT *iris.Context:

func Product(ctx iris.Context) {
// ...
}

https://www.layerpanel.com/

@lihaotian0607 what is this my friend?

Is there a ready method for iris?

Just like express in Nodejs:

app.listen(port, () => {
  console.log(`Example app listening at http://localhost:${port}`)
})

Hello @BlackHole1,

Literally with Iris it's app.Listen too :) Check: https://iris-go.com/docs and the examples.

app.Listen(":8080")
Gera-coder
@Gera-coder
Hello Everyone, iris.Compression cannot be resolved in iris/v12,what should I use to replace it?
Gerasimos (Makis) Maropoulos
@kataras

Hello @Gera-coder, iris.Compression is there. You just need to follow the Installation section or watch the mini gif on how to install and run Iris: https://github.com/kataras/iris#-learning-iris.

In-short, I assume you're using an older version of Iris. You just need to open a terminal in your current project and execute:go get github.com/kataras/iris/v12@master

lee
@lihaotian0607
How to get the user list in the room through roomName? @kataras
Gerasimos (Makis) Maropoulos
@kataras
Hello @lihaotian0607, you have to create a custom store. Collect them on the OnRoomJoinand remove fromOnRoomLeave. You can find a similar example (collects users per namespace) here. Also can you tell me what was that layerpanel site you posted above?
lee
@lihaotian0607

server provider

another problem is our servers located in Iran, so network is unreliable, if you have any idea about server sponsorship to relocate them, I'll be thank full.

lee
@lihaotian0607
I found some codes can be optimized, what do you think?
func (c *Conn) Get(key string) interface{} {
    c.storeMutex.RLock()
    if c.store != nil {
        if v, ok := c.store[key]; ok {
            c.storeMutex.RUnlock()
            if v == nil {
                return nil
            }
            return v
        }
    }

    c.storeMutex.RUnlock()
    return nil
}
func (c *Conn) Get(key string) interface{} {
    c.storeMutex.RLock()
    defer c.storeMutex.RUnlock()

    if c.store == nil {
        return nil
    }

    return c.store[key]
}
Gerasimos (Makis) Maropoulos
@kataras
@lihaotian0607 The defer is not optimization, it has a performance cost, that's why I am not using it there.
Gerasimos (Makis) Maropoulos
@kataras
Damon Blais
@AlbinoGeek
@kataras Although, he does have a point about the comparison of v -- if it's nil you return nil? You could have just returned it anyways.
vuhoanglam
@vuhoanglam
anyone downloaded the 4th iris book?
vuhoanglam
@vuhoanglam
after donate I get a zip file like this alt book and don't know where to start reading
Gerasimos (Makis) Maropoulos
@kataras
@vuhoanglam You have been invited to the https://github.com/kataras/iris-premium and the donators chat, please check your e-mails :) Some users donate $1 or 0.xx... I want to give them something in return :) They get that zip "random" section file as a preview. When Stripe completes your order, I receive an e-mail, I do manual verification of github username and e.t.c. and then you are invited to the premium support repository and your name is visible on https://iris-go.com and github.com/kataras/iris README.
Gerasimos (Makis) Maropoulos
@kataras
@vuhoanglam Thank you for the support :heart:
Gerasimos (Makis) Maropoulos
@kataras

@kataras Although, he does have a point about the comparison of v -- if it's nil you return nil? You could have just returned it anyways.

He has a point to be honest, but my eye stucked on that "defer" one. I was thinking to support an error of key found but nil entry (e.g. map["key"] = nil interface) when I designed that conn's Get, but then I decided that was not necessary and the code was like that. I'll re-format it, although, to be realistic it does not cost anything and also the Conn.Set/Get is only for pure neffos users, iris users mostly use the iris.Context.Values().Set/Get to store request values.

Here it's:

func (c *Conn) Get(key string) interface{} {
    c.storeMutex.RLock()
    if c.store == nil {
        c.storeMutex.RUnlock()
        return nil
    }

    v := c.store[key]
    c.storeMutex.RUnlock()
    return v
}
OK, neffos updated to 0.0.18 (dependencies updates included). Thanks both of you @lihaotian0607 and @AlbinoGeek :heart:
Gerasimos (Makis) Maropoulos
@kataras
@lihaotian0607 I have seen your dart-client for neffos. Just have not time to discuss it further, we'll discuss and "promote" it on neffos readme (and iris examples) soon 🥳
waiting for update
Gerasimos (Makis) Maropoulos
@kataras
Are we sure those will be ever implemented in dart lang? And are those really necessary?
lee
@lihaotian0607
It is not necessary, but for convenience I am waiting for him to update!
😂😂😂😂
Javad Rajabzade
@Ja7adR

Hello @Ja7adR,

We have almost 200 examples, there is no a single example of :param or *iris.Context. Please check: https://iris-go.com/docs and https://github.com/kataras/iris/tree/master/_examples/routing.

router.Get("/demo/{pid:int}", ProductDemo.Product)

Your handler must accept iris.Context NOT *iris.Context:

func Product(ctx iris.Context) {
// ...
}

thank you

Javad Rajabzade
@Ja7adR
@kataras Bro I don't have $ money for donate can i get book other edition for gift? i ago time request for Iris book pdf (https://bit.ly/iris-req-book)
Javad Rajabzade
@Ja7adR
guys how to get clientIP on remote in server? with gin is easy using ctx.ClientIP() but Iris how to do?
tuhao1020
@tuhao1020
@Ja7adR use ctx.RemoteAddr()
Javad Rajabzade
@Ja7adR

@Ja7adR use ctx.RemoteAddr()

tnx man

Javad Rajabzade
@Ja7adR

guys i have problem with url params , i use this mode in gin gonic work it without problem but in Iris on get I received Not Found , this is parameter /validate=:lic or /validate={lic:string} or /?validate=:lic

sample 127.0.0.1:8080/validate=123456

code router.Get("/validate/:lic", src.GetLicense)

Gerasimos (Makis) Maropoulos
@kataras

@kataras Bro I don't have $ money for donate can i get book other edition for gift? i ago time request for Iris book pdf (https://bit.ly/iris-req-book)

Hello @Ja7adR, this is the old link, the new one is: https://www.iris-go.com/#ebookDonateForm but no problem, send me your GitHub username, I am sure we will find a way you can support Iris without $$.

guys i have problem with url params , i use this mode in gin gonic work it without problem but in Iris on get I received Not Found , this is parameter /validate=:lic or /validate={lic:string} or /?validate=:lic

sample 127.0.0.1:8080/validate=123456

code router.Get("/validate/:lic", src.GetLicense)

As we've said above, in Iris you do not have :param or *param. Use {param:string} and {param:path} respectfully. Routing examples: https://github.com/kataras/iris/tree/master/_examples/routing.

Javad Rajabzade
@Ja7adR

@kataras Bro I don't have $ money for donate can i get book other edition for gift? i ago time request for Iris book pdf (https://bit.ly/iris-req-book)

Hello @Ja7adR, this is the old link, the new one is: https://www.iris-go.com/#ebookDonateForm but no problem, send me your GitHub username, I am sure we will find a way you can support Iris without $$.

my github username is @Ja7adR but , I in iris is Beginner

Gerasimos (Makis) Maropoulos
@kataras
OK @Ja7adR I see. Brother you didn't even starred Iris 😂
Javad Rajabzade
@Ja7adR

OK @Ja7adR I see. Brother you didn't even starred Iris 😂

😂😂 i fotget for star

Gerasimos (Makis) Maropoulos
@kataras
No worries, I sent you a private message :)