diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 29ecaf6..309f0fa 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -63,5 +63,6 @@ jobs: run: go mod verify - name: generate command strings run: go generate ./... && git diff --exit-code + if: runner.os != 'Windows' - name: Run tests run: go test ./... diff --git a/genqlient.go b/genqlient.go index 35fff41..c7ba00f 100644 --- a/genqlient.go +++ b/genqlient.go @@ -337,6 +337,15 @@ const ( DeploymentStrategySimple DeploymentStrategy = "SIMPLE" ) +var AllDeploymentStrategy = []DeploymentStrategy{ + DeploymentStrategyBluegreen, + DeploymentStrategyCanary, + DeploymentStrategyImmediate, + DeploymentStrategyRolling, + DeploymentStrategyRollingOne, + DeploymentStrategySimple, +} + // EnsureDepotRemoteBuilderEnsureDepotRemoteBuilderEnsureDepotRemoteBuilderPayload includes the requested fields of the GraphQL type EnsureDepotRemoteBuilderPayload. // The GraphQL type's documentation follows. // @@ -626,7 +635,7 @@ type __UpdateReleaseInput struct { // GetInput returns __UpdateReleaseInput.Input, and is useful for accessing the field via an interface. func (v *__UpdateReleaseInput) GetInput() UpdateReleaseInput { return v.Input } -// The query or mutation executed by CreateBuild. +// The mutation executed by CreateBuild. const CreateBuild_Operation = ` mutation CreateBuild ($input: CreateBuildInput!) { createBuild(input: $input) { @@ -640,7 +649,7 @@ func CreateBuild( ctx_ context.Context, client_ graphql.Client, input CreateBuildInput, -) (*CreateBuildResponse, error) { +) (data_ *CreateBuildResponse, err_ error) { req_ := &graphql.Request{ OpName: "CreateBuild", Query: CreateBuild_Operation, @@ -648,10 +657,9 @@ func CreateBuild( Input: input, }, } - var err_ error - var data_ CreateBuildResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &CreateBuildResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -659,10 +667,10 @@ func CreateBuild( resp_, ) - return &data_, err_ + return data_, err_ } -// The query or mutation executed by CreateRelease. +// The mutation executed by CreateRelease. const CreateRelease_Operation = ` mutation CreateRelease ($input: CreateReleaseInput!) { createRelease(input: $input) { @@ -678,7 +686,7 @@ func CreateRelease( ctx_ context.Context, client_ graphql.Client, input CreateReleaseInput, -) (*CreateReleaseResponse, error) { +) (data_ *CreateReleaseResponse, err_ error) { req_ := &graphql.Request{ OpName: "CreateRelease", Query: CreateRelease_Operation, @@ -686,10 +694,9 @@ func CreateRelease( Input: input, }, } - var err_ error - var data_ CreateReleaseResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &CreateReleaseResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -697,10 +704,10 @@ func CreateRelease( resp_, ) - return &data_, err_ + return data_, err_ } -// The query or mutation executed by EnsureDepotRemoteBuilder. +// The mutation executed by EnsureDepotRemoteBuilder. const EnsureDepotRemoteBuilder_Operation = ` mutation EnsureDepotRemoteBuilder ($input: EnsureDepotRemoteBuilderInput!) { ensureDepotRemoteBuilder(input: $input) { @@ -714,7 +721,7 @@ func EnsureDepotRemoteBuilder( ctx_ context.Context, client_ graphql.Client, input *EnsureDepotRemoteBuilderInput, -) (*EnsureDepotRemoteBuilderResponse, error) { +) (data_ *EnsureDepotRemoteBuilderResponse, err_ error) { req_ := &graphql.Request{ OpName: "EnsureDepotRemoteBuilder", Query: EnsureDepotRemoteBuilder_Operation, @@ -722,10 +729,9 @@ func EnsureDepotRemoteBuilder( Input: input, }, } - var err_ error - var data_ EnsureDepotRemoteBuilderResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &EnsureDepotRemoteBuilderResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -733,10 +739,10 @@ func EnsureDepotRemoteBuilder( resp_, ) - return &data_, err_ + return data_, err_ } -// The query or mutation executed by FinishBuild. +// The mutation executed by FinishBuild. const FinishBuild_Operation = ` mutation FinishBuild ($input: FinishBuildInput!) { finishBuild(input: $input) { @@ -751,7 +757,7 @@ func FinishBuild( ctx_ context.Context, client_ graphql.Client, input FinishBuildInput, -) (*FinishBuildResponse, error) { +) (data_ *FinishBuildResponse, err_ error) { req_ := &graphql.Request{ OpName: "FinishBuild", Query: FinishBuild_Operation, @@ -759,10 +765,9 @@ func FinishBuild( Input: input, }, } - var err_ error - var data_ FinishBuildResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &FinishBuildResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -770,10 +775,10 @@ func FinishBuild( resp_, ) - return &data_, err_ + return data_, err_ } -// The query or mutation executed by LatestImage. +// The query executed by LatestImage. const LatestImage_Operation = ` query LatestImage ($appName: String!) { app(name: $appName) { @@ -790,7 +795,7 @@ func LatestImage( ctx_ context.Context, client_ graphql.Client, appName string, -) (*LatestImageResponse, error) { +) (data_ *LatestImageResponse, err_ error) { req_ := &graphql.Request{ OpName: "LatestImage", Query: LatestImage_Operation, @@ -798,10 +803,9 @@ func LatestImage( AppName: appName, }, } - var err_ error - var data_ LatestImageResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &LatestImageResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -809,10 +813,10 @@ func LatestImage( resp_, ) - return &data_, err_ + return data_, err_ } -// The query or mutation executed by UpdateRelease. +// The mutation executed by UpdateRelease. const UpdateRelease_Operation = ` mutation UpdateRelease ($input: UpdateReleaseInput!) { updateRelease(input: $input) { @@ -827,7 +831,7 @@ func UpdateRelease( ctx_ context.Context, client_ graphql.Client, input UpdateReleaseInput, -) (*UpdateReleaseResponse, error) { +) (data_ *UpdateReleaseResponse, err_ error) { req_ := &graphql.Request{ OpName: "UpdateRelease", Query: UpdateRelease_Operation, @@ -835,10 +839,9 @@ func UpdateRelease( Input: input, }, } - var err_ error - var data_ UpdateReleaseResponse - resp_ := &graphql.Response{Data: &data_} + data_ = &UpdateReleaseResponse{} + resp_ := &graphql.Response{Data: data_} err_ = client_.MakeRequest( ctx_, @@ -846,5 +849,5 @@ func UpdateRelease( resp_, ) - return &data_, err_ + return data_, err_ } diff --git a/go.mod b/go.mod index c21fcd7..71156dd 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/superfly/fly-go go 1.21 require ( - github.com/Khan/genqlient v0.7.0 + github.com/Khan/genqlient v0.7.1-0.20240819060157-4466fc10e4f3 github.com/PuerkitoBio/rehttp v1.4.0 github.com/superfly/graphql v0.2.4 github.com/superfly/macaroon v0.2.13 @@ -17,6 +17,7 @@ require ( github.com/agnivade/levenshtein v1.1.1 // indirect github.com/alexflint/go-arg v1.4.2 // indirect github.com/alexflint/go-scalar v1.0.0 // indirect + github.com/bmatcuk/doublestar/v4 v4.6.1 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/kr/pretty v0.3.1 // indirect @@ -39,7 +40,7 @@ require ( github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/sirupsen/logrus v1.9.3 // indirect - github.com/vektah/gqlparser/v2 v2.5.14 // indirect + github.com/vektah/gqlparser/v2 v2.5.16 // indirect github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 diff --git a/go.sum b/go.sum index 9021a25..8ea858a 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -github.com/Khan/genqlient v0.7.0 h1:GZ1meyRnzcDTK48EjqB8t3bcfYvHArCUUvgOwpz1D4w= -github.com/Khan/genqlient v0.7.0/go.mod h1:HNyy3wZvuYwmW3Y7mkoQLZsa/R5n5yIRajS1kPBvSFM= +github.com/Khan/genqlient v0.7.1-0.20240819060157-4466fc10e4f3 h1:tLgg6xDhCddhmU3rT1bVOv0VeTU5i1rCXPHbWT8ugD0= +github.com/Khan/genqlient v0.7.1-0.20240819060157-4466fc10e4f3/go.mod h1:jNiMcTbO4wd9h1jIjEe5+k+au3kC4WasHBgmy/N/lto= github.com/PuerkitoBio/rehttp v1.4.0 h1:rIN7A2s+O9fmHUM1vUcInvlHj9Ysql4hE+Y0wcl/xk8= github.com/PuerkitoBio/rehttp v1.4.0/go.mod h1:LUwKPoDbDIA2RL5wYZCNsQ90cx4OJ4AWBmq6KzWZL1s= github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8= @@ -20,6 +20,8 @@ github.com/aybabtme/iocontrol v0.0.0-20150809002002-ad15bcfc95a0 h1:0NmehRCgyk5r github.com/aybabtme/iocontrol v0.0.0-20150809002002-ad15bcfc95a0/go.mod h1:6L7zgvqo0idzI7IO8de6ZC051AfXb5ipkIJ7bIA2tGA= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/bmatcuk/doublestar/v4 v4.6.1 h1:FH9SifrbvJhnlQpztAx++wlkk70QBf0iBWDwNy7PA4I= +github.com/bmatcuk/doublestar/v4 v4.6.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= github.com/bradleyjkemp/cupaloy/v2 v2.6.0 h1:knToPYa2xtfg42U3I6punFEjaGFKWQRXJwj0JTv4mTs= github.com/bradleyjkemp/cupaloy/v2 v2.6.0/go.mod h1:bm7JXdkRd4BHJk9HpwqAI8BoAY1lps46Enkdqw6aRX0= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= @@ -46,6 +48,8 @@ github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= @@ -81,8 +85,8 @@ github.com/superfly/graphql v0.2.4 h1:Av8hSk4x8WvKJ6MTnEwrLknSVSGPc7DWpgT3z/kt3P github.com/superfly/graphql v0.2.4/go.mod h1:CVfDl31srm8HnJ9udwLu6hFNUW/P6GUM2dKcG1YQ8jc= github.com/superfly/macaroon v0.2.13 h1:WEZnifapjW5yuCEsdZxqCq4X8xuzIf+AUVPv6lm7GtI= github.com/superfly/macaroon v0.2.13/go.mod h1:Kt6/EdSYfFjR4GIe+erMwcJgU8iMu1noYVceQ5dNdKo= -github.com/vektah/gqlparser/v2 v2.5.14 h1:dzLq75BJe03jjQm6n56PdH1oweB8ana42wj7E4jRy70= -github.com/vektah/gqlparser/v2 v2.5.14/go.mod h1:WQQjFc+I1YIzoPvZBhUQX7waZgg3pMLi0r8KymvAE2w= +github.com/vektah/gqlparser/v2 v2.5.16 h1:1gcmLTvs3JLKXckwCwlUagVn/IlV2bwqle0vJ0vy5p8= +github.com/vektah/gqlparser/v2 v2.5.16/go.mod h1:1lz1OeCqgQbQepsGxPVywrjdBHW2T08PUS3pJqepRww= github.com/vmihailenco/msgpack/v5 v5.4.1 h1:cQriyiUvjTwOHg8QZaPihLWeRAAVoCpE00IUPn0Bjt8= github.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21PIudVV/E3rRQok= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g=