Co-authored-by: kjuulh <contact@kjuulh.io>
Reviewed-on: #14
This commit is contained in:
2022-09-21 22:55:52 +02:00
parent 1f46f6ac8d
commit d6d98c2ce8
48 changed files with 938 additions and 478 deletions

View File

@@ -2,7 +2,7 @@ package schema
import "gopkg.in/yaml.v3"
type KrakenSchema struct {
type OctopushSchema struct {
ApiVersion string `yaml:"apiVersion"`
Name string `yaml:"name"`
Select struct {
@@ -22,8 +22,8 @@ type KrakenSchema struct {
} `yaml:"queries"`
}
func Unmarshal(raw string) (*KrakenSchema, error) {
k := &KrakenSchema{}
func Unmarshal(raw string) (*OctopushSchema, error) {
k := &OctopushSchema{}
err := yaml.Unmarshal([]byte(raw), k)
if err != nil {
return nil, err