Skip to content

Commit

Permalink
updates authorization module, adds REDME
Browse files Browse the repository at this point in the history
  • Loading branch information
soufi committed Mar 22, 2021
1 parent e37275a commit bc22087
Show file tree
Hide file tree
Showing 23 changed files with 48 additions and 23 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# CLOUDHUB CLIENT GO

This repository hosts golang modules to query resources on anypoint platform.

Each resource has its own module that was generated using [openapi-generator](https://openapi-generator.tech/).

## How to use

Include each module separately from your go project using
```
require github.com/mulesoft-consulting/cloudhub-client-go/[module_name] [module_name]/vx.x.x
```
As an example, if you wanted to import the version 1.0.1 of the `vpc` module you would need to use the following syntax:
```
require github.com/mulesoft-consulting/cloudhub-client-go/vpc vpc/v1.0.1
```

## Modules Versioning

Each module is released independently from the other, therefore each release is prefixed with the name of the module.

Examples :
```
vpc/v1.0.0
authorization/v2.2.0
```
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.gitignore
.openapi-generator-ignore
.travis.yml
README.md
api/openapi.yaml
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions authenticate/README.md → authorization/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Go API client for authenticate
# Go API client for authorization

Description of the Authentication API

Expand All @@ -22,7 +22,7 @@ go get golang.org/x/net/context
Put the package under your project folder and add the following in import:

```golang
import sw "./authenticate"
import sw "./authorization"
```

To use a proxy, set the environment variable `HTTP_PROXY`:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
openapi: 3.0.0
info:
description: Description of the Authentication API
title: Authentication API
title: Authorization API
version: 1.0.0
servers:
- description: Anypoint Cloudhub
Expand Down
4 changes: 2 additions & 2 deletions authenticate/api_default.go → authorization/api_default.go

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

6 changes: 3 additions & 3 deletions authenticate/client.go → authorization/client.go

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

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

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion authenticate/go.mod → authorization/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/mulesoft-consulting/cloudhub-client-go/authenticate
module github.com/mulesoft-consulting/cloudhub-client-go/authorization

go 1.13

Expand Down
File renamed without changes.

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

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

4 changes: 2 additions & 2 deletions authenticate/response.go → authorization/response.go

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

4 changes: 2 additions & 2 deletions authenticate/utils.go → authorization/utils.go

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

4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ go 1.13

require (
github.com/mulesoft-consulting/cloudhub-client-go/vpc v1.0.0
github.com/mulesoft-consulting/cloudhub-client-go/authenticate v1.0.0
github.com/mulesoft-consulting/cloudhub-client-go/authorization v1.0.0
github.com/stretchr/testify v1.7.0 // indirect
)

replace (
github.com/mulesoft-consulting/cloudhub-client-go/vpc v1.0.0 => ./vpc
github.com/mulesoft-consulting/cloudhub-client-go/authenticate v1.0.0 => ./authenticate
github.com/mulesoft-consulting/cloudhub-client-go/authorization v1.0.0 => ./authorization
)
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"regexp"
"strings"

auth "github.com/mulesoft-consulting/cloudhub-client-go/authenticate"
auth "github.com/mulesoft-consulting/cloudhub-client-go/authorization"
vpc "github.com/mulesoft-consulting/cloudhub-client-go/vpc"
)

Expand Down

0 comments on commit bc22087

Please sign in to comment.