Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

No description of how to access data source options from GOLANG in backend sources #201

@OptrixAU

Description

@OptrixAU

The documentation clearly shows how to set up the web UI for both the data source configuration and queries, but at no point does it show how to actually access those options in your backend data source.

It's probably quite simple, but since I'm not very familiar with GO I'm more or less bashing my head into the wall.

I can see that in the CheckHealth call they appear to be hidden somewhere in req.PluginContext.DataSourceInstanceSettings.JSONData, but it's then wrapped in a RawJSON object that for some reason won't parse with json.Unmarshal.

Is there a simple example you could provide showing that - if you enter a host name in your data source configuration - you can ACCESS that information in your CheckHealth or Query functions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions