Skip to content

Commit

Permalink
Features/cmd (#32)
Browse files Browse the repository at this point in the history
* update dependency management system to go module

* adjust go module to include pkg sub module

* api command and app

* restructured project

* server api and groupsync command

* redesigned logger interface

* designed logger interface

* replace nats.io with rabbitmq

* composite event constructor

* update README.md
  • Loading branch information
imulab authored Dec 18, 2019
1 parent 5cd4636 commit f4cd5f0
Show file tree
Hide file tree
Showing 254 changed files with 1,742 additions and 1,148 deletions.
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736
.glide/
glide.lock
/vendor
vendor/

.idea/

70 changes: 0 additions & 70 deletions Gopkg.lock

This file was deleted.

38 changes: 0 additions & 38 deletions Gopkg.toml

This file was deleted.

20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

> GoSCIM aims to be a fully featured implementation of [SCIM v2](http://www.simplecloud.info/) specifiction. It provides basic building blocks to SCIM functions and a functional out-of-box server. It is also designed with extensibility in mind to make customizations easy.
**Caution** This is the early stage of `v2.0.0` version of go-scim. We are now at `v2.0.0-m2` ([release notes](https://github.com/imulab/go-scim/releases/tag/v2.0.0-m2)). This second major release will introduce drastic changes to the way resources are handled in the system.
**Caution** This is the early stage of `v2.0.0` version of go-scim. We are now at `v2.0.0-m3` ([release notes](https://github.com/imulab/go-scim/releases/tag/v2.0.0-m3)). This second major release will introduce drastic changes to the way resources are handled in the system.

For the currently stable version, checkout tag `v1.0.1`, or go to [here](https://github.com/imulab/go-scim/tree/v1.0.1).

Expand All @@ -18,15 +18,20 @@ For the currently stable version, checkout tag `v1.0.1`, or go to [here](https:/

## Installation and Usage

The project is in the early stage of `v2.0.0`. The current milestone does not have the ready-to-go server implementation yet. This will come in later milestones.

As for now, to check out the functionalities included in the tests:
The project is in the early stage of `v2.0.0`. As for now, to check out the functionalities included in the tests:

```
$ dep ensure
$ go test ./pkg/...
# cd into one of core, protocol, server
$ go test ./...
```

## Migration to Go modules

Since `v2.0.0-m3`, the project has migrated from [dep](https://golang.github.io/dep/) to [go modules](https://github.com/golang/go/wiki/Modules). This allows users to import the exact project modules separately as needed, and also allows their functions to evolve independently.

The project will continue to use a single tag until the official release of `v2.0.0`. On the official release, all modules will be tagged separately as
`v2.0.0` (for instance, `core/v2.0.0`, and `server/v2.0.0`). After that, modules will evolve independently.

## Documentation Index (TBD)

- [Project orientation](#)
Expand All @@ -42,8 +47,7 @@ $ go test ./pkg/...
While the fundamentals of the functions are delivered in `v2.0.0-m1`, we are still hard at work to deliver the rest. In the coming weeks and months, the rest of functions towrads `v2.0.0` will be released.
In addition to the scheduled functions, tests and documentations will also be added.

- `v2.0.0-m3` to introduce group membership synchronization and a working server.
- `v2.0.0-m4` to (re-)introduce mongo db persistence
- `v2.0.0-m4` to (re-)introduce mongo db persistence, and integration test on the server
- `v2.0.0-m5` to tackle resource root query and bulk operations.
- `v2.0.0-rc1` to complete tests and documentations

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pkg/core/expr/filter.go → core/expr/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package expr

import (
"fmt"
"github.com/imulab/go-scim/pkg/core/errors"
"github.com/imulab/go-scim/core/errors"
"strings"
)

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion pkg/core/expr/path.go → core/expr/path.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package expr

import (
"fmt"
"github.com/imulab/go-scim/pkg/core/errors"
"github.com/imulab/go-scim/core/errors"
"strconv"
"strings"
)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion pkg/core/expr/urn.go → core/expr/urn.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package expr

import (
"github.com/imulab/go-scim/pkg/core/spec"
"github.com/imulab/go-scim/core/spec"
)

var urnsCache = &urns{}
Expand Down
3 changes: 3 additions & 0 deletions core/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/imulab/go-scim/core

require github.com/stretchr/testify v1.4.0
12 changes: 12 additions & 0 deletions core/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/imulab/go-scim v1.0.1 h1:nWUJF3q0MQWwtGvSHdoylNfAuUeWBMuVL5pSMJ9EG1k=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
File renamed without changes.
2 changes: 1 addition & 1 deletion pkg/core/json/adapt.go → core/json/adapt.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package json

import "github.com/imulab/go-scim/pkg/core/prop"
import "github.com/imulab/go-scim/core/prop"

type ResourceMarshalAdapter struct {
Resource *prop.Resource
Expand Down
6 changes: 3 additions & 3 deletions pkg/core/json/deserialize.go → core/json/deserialize.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package json

import (
"github.com/imulab/go-scim/pkg/core/errors"
"github.com/imulab/go-scim/pkg/core/prop"
"github.com/imulab/go-scim/pkg/core/spec"
"github.com/imulab/go-scim/core/errors"
"github.com/imulab/go-scim/core/prop"
"github.com/imulab/go-scim/core/spec"
"strconv"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package json

import (
"encoding/json"
"github.com/imulab/go-scim/pkg/core/prop"
"github.com/imulab/go-scim/pkg/core/spec"
"github.com/imulab/go-scim/core/prop"
"github.com/imulab/go-scim/core/spec"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"
"io/ioutil"
Expand All @@ -14,7 +14,7 @@ import (

func TestDeserialize(t *testing.T) {
s := new(JSONDeserializeTestSuite)
s.resourceBase = "../../tests/json_deserialize_test_suite"
s.resourceBase = "../internal/json_deserialize_test_suite"
suite.Run(t, s)
}

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pkg/core/json/scanner.go → core/json/scanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package json

import (
"fmt"
"github.com/imulab/go-scim/pkg/core/errors"
"github.com/imulab/go-scim/core/errors"
"strconv"
)

Expand Down
6 changes: 3 additions & 3 deletions pkg/core/json/serialize.go → core/json/serialize.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package json

import (
"bytes"
"github.com/imulab/go-scim/pkg/core/errors"
"github.com/imulab/go-scim/pkg/core/prop"
"github.com/imulab/go-scim/pkg/core/spec"
"github.com/imulab/go-scim/core/errors"
"github.com/imulab/go-scim/core/prop"
"github.com/imulab/go-scim/core/spec"
"math"
"strconv"
"strings"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package json

import (
"encoding/json"
"github.com/imulab/go-scim/pkg/core/expr"
"github.com/imulab/go-scim/pkg/core/prop"
"github.com/imulab/go-scim/pkg/core/spec"
"github.com/imulab/go-scim/core/expr"
"github.com/imulab/go-scim/core/prop"
"github.com/imulab/go-scim/core/spec"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
Expand All @@ -15,7 +15,7 @@ import (

func TestSerialize(t *testing.T) {
s := new(JSONSerializeTestSuite)
s.resourceBase = "../../tests/json_serialize_test_suite"
s.resourceBase = "../internal/json_serialize_test_suite"
suite.Run(t, s)
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/core/prop/binary.go → core/prop/binary.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package prop
import (
"encoding/base64"
"fmt"
"github.com/imulab/go-scim/pkg/core/errors"
"github.com/imulab/go-scim/pkg/core/spec"
"github.com/imulab/go-scim/core/errors"
"github.com/imulab/go-scim/core/spec"
"hash/fnv"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/core/prop/boolean.go → core/prop/boolean.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package prop

import (
"fmt"
"github.com/imulab/go-scim/pkg/core/errors"
"github.com/imulab/go-scim/pkg/core/spec"
"github.com/imulab/go-scim/core/errors"
"github.com/imulab/go-scim/core/spec"
)

type booleanProperty struct {
Expand Down
4 changes: 2 additions & 2 deletions pkg/core/prop/complex.go → core/prop/complex.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package prop

import (
"encoding/binary"
"github.com/imulab/go-scim/pkg/core/errors"
"github.com/imulab/go-scim/pkg/core/spec"
"github.com/imulab/go-scim/core/errors"
"github.com/imulab/go-scim/core/spec"
"hash/fnv"
"strings"
)
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions pkg/core/prop/datetime.go → core/prop/datetime.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package prop

import (
"fmt"
"github.com/imulab/go-scim/pkg/core/errors"
"github.com/imulab/go-scim/pkg/core/spec"
"github.com/imulab/go-scim/core/errors"
"github.com/imulab/go-scim/core/spec"
"time"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/core/prop/decimal.go → core/prop/decimal.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package prop

import (
"fmt"
"github.com/imulab/go-scim/pkg/core/errors"
"github.com/imulab/go-scim/pkg/core/spec"
"github.com/imulab/go-scim/core/errors"
"github.com/imulab/go-scim/core/spec"
)

type decimalProperty struct {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion pkg/core/prop/factory.go → core/prop/factory.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package prop

import (
"github.com/imulab/go-scim/pkg/core/spec"
"github.com/imulab/go-scim/core/spec"
"strings"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/core/prop/integer.go → core/prop/integer.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package prop

import (
"fmt"
"github.com/imulab/go-scim/pkg/core/errors"
"github.com/imulab/go-scim/pkg/core/spec"
"github.com/imulab/go-scim/core/errors"
"github.com/imulab/go-scim/core/spec"
)

type integerProperty struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package prop

import (
"encoding/json"
"github.com/imulab/go-scim/pkg/core/spec"
"github.com/imulab/go-scim/core/spec"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"
"testing"
Expand Down
6 changes: 3 additions & 3 deletions pkg/core/prop/multi.go → core/prop/multi.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package prop

import (
"encoding/binary"
"github.com/imulab/go-scim/pkg/core/annotations"
"github.com/imulab/go-scim/pkg/core/errors"
"github.com/imulab/go-scim/pkg/core/spec"
"github.com/imulab/go-scim/core/annotations"
"github.com/imulab/go-scim/core/errors"
"github.com/imulab/go-scim/core/spec"
"hash/fnv"
)

Expand Down
Loading

0 comments on commit f4cd5f0

Please sign in to comment.