diff --git a/.gitignore b/.gitignore index 3e7d2b0..99c5007 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,6 @@ bluectl # vendor/ # vscode setting -.vscode \ No newline at end of file +.vscode + +bluectl \ No newline at end of file diff --git a/cmds/awspayer.go b/cmds/awspayer.go index e98af82..9e505d7 100644 --- a/cmds/awspayer.go +++ b/cmds/awspayer.go @@ -11,8 +11,8 @@ import ( "syscall" "time" + protosinternal "github.com/alphauslabs/blue-internal-go/protos" "github.com/alphauslabs/blue-sdk-go/cost/v1" - "github.com/alphauslabs/blue-sdk-go/protos" "github.com/alphauslabs/bluectl/params" "github.com/alphauslabs/bluectl/pkg/grpcconn" "github.com/alphauslabs/bluectl/pkg/logger" @@ -457,7 +457,7 @@ func ImportCursCmd() *cobra.Command { } defer client.Close() - var resp *protos.Operation + var resp *protosinternal.Operation switch { case rawInput != "": diff --git a/cmds/cost/aws/calculations/calculations.go b/cmds/cost/aws/calculations/calculations.go index c4fc28d..9d4be27 100644 --- a/cmds/cost/aws/calculations/calculations.go +++ b/cmds/cost/aws/calculations/calculations.go @@ -12,10 +12,10 @@ import ( "syscall" "time" + protosinternal "github.com/alphauslabs/blue-internal-go/protos" "github.com/alphauslabs/blue-sdk-go/api" "github.com/alphauslabs/blue-sdk-go/billing/v1" "github.com/alphauslabs/blue-sdk-go/cost/v1" - "github.com/alphauslabs/blue-sdk-go/protos" "github.com/alphauslabs/bluectl/cmds/cost/aws/calculations/schedule" "github.com/alphauslabs/bluectl/params" "github.com/alphauslabs/bluectl/pkg/grpcconn" @@ -66,7 +66,7 @@ func RunCmd() *cobra.Command { } defer client.Close() - var resp *protos.Operation + var resp *protosinternal.Operation switch { case rawInput != "": @@ -435,10 +435,10 @@ func ListHistoryCmd() *cobra.Command { meta := sm.AsMap() var result string switch op.Result.(type) { - case *protos.Operation_Response: + case *protosinternal.Operation_Response: result = "success" - case *protos.Operation_Error: - terr := op.Result.(*protos.Operation_Error) + case *protosinternal.Operation_Error: + terr := op.Result.(*protosinternal.Operation_Error) result = terr.Error.String() } @@ -469,9 +469,9 @@ func ListHistoryCmd() *cobra.Command { // Make result more readable. switch op.Result.(type) { - case *protos.Operation_Response: + case *protosinternal.Operation_Response: var res api.KeyValue - tres := op.Result.(*protos.Operation_Response) + tres := op.Result.(*protosinternal.Operation_Response) anypb.UnmarshalTo(tres.Response, &res, proto.UnmarshalOptions{}) v := m["Result"] vv := v.(map[string]interface{}) diff --git a/go.mod b/go.mod index c3cec32..88fddb6 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/alphauslabs/bluectl go 1.25 require ( - github.com/alphauslabs/blue-sdk-go v0.71.3 + github.com/alphauslabs/blue-sdk-go v0.77.52 github.com/fatih/color v1.18.0 github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect github.com/mattn/go-runewidth v0.0.16 // indirect @@ -17,6 +17,7 @@ require ( ) require ( + github.com/alphauslabs/blue-internal-go v0.17.21 github.com/pelletier/go-toml/v2 v2.0.0-beta.6 golang.org/x/term v0.23.0 gopkg.in/yaml.v2 v2.4.0 diff --git a/go.sum b/go.sum index 2e73701..66e5261 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,7 @@ -github.com/alphauslabs/blue-sdk-go v0.71.3 h1:zGXNoTh1lw8z3yESJYWjDwfcR84mSKDdFTkfRTogqO4= -github.com/alphauslabs/blue-sdk-go v0.71.3/go.mod h1:rXvLVEALD6OCGOEilelpARFLXhxVGWj1FN1xQ8/yHqY= +github.com/alphauslabs/blue-internal-go v0.17.21 h1:eUSixRV9Ru2hRQT3C7HKdgEdsaTa2QFsd06Pa7NFRy0= +github.com/alphauslabs/blue-internal-go v0.17.21/go.mod h1:j4Rw2iA0O8e82bSXls374gXQYlrQYyiNCrbOgzJ0AO8= +github.com/alphauslabs/blue-sdk-go v0.77.52 h1:XNho+WdtuPqamRoCXrlb1/IG6qfOuKKm+p5/wbJz8KA= +github.com/alphauslabs/blue-sdk-go v0.77.52/go.mod h1:x4bitWhgq29y13ANterdjsEMn9eWUmcTL7zX7WuW52s= github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= diff --git a/pkg/ops/wait.go b/pkg/ops/wait.go index 092f765..73f2129 100644 --- a/pkg/ops/wait.go +++ b/pkg/ops/wait.go @@ -5,8 +5,8 @@ import ( "fmt" "time" + protosinternal "github.com/alphauslabs/blue-internal-go/protos" "github.com/alphauslabs/blue-sdk-go/operations/v1" - "github.com/alphauslabs/blue-sdk-go/protos" "github.com/alphauslabs/bluectl/pkg/grpcconn" "google.golang.org/protobuf/types/known/durationpb" ) @@ -16,7 +16,7 @@ type WaitForOperationInput struct { Client *operations.GrpcClient // optional } -func WaitForOperation(ctx context.Context, in WaitForOperationInput) (*protos.Operation, error) { +func WaitForOperation(ctx context.Context, in WaitForOperationInput) (*protosinternal.Operation, error) { if in.Name == "" { return nil, fmt.Errorf("in.Name cannot be empty") } @@ -43,7 +43,7 @@ func WaitForOperation(ctx context.Context, in WaitForOperationInput) (*protos.Op } type data struct { - op *protos.Operation + op *protosinternal.Operation err error }