Skip to content

Commit

Permalink
Merge pull request #5 from Piszmog/develop
Browse files Browse the repository at this point in the history
refactor packages
  • Loading branch information
Piszmog committed Oct 3, 2018
2 parents f76f714 + 1134c4e commit 77e5dc3
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 15 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ package main
import (
"fmt"
"github.com/Piszmog/cfservices"
"github.com/Piszmog/cloudconfigclient/client"
"github.com/Piszmog/cloudconfigclient"
)

type File struct {
Expand All @@ -46,19 +46,19 @@ type Example struct {

func main() {
// To create a Client for a locally running Spring Config Server
configClient, err := client.CreateLocalClientFromEnv()
configClient, err := cloudconfigclient.CreateLocalClientFromEnv()
// Or
configClient, err := client.CreateLocalClient([]string{"http://localhost:8888"})
configClient, err := cloudconfigclient.CreateLocalClient([]string{"http://localhost:8888"})
// or to create a Client for a Spring Config Server in Cloud Foundry
configClient, err := client.CreateCloudClient()
configClient, err := cloudconfigclient.CreateCloudClient()
// or to create a Client for a Spring Config Server with OAuth2
credentials := cfservices.Credentials{
Uri: "config server uri",
ClientSecret: "client secret",
ClientId: "client id",
AccessTokenUri: "access token uri",
}
configClient, err := client.CreateOAuth2Client([]cfservices.Credentials{credentials})
configClient, err := cloudconfigclient.CreateOAuth2Client([]cfservices.Credentials{credentials})

if err != nil {
panic(err)
Expand Down
2 changes: 1 addition & 1 deletion client/client.go → client.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package client
package cloudconfigclient

import (
"github.com/Piszmog/cloudconfigclient/net"
Expand Down
2 changes: 1 addition & 1 deletion client/client_test.go → client_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package client
package cloudconfigclient

import (
"bytes"
Expand Down
2 changes: 1 addition & 1 deletion client/configuration.go → configuration.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package client
package cloudconfigclient

import (
"encoding/json"
Expand Down
2 changes: 1 addition & 1 deletion client/configuration_test.go → configuration_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package client
package cloudconfigclient

import (
"github.com/pkg/errors"
Expand Down
2 changes: 1 addition & 1 deletion client/local.go → local.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package client
package cloudconfigclient

import (
"github.com/Piszmog/cfservices"
Expand Down
2 changes: 1 addition & 1 deletion client/local_test.go → local_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package client
package cloudconfigclient

import (
"os"
Expand Down
2 changes: 1 addition & 1 deletion client/oauth2.go → oauth2.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package client
package cloudconfigclient

import (
"github.com/Piszmog/cfservices"
Expand Down
2 changes: 1 addition & 1 deletion client/oauth2_test.go → oauth2_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package client
package cloudconfigclient

import (
"github.com/Piszmog/cfservices"
Expand Down
2 changes: 1 addition & 1 deletion client/resource.go → resource.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package client
package cloudconfigclient

import (
"encoding/json"
Expand Down
2 changes: 1 addition & 1 deletion client/resource_test.go → resource_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package client
package cloudconfigclient

import (
"github.com/pkg/errors"
Expand Down

0 comments on commit 77e5dc3

Please sign in to comment.