# Golang plugin parameters (like schema.lua)

**URL:** <https://discuss.konghq.com/t/golang-plugin-parameters-like-schema-lua/7246>\
**Category:** General\
**Created:** [October 7, 2020, 1:25pm UTC](https://discuss.konghq.com/t/golang-plugin-parameters-like-schema-lua/7246 "2020-10-07T13:25:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mfeledyn](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@mfeledyn](https://discuss.konghq.com/u/mfeledyn)\
**Post date:** [October 7, 2020, 1:25pm UTC](https://discuss.konghq.com/t/golang-plugin-parameters-like-schema-lua/7246/1 "2020-10-07T13:25:53Z")

</div>

Hi,  
I’d like to know if there is a way to tell Kong which parameters are available for a golang Kong plugin, and enable to set them via API and/or Kong web admin tool like Konga.  
I have seen that parameters are discovered by Kong from the source file “schema.lua” of LUA plugins. I wonder if there is the same for golang plugins ?  
Thank you for reading.

---

<div class="post-metadata">

**Author:** ![javier](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/javier/32/1740_2.png) [@javier](https://discuss.konghq.com/u/javier)\
**Post date:** [October 10, 2020, 12:38am UTC](https://discuss.konghq.com/t/golang-plugin-parameters-like-schema-lua/7246/2 "2020-10-10T00:38:56Z")

</div>

Go plugins define their configuration as a `struct` type. As mentioned in the [docs](https://docs.konghq.com/2.1.x/go/), you define a constructor that returns your type:

```auto
func New() interface{} {
    return &MyConfig{}
}

```

And Kong will introspect the returned value ant create the equivalent to the `schema.lua`. The configuration data can come from the database, declarative configuration or the admin API, just like with Lua plugins.

---

<div class="post-metadata">

**Author:** ![mfeledyn](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@mfeledyn](https://discuss.konghq.com/u/mfeledyn)\
**Post date:** [October 12, 2020, 2:02pm UTC](https://discuss.konghq.com/t/golang-plugin-parameters-like-schema-lua/7246/3 "2020-10-12T14:02:47Z")

</div>

Thanks a lot Javier for your answer, indeed it is working now with your help.  
Now I wonder how to get my plugin put in a the right category. For now it is shown in “Other” category (in Konga), and I’d like it in another one.
