Skip to content

Commit

Permalink
final import from internal repo
Browse files Browse the repository at this point in the history
  • Loading branch information
jaymccon committed Aug 17, 2018
1 parent 8e224a6 commit aa3e414
Show file tree
Hide file tree
Showing 35 changed files with 7,118 additions and 727 deletions.
40 changes: 28 additions & 12 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 5 additions & 27 deletions Gopkg.toml
@@ -1,25 +1,3 @@

# Gopkg.toml example
#
# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
# for detailed Gopkg.toml documentation.
#
# required = ["github.com/user/thing/cmd/thing"]
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
#
# [[constraint]]
# name = "github.com/user/project"
# version = "1.0.0"
#
# [[constraint]]
# name = "github.com/user/project2"
# branch = "dev"
# source = "github.com/myfork/project2"
#
# [[override]]
# name = "github.com/x/y"
# version = "2.4.0"

[prune]
go-tests = true
non-go = true
Expand All @@ -31,16 +9,16 @@

[[constraint]]
name = "github.com/pmorie/go-open-service-broker-client"
version = "0.0.9"

[[constraint]]
name = "github.com/pmorie/osb-broker-lib"
version = "0.0.7"
version = "0.0.10"

[[constraint]]
name = "github.com/aws/aws-sdk-go"
version = "1.13.34"

[[constraint]]
branch = "master"
name = "github.com/pmorie/osb-broker-lib"

[[constraint]]
branch = "basic_auth"
name = "github.com/jaymccon/osb-broker-lib"
30 changes: 15 additions & 15 deletions cmd/servicebroker/main.go
Expand Up @@ -4,31 +4,31 @@ import (
"context"
"flag"
"fmt"
"github.com/golang/glog"
prom "github.com/prometheus/client_golang/prometheus"
"os"
"os/signal"
"path"
"strconv"
"syscall"
"github.com/golang/glog"
prom "github.com/prometheus/client_golang/prometheus"

"github.com/pmorie/osb-broker-lib/pkg/metrics"
"github.com/jaymccon/osb-broker-lib/pkg/rest"
"github.com/jaymccon/osb-broker-lib/pkg/server"
"github.com/awslabs/aws-service-broker/pkg/broker"
"github.com/jaymccon/osb-broker-lib/pkg/server"
"github.com/pmorie/osb-broker-lib/pkg/metrics"
"github.com/pmorie/osb-broker-lib/pkg/rest"
)

var options struct {
broker.Options

Port int
Insecure bool
TLSCert string
TLSKey string
TLSCertFile string
TLSKeyFile string
EnableBasicAuth bool
BasicAuthUser string
Port int
Insecure bool
TLSCert string
TLSKey string
TLSCertFile string
TLSKeyFile string
EnableBasicAuth bool
BasicAuthUser string
BasicAuthPassword string
}

Expand Down Expand Up @@ -93,8 +93,8 @@ func runWithContext(ctx context.Context) error {
if options.BasicAuthPassword == "" {
options.BasicAuthPassword = os.Getenv("SECURITY_USER_PASSWORD")
}
auth := server.BasicAuthWrapper{User: options.BasicAuthUser, Pass: options.BasicAuthPassword}
s := server.New(api, reg, options.EnableBasicAuth, auth)
auth := server.BasicAuth{User: options.BasicAuthUser, Pass: options.BasicAuthPassword}
s := server.New(api, reg, options.EnableBasicAuth, auth.Secret)

glog.Infof("Starting broker!")

Expand Down
16 changes: 0 additions & 16 deletions pkg/broker/cli.go
Expand Up @@ -4,22 +4,6 @@ import (
"flag"
)

// Options cli options
type Options struct {
CatalogPath string
KeyID string
SecretKey string
Profile string
TableName string
S3Bucket string
S3Region string
S3Key string
TemplateFilter string
Region string
BrokerID string
RoleArn string
}

// AddFlags adds defined flags to cli options
func AddFlags(o *Options) {
flag.StringVar(&o.KeyID, "keyId", "", "AWS IAM User Key ID to use, if left blank will attempt to use a role, if defined secret-key must also be defined.")
Expand Down
10 changes: 10 additions & 0 deletions pkg/broker/cli_test.go
@@ -0,0 +1,10 @@
package broker

import (
"testing"
)

func TestAddFlags(t *testing.T) {
opts := Options{}
AddFlags(&opts)
}

0 comments on commit aa3e414

Please sign in to comment.