Documentation ¶
Index ¶
- Constants
- Variables
- func DatabaseChooserUI(exportMetadata func() (io.Reader, error)) (string, error)
- func DatabaseChooserUIWithAll(exportMetadata func() (io.Reader, error)) (string, error)
- func GetIncludeTagFiles(node *yaml.Node, baseDirectory string) ([]string, error)
- func GetSourceKind(exportMetadata func() (io.Reader, error), sourceName string) (*hasura.SourceKind, error)
- func GetSources(exportMetadata func() (io.Reader, error)) ([]string, error)
- func JSONToYAML(bs []byte) ([]byte, error)
- func NewYamlDecoder(opts YamlDecoderOpts, destination interface{}) *yamlDecoder
- func YAMLToJSON(yamlbs []byte) ([]byte, error)
- type Source
- type YamlDecoderOpts
- type YamlTagResolverError
Constants ¶
View Source
const ChooseAllDatabases = "All (all available databases)"
Variables ¶
View Source
var ErrNoConnectedSources = errors.New("0 connected sources found on hasura")
Functions ¶
func DatabaseChooserUI ¶
func DatabaseChooserUIWithAll ¶ added in v2.2.0
func GetIncludeTagFiles ¶
GetIncludeTagFiles files will return file paths of all child !include tag values eg: for example say the following are contents rootfile.yaml somekey: somevalue foos: !include foo.yaml
let foo.yaml contain the following contents someother: key bar: !include bar.yaml
contents of bar.yaml baz: baz
On execution of GetIncludeTagFiles(rootfile), It is expected to return rootfileparent/foo.yaml, fooparent/bar.yaml
func GetSourceKind ¶
func JSONToYAML ¶ added in v2.5.1
func NewYamlDecoder ¶
func NewYamlDecoder(opts YamlDecoderOpts, destination interface{}) *yamlDecoder
func YAMLToJSON ¶ added in v2.8.3
Types ¶
type Source ¶
type Source struct { Name string `yaml:"name"` Kind hasura.SourceKind `yaml:"kind"` }
func GetSourcesAndKind ¶
type YamlDecoderOpts ¶
type YamlDecoderOpts struct { // directory which is to be used as the parent directory to look for filenames // specified in !include tag IncludeTagBaseDirectory string }
type YamlTagResolverError ¶ added in v2.9.0
type YamlTagResolverError struct {
// contains filtered or unexported fields
}
func (*YamlTagResolverError) Error ¶ added in v2.9.0
func (e *YamlTagResolverError) Error() string
func (*YamlTagResolverError) Unwrap ¶ added in v2.9.0
func (e *YamlTagResolverError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.