func (c Client) GetCredential() (cred AuthenticatedCredential, err error) {
	out := new(kong_plugin_protocol.AuthenticatedCredential)
	err = c.Ask(`kong.client.get_credential`, nil, out)
	if err != nil {
		return
	}
	cred = AuthenticatedCredential{
		Id:         out.Id,
		ConsumerId: out.ConsumerId,
	}
	return
}
kong.Client.GetCredential() returns the credentials of the currently authenticated consumer.
If not set yet, it returns nil.
package client
import (
	"fmt"
	"github.com/Kong/go-pdk/server/kong_plugin_protocol"
	"github.com/Kong/go-pdk/bridge"
	"github.com/Kong/go-pdk/entities"
)
type Client struct {
	bridge.PdkBridge
}
type AuthenticatedCredential struct {
	Id         string `json:"id"`
	ConsumerId string `json:"consumer_id"`
}
func (c Client) GetIp() (ip string, err error) {
	return c.AskString(`kong.client.get_ip`, nil)
}
func (c Client) GetForwardedIp() (string, error) {
	return c.AskString(`kong.client.get_forwarded_ip`, nil)
}
func (c Client) GetPort() (int, error) {
	return c.AskInt(`kong.client.get_port`, nil)
}
func (c Client) GetForwardedPort() (int, error) {
	return c.AskInt(`kong.client.get_forwarded_port`, nil)
}