Giter Site home page Giter Site logo

go-concourse's Introduction

go-concourse's People

Contributors

aartikriplani avatar andrewedstrom avatar chendrix avatar clarafu avatar corytheboyd avatar edtan avatar evashort avatar gaell avatar gregarcara avatar joshzarrabi avatar jtarchie avatar lasred avatar mariash avatar pivotal-ahirji avatar tanglisha avatar tobocop avatar vito avatar vmwghbot avatar xenophex avatar zachgersh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

go-concourse's Issues

Dependency on ATC package results in vendoring lots of unnecessary packages

Because there is a dependency on the concourse/atc package typical vendoring tools (such as gvt) will pull in all the transitive dependencies of the ATC, e.g. lib/pq and cloudfoundry-incubator/garden.

Is there a way to extract the small parts of the ATC project into either this library or some common, shared library, so that users of this library do not have to vendor so many transitive dependencies?

For reference, here are the transitive dependencies of the atc package that gvt vendors:

± |develop ✓| → gvt fetch github.com/concourse/go-concourse
2016/06/01 07:42:06 Fetching: github.com/concourse/go-concourse
[...]
2016/06/01 07:42:10 · Fetching recursive dependency: github.com/concourse/atc
2016/06/01 07:42:19 ·· Skipping (existing): gopkg.in/yaml.v2
2016/06/01 07:42:19 ·· Fetching recursive dependency: github.com/xoebus/zest
2016/06/01 07:42:21 ··· Fetching recursive dependency: github.com/contraband/holler
2016/06/01 07:42:22 ···· Skipping (existing): github.com/onsi/gomega/gbytes
2016/06/01 07:42:22 ···· Skipping (existing): github.com/onsi/gomega/ghttp
2016/06/01 07:42:22 ···· Skipping (existing): github.com/onsi/ginkgo
2016/06/01 07:42:22 ···· Skipping (existing): github.com/onsi/gomega
2016/06/01 07:42:22 ··· Fetching recursive dependency: github.com/pivotal-golang/lager
2016/06/01 07:42:24 ···· Skipping (existing): github.com/onsi/gomega
2016/06/01 07:42:24 ···· Skipping (existing): github.com/onsi/gomega/gbytes
2016/06/01 07:42:24 ···· Skipping (existing): github.com/onsi/ginkgo/reporters
2016/06/01 07:42:24 ···· Skipping (existing): github.com/onsi/ginkgo
2016/06/01 07:42:24 ···· Skipping (existing): github.com/onsi/gomega/format
2016/06/01 07:42:24 ···· Skipping (existing): github.com/onsi/ginkgo/types
2016/06/01 07:42:24 ···· Skipping (existing): github.com/onsi/gomega/types
2016/06/01 07:42:24 ···· Skipping (existing): github.com/onsi/ginkgo/config
2016/06/01 07:42:24 ·· Fetching recursive dependency: github.com/vito/go-sse/sse
2016/06/01 07:42:25 ··· Skipping (existing): github.com/onsi/gomega
2016/06/01 07:42:25 ··· Skipping (existing): github.com/onsi/gomega/ghttp
2016/06/01 07:42:25 ··· Skipping (existing): github.com/onsi/gomega/gbytes
2016/06/01 07:42:25 ··· Skipping (existing): github.com/onsi/ginkgo
2016/06/01 07:42:25 ·· Fetching recursive dependency: github.com/cloudfoundry-incubator/garden/client/connection/fakes
2016/06/01 07:42:27 ··· Fetching recursive dependency: github.com/tedsuo/rata
2016/06/01 07:42:29 ···· Skipping (existing): github.com/onsi/gomega/ghttp
2016/06/01 07:42:29 ···· Skipping (existing): github.com/onsi/ginkgo
2016/06/01 07:42:29 ···· Skipping (existing): github.com/onsi/gomega
2016/06/01 07:42:29 ···· Fetching recursive dependency: github.com/bmizerany/pat
2016/06/01 07:42:30 ··· Fetching recursive dependency: github.com/cloudfoundry-incubator/garden
2016/06/01 07:42:30 ···· Skipping (existing): github.com/onsi/ginkgo
2016/06/01 07:42:30 ···· Skipping (existing): github.com/onsi/gomega
2016/06/01 07:42:30 ···· Skipping (existing): github.com/onsi/gomega/gbytes
2016/06/01 07:42:30 ···· Skipping (existing): github.com/onsi/gomega/ghttp
2016/06/01 07:42:30 ·· Fetching recursive dependency: github.com/google/go-github/github
2016/06/01 07:42:33 ··· Fetching recursive dependency: github.com/google/go-querystring/query
2016/06/01 07:42:34 ·· Fetching recursive dependency: github.com/tedsuo/ifrit/fake_runner
2016/06/01 07:42:35 ··· Fetching recursive dependency: github.com/tedsuo/ifrit
2016/06/01 07:42:36 ···· Skipping (existing): github.com/onsi/gomega
2016/06/01 07:42:36 ···· Fetching recursive dependency: github.com/nu7hatch/gouuid
2016/06/01 07:42:37 ···· Skipping (existing): github.com/onsi/gomega/ghttp
2016/06/01 07:42:37 ···· Skipping (existing): github.com/onsi/gomega/gexec
2016/06/01 07:42:37 ···· Skipping (existing): github.com/onsi/gomega/gbytes
2016/06/01 07:42:37 ···· Skipping (existing): github.com/onsi/ginkgo
2016/06/01 07:42:37 ··· Skipping (existing): github.com/onsi/ginkgo
2016/06/01 07:42:37 ··· Skipping (existing): github.com/onsi/gomega
2016/06/01 07:42:37 ·· Fetching recursive dependency: github.com/sclevine/agouti
2016/06/01 07:42:39 ··· Skipping (existing): github.com/onsi/gomega/types
2016/06/01 07:42:39 ··· Skipping (existing): github.com/onsi/ginkgo
2016/06/01 07:42:39 ··· Skipping (existing): github.com/onsi/gomega/format
2016/06/01 07:42:39 ··· Skipping (existing): github.com/onsi/gomega
2016/06/01 07:42:39 ·· Fetching recursive dependency: github.com/felixge/tcpkeepalive
2016/06/01 07:42:40 ·· Fetching recursive dependency: github.com/concourse/retryhttp
2016/06/01 07:42:42 ··· Skipping (existing): github.com/onsi/ginkgo
2016/06/01 07:42:42 ··· Skipping (existing): github.com/onsi/gomega
2016/06/01 07:42:42 ··· Skipping (existing): github.com/onsi/gomega/gbytes
2016/06/01 07:42:42 ·· Fetching recursive dependency: golang.org/x/oauth2/github
2016/06/01 07:42:44 ··· Fetching recursive dependency: golang.org/x/oauth2
2016/06/01 07:42:44 ···· Fetching recursive dependency: google.golang.org/appengine
2016/06/01 07:42:47 ····· Fetching recursive dependency: golang.org/x/net/context
2016/06/01 07:42:49 ····· Skipping (existing): github.com/golang/protobuf/proto
2016/06/01 07:42:49 ···· Fetching recursive dependency: google.golang.org/cloud/compute/metadata
2016/06/01 07:42:52 ····· Fetching recursive dependency: google.golang.org/cloud/internal
2016/06/01 07:42:52 ······ Fetching recursive dependency: google.golang.org/grpc/credentials/oauth
2016/06/01 07:42:54 ······· Fetching recursive dependency: google.golang.org/grpc/credentials
2016/06/01 07:42:54 ······ Fetching recursive dependency: google.golang.org/grpc
2016/06/01 07:42:54 ······· Fetching recursive dependency: golang.org/x/net/http2/hpack
2016/06/01 07:42:54 ······· Fetching recursive dependency: github.com/golang/glog
2016/06/01 07:42:56 ······· Skipping (existing): github.com/golang/protobuf/proto
2016/06/01 07:42:56 ······· Fetching recursive dependency: golang.org/x/net/trace
2016/06/01 07:42:56 ········ Fetching recursive dependency: golang.org/x/net/internal/timeseries
2016/06/01 07:42:56 ······· Fetching recursive dependency: golang.org/x/net/http2
2016/06/01 07:42:56 ········ Fetching recursive dependency: go4.org/syncutil/singleflight
2016/06/01 07:42:59 ········ Fetching recursive dependency: golang.org/x/net/lex/httplex
2016/06/01 07:42:59 ········ Fetching recursive dependency: camlistore.org/pkg/googlestorage
2016/06/01 07:43:03 ········· Fetching recursive dependency: camlistore.org/pkg/blob
2016/06/01 07:43:03 ·········· Fetching recursive dependency: camlistore.org/vendor/go4.org/readerutil
2016/06/01 07:43:03 ·········· Fetching recursive dependency: camlistore.org/pkg/constants
2016/06/01 07:43:03 ··········· Fetching recursive dependency: camlistore.org/vendor/golang.org/x/oauth2
2016/06/01 07:43:04 ············ Fetching recursive dependency: camlistore.org/vendor/google.golang.org/cloud/compute/metadata
2016/06/01 07:43:04 ············· Fetching recursive dependency: camlistore.org/vendor/golang.org/x/net/context/ctxhttp
2016/06/01 07:43:04 ·············· Fetching recursive dependency: camlistore.org/vendor/golang.org/x/net/context
2016/06/01 07:43:04 ············· Fetching recursive dependency: camlistore.org/vendor/google.golang.org/cloud/internal
2016/06/01 07:43:04 ·············· Fetching recursive dependency: camlistore.org/vendor/google.golang.org/grpc/credentials
2016/06/01 07:43:04 ·············· Fetching recursive dependency: camlistore.org/vendor/google.golang.org/grpc
2016/06/01 07:43:04 ··············· Fetching recursive dependency: camlistore.org/vendor/golang.org/x/net/trace
2016/06/01 07:43:04 ················ Fetching recursive dependency: camlistore.org/vendor/golang.org/x/net/internal/timeseries
2016/06/01 07:43:04 ··············· Fetching recursive dependency: camlistore.org/vendor/github.com/golang/protobuf/proto
2016/06/01 07:43:04 ··············· Fetching recursive dependency: camlistore.org/vendor/golang.org/x/net/http2
2016/06/01 07:43:04 ················ Fetching recursive dependency: camlistore.org/vendor/google.golang.org/api/compute/v1
2016/06/01 07:43:04 ················· Fetching recursive dependency: camlistore.org/vendor/google.golang.org/api/gensupport
2016/06/01 07:43:04 ·················· Fetching recursive dependency: camlistore.org/vendor/google.golang.org/api/googleapi
2016/06/01 07:43:04 ················ Fetching recursive dependency: camlistore.org/vendor/go4.org/syncutil/singleflight
2016/06/01 07:43:04 ················ Fetching recursive dependency: golang.org/x/crypto/ssh/terminal
2016/06/01 07:43:06 ··············· Fetching recursive dependency: camlistore.org/vendor/github.com/golang/glog
2016/06/01 07:43:06 ·············· Fetching recursive dependency: camlistore.org/vendor/google.golang.org/cloud
2016/06/01 07:43:07 ··············· Fetching recursive dependency: camlistore.org/vendor/github.com/golang/protobuf/ptypes/struct
2016/06/01 07:43:07 ··············· Fetching recursive dependency: camlistore.org/vendor/github.com/golang/protobuf/ptypes/wrappers
2016/06/01 07:43:07 ··············· Fetching recursive dependency: camlistore.org/vendor/google.golang.org/api/storage/v1
2016/06/01 07:43:07 ··············· Fetching recursive dependency: google.golang.org/api/container/v1
2016/06/01 07:43:11 ················ Fetching recursive dependency: google.golang.org/api/gensupport
2016/06/01 07:43:11 ················· Fetching recursive dependency: google.golang.org/api/googleapi
2016/06/01 07:43:11 ··············· Fetching recursive dependency: camlistore.org/vendor/github.com/golang/protobuf/ptypes/timestamp
2016/06/01 07:43:11 ··············· Fetching recursive dependency: google.golang.org/api/pubsub/v1
2016/06/01 07:43:11 ··············· Fetching recursive dependency: camlistore.org/vendor/google.golang.org/api/logging/v1beta3
2016/06/01 07:43:11 ········· Fetching recursive dependency: camlistore.org/pkg/osutil
2016/06/01 07:43:11 ·········· Fetching recursive dependency: camlistore.org/pkg/buildinfo
2016/06/01 07:43:11 ·········· Fetching recursive dependency: camlistore.org/pkg/env
2016/06/01 07:43:11 ·········· Fetching recursive dependency: camlistore.org/vendor/go4.org/wkfs/gcs
2016/06/01 07:43:11 ··········· Fetching recursive dependency: camlistore.org/vendor/go4.org/wkfs
2016/06/01 07:43:11 ·········· Fetching recursive dependency: camlistore.org/vendor/go4.org/jsonconfig
2016/06/01 07:43:11 ··········· Fetching recursive dependency: camlistore.org/vendor/go4.org/errorutil
2016/06/01 07:43:11 ········· Fetching recursive dependency: camlistore.org/vendor/go4.org/oauthutil
2016/06/01 07:43:11 ········ Fetching recursive dependency: google.golang.org/api/compute/v1
2016/06/01 07:43:11 ······ Fetching recursive dependency: google.golang.org/cloud
2016/06/01 07:43:12 ······· Fetching recursive dependency: google.golang.org/api/storage/v1
2016/06/01 07:43:12 ······· Fetching recursive dependency: github.com/golang/protobuf/ptypes/wrappers
2016/06/01 07:43:14 ········ Skipping (existing): github.com/golang/protobuf/proto
2016/06/01 07:43:14 ······· Skipping (existing): github.com/golang/protobuf/ptypes/any
2016/06/01 07:43:14 ······· Fetching recursive dependency: github.com/golang/protobuf/ptypes/struct
2016/06/01 07:43:14 ········ Skipping (existing): github.com/golang/protobuf/proto
2016/06/01 07:43:14 ······· Skipping (existing): github.com/golang/protobuf/proto
2016/06/01 07:43:14 ······· Fetching recursive dependency: github.com/golang/protobuf/ptypes/empty
2016/06/01 07:43:14 ········ Skipping (existing): github.com/golang/protobuf/proto
2016/06/01 07:43:14 ······· Fetching recursive dependency: github.com/golang/protobuf/ptypes/duration
2016/06/01 07:43:14 ········ Skipping (existing): github.com/golang/protobuf/proto
2016/06/01 07:43:14 ······· Fetching recursive dependency: google.golang.org/api/logging/v1beta3
2016/06/01 07:43:15 ······· Fetching recursive dependency: google.golang.org/api/bigquery/v2
2016/06/01 07:43:15 ······· Fetching recursive dependency: github.com/golang/protobuf/ptypes/timestamp
2016/06/01 07:43:15 ········ Skipping (existing): github.com/golang/protobuf/proto
2016/06/01 07:43:15 ·· Skipping (existing): github.com/onsi/ginkgo/extensions/table
2016/06/01 07:43:15 ·· Fetching recursive dependency: github.com/lib/pq
2016/06/01 07:43:17 ·· Fetching recursive dependency: github.com/dgrijalva/jwt-go
2016/06/01 07:43:18 ·· Fetching recursive dependency: github.com/hashicorp/go-multierror
2016/06/01 07:43:20 ··· Fetching recursive dependency: github.com/hashicorp/errwrap
2016/06/01 07:43:22 ·· Fetching recursive dependency: github.com/elazarl/go-bindata-assetfs
2016/06/01 07:43:23 ·· Fetching recursive dependency: github.com/bigdatadev/goryman
2016/06/01 07:43:25 ··· Skipping (existing): github.com/golang/protobuf/proto
2016/06/01 07:43:25 ·· Fetching recursive dependency: github.com/pivotal-golang/clock
2016/06/01 07:43:27 ··· Skipping (existing): github.com/onsi/ginkgo
2016/06/01 07:43:27 ··· Skipping (existing): github.com/onsi/gomega
2016/06/01 07:43:27 ·· Fetching recursive dependency: github.com/concourse/baggageclaim/client
2016/06/01 07:43:28 ··· Skipping (existing): github.com/onsi/ginkgo
2016/06/01 07:43:28 ··· Fetching recursive dependency: github.com/concourse/baggageclaim
2016/06/01 07:43:29 ···· Skipping (existing): github.com/onsi/gomega/gbytes
2016/06/01 07:43:29 ···· Skipping (existing): github.com/onsi/gomega/ghttp
2016/06/01 07:43:29 ···· Skipping (existing): github.com/onsi/gomega
2016/06/01 07:43:29 ···· Skipping (existing): github.com/onsi/gomega/gexec
2016/06/01 07:43:29 ···· Skipping (existing): github.com/onsi/ginkgo
2016/06/01 07:43:29 ···· Fetching recursive dependency: github.com/jessevdk/go-flags
2016/06/01 07:43:31 ··· Skipping (existing): github.com/onsi/gomega
2016/06/01 07:43:31 ·· Fetching recursive dependency: github.com/gorilla/websocket
2016/06/01 07:43:32 ·· Fetching recursive dependency: github.com/cloudfoundry/gunk/urljoiner
2016/06/01 07:43:34 ··· Skipping (existing): github.com/onsi/ginkgo
2016/06/01 07:43:34 ··· Skipping (existing): github.com/onsi/gomega
2016/06/01 07:43:34 ·· Fetching recursive dependency: github.com/gorilla/context
2016/06/01 07:43:36 ·· Fetching recursive dependency: github.com/BurntSushi/migration
2016/06/01 07:43:37 ·· Skipping (existing): github.com/onsi/gomega/gexec
2016/06/01 07:43:37 ·· Fetching recursive dependency: golang.org/x/crypto/bcrypt
2016/06/01 07:43:37 ··· Fetching recursive dependency: golang.org/x/crypto/blowfish
2016/06/01 07:43:37 ·· Skipping (existing): github.com/onsi/gomega/ghttp
2016/06/01 07:43:37 ·· Fetching recursive dependency: github.com/mitchellh/mapstructure
2016/06/01 07:43:39 ·· Skipping (existing): github.com/onsi/gomega/gbytes
2016/06/01 07:43:39 ·· Skipping (existing): github.com/onsi/gomega/types
2016/06/01 07:43:39 ·· Skipping (existing): github.com/onsi/ginkgo
2016/06/01 07:43:39 ·· Skipping (existing): github.com/onsi/gomega

Errors returned by the public interface methods are internal

I'm trying to use this client library to access to concourse service from inside of one application which I'm developing and because the returned errors are internal, I cannot distinguish them easily (using a type switch or comparing error values) to handle them differently by the logic of my application.
My question is, why errors returned by methods of the public interface are defined in an internal package? Could they be defined in a public accessible package?

Let me show an example of one of the go-concourse functions that I'm using.

I have an instance of a team and I'm calling Job method

Because Job returns a bool as second return value, I can clearly identify if ResourceNotFondError has been returned by connection.Send method because Job function has a switch type which is doing so

However connection.Send doesn't only return such error, it also returns errors from third party libraries or the standard library like http.Client.Do() and it's ok to return those errors directly to the caller if go-concouser doesn't handle them because it doesn't have any purpose.
What's important for me, and I believe for any consumer of go-concourse, is to access to the errors handle/classified by the library, which are defined in internal/errors.go, and returned by connection.populateResponse which is called by connection.Send

What I would like is to have the change to identify if the error returned by Job method is, for example, an ErrUnauthorized, just doing simple value comparison check.

Please, if I'm wrong, how I feel that I would have to check these errors, then, I would appreciate if you can tell how I should do it.

Many thanks in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.