feat: initial commit
This commit is contained in:
@@ -0,0 +1,187 @@
|
||||
// Code generated by github.com/Khan/genqlient, DO NOT EDIT.
|
||||
|
||||
package ctl
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/Khan/genqlient/graphql"
|
||||
)
|
||||
|
||||
type InputSubGraph struct {
|
||||
Ref string `json:"ref"`
|
||||
Service string `json:"service"`
|
||||
Url *string `json:"url"`
|
||||
WsUrl *string `json:"wsUrl"`
|
||||
Sdl string `json:"sdl"`
|
||||
}
|
||||
|
||||
// GetRef returns InputSubGraph.Ref, and is useful for accessing the field via an interface.
|
||||
func (v *InputSubGraph) GetRef() string { return v.Ref }
|
||||
|
||||
// GetService returns InputSubGraph.Service, and is useful for accessing the field via an interface.
|
||||
func (v *InputSubGraph) GetService() string { return v.Service }
|
||||
|
||||
// GetUrl returns InputSubGraph.Url, and is useful for accessing the field via an interface.
|
||||
func (v *InputSubGraph) GetUrl() *string { return v.Url }
|
||||
|
||||
// GetWsUrl returns InputSubGraph.WsUrl, and is useful for accessing the field via an interface.
|
||||
func (v *InputSubGraph) GetWsUrl() *string { return v.WsUrl }
|
||||
|
||||
// GetSdl returns InputSubGraph.Sdl, and is useful for accessing the field via an interface.
|
||||
func (v *InputSubGraph) GetSdl() string { return v.Sdl }
|
||||
|
||||
// SubGraphsResponse is returned by SubGraphs on success.
|
||||
type SubGraphsResponse struct {
|
||||
SubGraphs []*SubGraphsSubGraphsSubGraph `json:"subGraphs"`
|
||||
}
|
||||
|
||||
// GetSubGraphs returns SubGraphsResponse.SubGraphs, and is useful for accessing the field via an interface.
|
||||
func (v *SubGraphsResponse) GetSubGraphs() []*SubGraphsSubGraphsSubGraph { return v.SubGraphs }
|
||||
|
||||
// SubGraphsSubGraphsSubGraph includes the requested fields of the GraphQL type SubGraph.
|
||||
type SubGraphsSubGraphsSubGraph struct {
|
||||
Service string `json:"service"`
|
||||
Url *string `json:"url"`
|
||||
WsUrl *string `json:"wsUrl"`
|
||||
ChangedBy string `json:"changedBy"`
|
||||
ChangedAt time.Time `json:"changedAt"`
|
||||
}
|
||||
|
||||
// GetService returns SubGraphsSubGraphsSubGraph.Service, and is useful for accessing the field via an interface.
|
||||
func (v *SubGraphsSubGraphsSubGraph) GetService() string { return v.Service }
|
||||
|
||||
// GetUrl returns SubGraphsSubGraphsSubGraph.Url, and is useful for accessing the field via an interface.
|
||||
func (v *SubGraphsSubGraphsSubGraph) GetUrl() *string { return v.Url }
|
||||
|
||||
// GetWsUrl returns SubGraphsSubGraphsSubGraph.WsUrl, and is useful for accessing the field via an interface.
|
||||
func (v *SubGraphsSubGraphsSubGraph) GetWsUrl() *string { return v.WsUrl }
|
||||
|
||||
// GetChangedBy returns SubGraphsSubGraphsSubGraph.ChangedBy, and is useful for accessing the field via an interface.
|
||||
func (v *SubGraphsSubGraphsSubGraph) GetChangedBy() string { return v.ChangedBy }
|
||||
|
||||
// GetChangedAt returns SubGraphsSubGraphsSubGraph.ChangedAt, and is useful for accessing the field via an interface.
|
||||
func (v *SubGraphsSubGraphsSubGraph) GetChangedAt() time.Time { return v.ChangedAt }
|
||||
|
||||
// UpdateSubGraphResponse is returned by UpdateSubGraph on success.
|
||||
type UpdateSubGraphResponse struct {
|
||||
UpdateSubGraph *UpdateSubGraphUpdateSubGraph `json:"updateSubGraph"`
|
||||
}
|
||||
|
||||
// GetUpdateSubGraph returns UpdateSubGraphResponse.UpdateSubGraph, and is useful for accessing the field via an interface.
|
||||
func (v *UpdateSubGraphResponse) GetUpdateSubGraph() *UpdateSubGraphUpdateSubGraph {
|
||||
return v.UpdateSubGraph
|
||||
}
|
||||
|
||||
// UpdateSubGraphUpdateSubGraph includes the requested fields of the GraphQL type SubGraph.
|
||||
type UpdateSubGraphUpdateSubGraph struct {
|
||||
Service string `json:"service"`
|
||||
Url *string `json:"url"`
|
||||
WsUrl *string `json:"wsUrl"`
|
||||
ChangedBy string `json:"changedBy"`
|
||||
ChangedAt time.Time `json:"changedAt"`
|
||||
}
|
||||
|
||||
// GetService returns UpdateSubGraphUpdateSubGraph.Service, and is useful for accessing the field via an interface.
|
||||
func (v *UpdateSubGraphUpdateSubGraph) GetService() string { return v.Service }
|
||||
|
||||
// GetUrl returns UpdateSubGraphUpdateSubGraph.Url, and is useful for accessing the field via an interface.
|
||||
func (v *UpdateSubGraphUpdateSubGraph) GetUrl() *string { return v.Url }
|
||||
|
||||
// GetWsUrl returns UpdateSubGraphUpdateSubGraph.WsUrl, and is useful for accessing the field via an interface.
|
||||
func (v *UpdateSubGraphUpdateSubGraph) GetWsUrl() *string { return v.WsUrl }
|
||||
|
||||
// GetChangedBy returns UpdateSubGraphUpdateSubGraph.ChangedBy, and is useful for accessing the field via an interface.
|
||||
func (v *UpdateSubGraphUpdateSubGraph) GetChangedBy() string { return v.ChangedBy }
|
||||
|
||||
// GetChangedAt returns UpdateSubGraphUpdateSubGraph.ChangedAt, and is useful for accessing the field via an interface.
|
||||
func (v *UpdateSubGraphUpdateSubGraph) GetChangedAt() time.Time { return v.ChangedAt }
|
||||
|
||||
// __SubGraphsInput is used internally by genqlient
|
||||
type __SubGraphsInput struct {
|
||||
Ref string `json:"ref"`
|
||||
}
|
||||
|
||||
// GetRef returns __SubGraphsInput.Ref, and is useful for accessing the field via an interface.
|
||||
func (v *__SubGraphsInput) GetRef() string { return v.Ref }
|
||||
|
||||
// __UpdateSubGraphInput is used internally by genqlient
|
||||
type __UpdateSubGraphInput struct {
|
||||
Input *InputSubGraph `json:"input,omitempty"`
|
||||
}
|
||||
|
||||
// GetInput returns __UpdateSubGraphInput.Input, and is useful for accessing the field via an interface.
|
||||
func (v *__UpdateSubGraphInput) GetInput() *InputSubGraph { return v.Input }
|
||||
|
||||
func SubGraphs(
|
||||
ctx context.Context,
|
||||
client graphql.Client,
|
||||
ref string,
|
||||
) (*SubGraphsResponse, error) {
|
||||
req := &graphql.Request{
|
||||
OpName: "SubGraphs",
|
||||
Query: `
|
||||
query SubGraphs ($ref: String!) {
|
||||
subGraphs(ref: $ref) {
|
||||
service
|
||||
url
|
||||
wsUrl
|
||||
changedBy
|
||||
changedAt
|
||||
}
|
||||
}
|
||||
`,
|
||||
Variables: &__SubGraphsInput{
|
||||
Ref: ref,
|
||||
},
|
||||
}
|
||||
var err error
|
||||
|
||||
var data SubGraphsResponse
|
||||
resp := &graphql.Response{Data: &data}
|
||||
|
||||
err = client.MakeRequest(
|
||||
ctx,
|
||||
req,
|
||||
resp,
|
||||
)
|
||||
|
||||
return &data, err
|
||||
}
|
||||
|
||||
func UpdateSubGraph(
|
||||
ctx context.Context,
|
||||
client graphql.Client,
|
||||
input *InputSubGraph,
|
||||
) (*UpdateSubGraphResponse, error) {
|
||||
req := &graphql.Request{
|
||||
OpName: "UpdateSubGraph",
|
||||
Query: `
|
||||
mutation UpdateSubGraph ($input: InputSubGraph!) {
|
||||
updateSubGraph(input: $input) {
|
||||
service
|
||||
url
|
||||
wsUrl
|
||||
changedBy
|
||||
changedAt
|
||||
}
|
||||
}
|
||||
`,
|
||||
Variables: &__UpdateSubGraphInput{
|
||||
Input: input,
|
||||
},
|
||||
}
|
||||
var err error
|
||||
|
||||
var data UpdateSubGraphResponse
|
||||
resp := &graphql.Response{Data: &data}
|
||||
|
||||
err = client.MakeRequest(
|
||||
ctx,
|
||||
req,
|
||||
resp,
|
||||
)
|
||||
|
||||
return &data, err
|
||||
}
|
||||
Reference in New Issue
Block a user