Skip to content

Commit e88e17c

Browse files
committed
breaking change: remove support of noaa
bump to code.cloudfoundry.org/cli v8.0.0
1 parent b41fe54 commit e88e17c

File tree

5 files changed

+196
-318
lines changed

5 files changed

+196
-318
lines changed

README.md

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
Convenient way to have all cloud foundry go client api from https://github.com/cloudfoundry/cli .
44

5-
The Cloud foundry cli provide go client to call cloud foundry api like v2/v3 api, uaa api,
5+
The Cloud foundry cli provide go client to call cloud foundry api like v2/v3 api, uaa api,
66
network policy api, logs and metrics api, tcp router api ...
7-
But, how to to build and call them can be very difficult and is not documented.
7+
But, how to build and call them can be very difficult and is not documented.
88

99
This repo leverage this situation and is an extract of the code we do for [cloud foundry terraform provider](https://github.com/cloudfoundry-community/terraform-provider-cf).
1010

@@ -28,36 +28,26 @@ func main() {
2828
if err != nil {
2929
panic(err)
3030
}
31-
31+
3232
// get access to cf api v2 (incomplete api)
3333
session.V2()
34-
35-
// get access to cf api v3 (complete and always up to date api)
34+
35+
// get access to cf api v3 (complete and always up to date api)
3636
session.V3()
37-
37+
3838
// Get access to api uaa (incomplete)
3939
session.UAA()
40-
40+
4141
// Get access to TCP Routing api
4242
session.TCPRouter()
43-
43+
4444
// Get access to networking policy api
4545
session.Networking()
46-
47-
// Get access to logs api and metrics through noaa
48-
session.NOAA()
49-
// you can use helper for retrieving log messages for an app
50-
h := clients.NewNOAAHelper(session.NOAA(), session.ConfigStore())
51-
msgs, err := h.RecentLogs("app-guid", 0) // 0 means no limit of messages to see
52-
if err != nil {
53-
panic(err)
54-
}
55-
fmt.Println(msgs)
56-
57-
// Get an http client which pass authorization header to call api(s) directly
46+
47+
// Get an http client which pass authorization header to call api(s) directly
5848
session.Raw()
59-
60-
// Get config store for client which need, for example, current access token (e.g.: NOAA)
49+
50+
// Get config store for client which need, for example, current access token (e.g.: NOAA)
6151
session.ConfigStore()
6252
}
63-
```
53+
```

go.mod

Lines changed: 25 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,32 @@
1-
module github.com/cloudfoundry-community/go-cf-clients-helper
1+
module github.com/cloudfoundry-community/go-cf-clients-helper/v2
22

3-
go 1.13
4-
5-
replace github.com/SermoDigital/jose => github.com/SermoDigital/jose v0.9.2-0.20161205224733-f6df55f235c2
6-
7-
replace github.com/mailru/easyjson => github.com/mailru/easyjson v0.0.0-20180323154445-8b799c424f57
8-
9-
replace github.com/cloudfoundry/sonde-go => github.com/cloudfoundry/sonde-go v0.0.0-20171206171820-b33733203bb4
10-
11-
replace code.cloudfoundry.org/go-log-cache => code.cloudfoundry.org/go-log-cache v1.0.1-0.20200316170138-f466e0302c34
3+
go 1.17
124

135
require (
14-
code.cloudfoundry.org/bytefmt v0.0.0-20200131002437-cf55d5288a48 // indirect
156
code.cloudfoundry.org/cfnetworking-cli-api v0.0.0-20190103195135-4b04f26287a6
16-
code.cloudfoundry.org/cli v7.1.0+incompatible
17-
code.cloudfoundry.org/cli-plugin-repo v0.0.0-20200603234120-1005fc12b512 // indirect
18-
code.cloudfoundry.org/diego-ssh v0.0.0-20210519145332-5473ddd94e1e // indirect
19-
code.cloudfoundry.org/go-log-cache v0.0.0-00010101000000-000000000000 // indirect
20-
code.cloudfoundry.org/gofileutils v0.0.0-20170111115228-4d0c80011a0f // indirect
21-
code.cloudfoundry.org/inigo v0.0.0-20210603163841-6d2accd02030 // indirect
22-
code.cloudfoundry.org/jsonry v1.1.2 // indirect
23-
code.cloudfoundry.org/lager v2.0.0+incompatible // indirect
7+
code.cloudfoundry.org/cli v0.0.0-20210824215059-5ffa262bb2e5
8+
)
9+
10+
require (
11+
code.cloudfoundry.org/bytefmt v0.0.0-20170428003108-f4415fafc561 // indirect
12+
code.cloudfoundry.org/jsonry v1.1.3 // indirect
2413
code.cloudfoundry.org/tlsconfig v0.0.0-20200131000646-bbe0f8da39b3 // indirect
25-
code.cloudfoundry.org/ykk v0.0.0-20170424192843-e4df4ce2fd4d // indirect
26-
github.com/SermoDigital/jose v0.9.1 // indirect
27-
github.com/apoydence/eachers v0.0.0-20181020210610-23942921fe77 // indirect
28-
github.com/bmatcuk/doublestar v1.3.2 // indirect
14+
github.com/SermoDigital/jose v0.9.2-0.20161205224733-f6df55f235c2 // indirect
15+
github.com/blang/semver v3.5.1+incompatible // indirect
16+
github.com/bmatcuk/doublestar v1.3.1 // indirect
2917
github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40 // indirect
30-
github.com/charlievieth/fs v0.0.1 // indirect
31-
github.com/cloudfoundry/bosh-cli v6.4.1+incompatible // indirect
32-
github.com/cloudfoundry/bosh-utils v0.0.0-20201017100224-2c354ff44754 // indirect
33-
github.com/cloudfoundry/noaa v2.1.0+incompatible
34-
github.com/cloudfoundry/sonde-go v0.0.0-20200416163440-a42463ba266b
35-
github.com/cppforlife/go-patch v0.2.0 // indirect
36-
github.com/cyphar/filepath-securejoin v0.2.2 // indirect
37-
github.com/elazarl/goproxy v0.0.0-20200426045556-49ad98f6dac1 // indirect
38-
github.com/elazarl/goproxy/ext v0.0.0-20200426045556-49ad98f6dac1 // indirect
39-
github.com/fatih/color v1.9.0 // indirect
40-
github.com/gogo/protobuf v1.3.1 // indirect
41-
github.com/google/go-querystring v1.0.0 // indirect
42-
github.com/gorilla/websocket v1.4.2 // indirect
43-
github.com/jessevdk/go-flags v1.4.0 // indirect
44-
github.com/lunixbochs/vtclean v1.0.0 // indirect
45-
github.com/mailru/easyjson v0.7.6 // indirect
46-
github.com/mattn/go-colorable v0.1.6 // indirect
47-
github.com/mattn/go-runewidth v0.0.9 // indirect
48-
github.com/moby/moby v20.10.7+incompatible // indirect
49-
github.com/moby/term v0.0.0-20210610120745-9d4ed1856297 // indirect
50-
github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d // indirect
51-
github.com/poy/eachers v0.0.0-20181020210610-23942921fe77 // indirect
52-
github.com/sabhiram/go-gitignore v0.0.0-20201211210132-54b8a0bf510f // indirect
53-
github.com/sirupsen/logrus v1.7.0 // indirect
54-
github.com/tedsuo/ifrit v0.0.0-20191009134036-9a97d0632f00 // indirect
55-
github.com/tedsuo/rata v1.0.0 // indirect
56-
github.com/vito/go-interact v1.0.0 // indirect
57-
golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897 // indirect
58-
golang.org/x/net v0.0.0-20200602114024-627f9648deb9 // indirect
59-
golang.org/x/sys v0.0.0-20201022201747-fb209a7c41cd // indirect
60-
google.golang.org/protobuf v1.24.0 // indirect
61-
gopkg.in/cheggaaa/pb.v1 v1.0.28 // indirect
62-
18+
github.com/charlievieth/fs v0.0.0-20170613215519-7dc373669fa1 // indirect
19+
github.com/cloudfoundry/bosh-cli v5.5.1+incompatible // indirect
20+
github.com/cloudfoundry/bosh-utils v0.0.0-20180315210917-c6a922e299b8 // indirect
21+
github.com/cppforlife/go-patch v0.1.0 // indirect
22+
github.com/jessevdk/go-flags v1.4.1-0.20181221193153-c0795c8afcf4 // indirect
23+
github.com/konsorten/go-windows-terminal-sequences v1.0.1 // indirect
24+
github.com/mattn/go-runewidth v0.0.5-0.20181218000649-703b5e6b11ae // indirect
25+
github.com/sirupsen/logrus v1.2.0 // indirect
26+
github.com/tedsuo/rata v1.0.1-0.20170830210128-07d200713958 // indirect
27+
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97 // indirect
28+
golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf // indirect
29+
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 // indirect
30+
gopkg.in/cheggaaa/pb.v1 v1.0.27 // indirect
31+
gopkg.in/yaml.v2 v2.3.0 // indirect
6332
)

0 commit comments

Comments
 (0)