Skip to content

Commit

Permalink
Added Value Create
Browse files Browse the repository at this point in the history
  • Loading branch information
seizadi committed Jan 7, 2020
1 parent c8e50f2 commit 68e0306
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,3 +228,19 @@ func (m *CmdbClient) CreateChartVersion(req *pb.CreateChartVersionRequest) (*pb.
return res, nil
}

func (m *CmdbClient) CreateValue(req *pb.CreateValueRequest) (*pb.CreateValueResponse, error) {

// We can now create stubs that wrap conn:
stub := pb.NewValuesClient(m.Conn)

// Now we can use the stub to make RPCs
ctx := metadata.NewOutgoingContext(context.Background(),
metadata.Pairs("Authorization", "Bearer " + m.ApiKey))
res, err := stub.Create(ctx, req)
if err != nil {
return nil, err
}

return res, nil
}

0 comments on commit 68e0306

Please sign in to comment.