-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from keaz/streaming-search-that-returns-a-stream
Refactor streaming_search_inner to return a Stream object
- Loading branch information
Showing
7 changed files
with
589 additions
and
205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: CI for Rust LDAP Client | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
- '!main' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
services: | ||
ldap: | ||
image: openidentityplatform/opendj | ||
ports: | ||
- 1389:1389 | ||
options: > | ||
--env ROOT_USER_DN="cn=manager" | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Get LDAP container ID | ||
id: ldap_container_id | ||
run: echo "LDAP_CONTAINER_ID=$(docker ps --filter 'ancestor=openidentityplatform/opendj:latest' -q)" >> $GITHUB_ENV | ||
|
||
- name: Copy LDIF to LDAP container | ||
run: docker cp ./data/data.ldif ${{ env.LDAP_CONTAINER_ID }}:/tmp/data.ldif | ||
|
||
- name: Import LDIF into OpenDJ | ||
run: | | ||
docker exec ${{ job.services.ldap.id }} \ | ||
/opt/opendj/bin/ldapmodify -h localhost -p 1389 -D "cn=manager" -w password -a -f /tmp/data.ldif | ||
# Step 3: Install Rust | ||
- name: Set up Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
profile: minimal | ||
|
||
# Step 4: Build the Rust project | ||
- name: Build | ||
run: cargo build --verbose | ||
|
||
# Step 5: Run unit tests | ||
- name: Run tests | ||
run: cargo test --verbose | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Publish to crates.io | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
services: | ||
ldap: | ||
image: openidentityplatform/opendj | ||
ports: | ||
- 1389:1389 | ||
options: > | ||
--env ROOT_USER_DN="cn=manager" | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Get LDAP container ID | ||
id: ldap_container_id | ||
run: echo "LDAP_CONTAINER_ID=$(docker ps --filter 'ancestor=openidentityplatform/opendj:latest' -q)" >> $GITHUB_ENV | ||
|
||
- name: Copy LDIF to LDAP container | ||
run: docker cp ./data/data.ldif ${{ env.LDAP_CONTAINER_ID }}:/tmp/data.ldif | ||
|
||
- name: Import LDIF into OpenDJ | ||
run: | | ||
docker exec ${{ job.services.ldap.id }} \ | ||
/opt/opendj/bin/ldapmodify -h localhost -p 1389 -D "cn=manager" -w password -a -f /tmp/data.ldif | ||
# Step 3: Install Rust | ||
- name: Set up Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
profile: minimal | ||
|
||
# Step 4: Build the Rust project | ||
- name: Build | ||
run: cargo build --verbose | ||
|
||
# Step 5: Run unit tests | ||
- name: Run tests | ||
run: cargo test --verbose | ||
|
||
- name: Deploy to crates.io | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
run: cargo publish | ||
env: | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_TOKEN }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,84 +1,83 @@ | ||
version: 1 | ||
|
||
dn: dc=example,dc=com | ||
objectClass: domain | ||
objectClass: top | ||
dc: example | ||
|
||
dn: ou=people,dc=example,dc=com | ||
objectClass: organizationalUnit | ||
objectClass: top | ||
objectClass: organizationalUnit | ||
ou: people | ||
description: Users | ||
|
||
|
||
dn: uid=f92f4cb2-e821-44a4-bb13-b8ebadf4ecc5,ou=people,dc=example,dc=com | ||
objectClass: top | ||
objectClass: inetorgperson | ||
objectClass: organizationalPerson | ||
objectClass: person | ||
objectClass: top | ||
cn: Sam | ||
sn: Smith | ||
cn: Sam | ||
ou: people | ||
uid: f92f4cb2-e821-44a4-bb13-b8ebadf4ecc5 | ||
|
||
dn: uid=42b05942-4f18-4279-827d-36534da1e437,ou=people,dc=example,dc=com | ||
objectClass: inetorgperson | ||
objectClass: organizationalPerson | ||
objectClass: person | ||
objectClass: top | ||
cn: James | ||
sn: Gunn | ||
ou: people | ||
uid: 42b05942-4f18-4279-827d-36534da1e437 | ||
|
||
dn: uid=0dbaece8-f5f8-4e85-97d8-8bd614304bef,ou=people,dc=example,dc=com | ||
objectClass: inetorgperson | ||
objectClass: organizationalPerson | ||
objectClass: person | ||
objectClass: top | ||
cn: James | ||
sn: Gunn | ||
cn: James | ||
ou: people | ||
uid: 0dbaece8-f5f8-4e85-97d8-8bd614304bef | ||
uid: 42b05942-4f18-4279-827d-36534da1e437 | ||
|
||
dn: uid=0xbaece8-f5f8-4e85-97d8-8bd614304bef,ou=people,dc=example,dc=com | ||
objectClass: top | ||
objectClass: inetorgperson | ||
objectClass: organizationalPerson | ||
objectClass: person | ||
objectClass: top | ||
cn: James | ||
sn: Gunn | ||
cn: James | ||
ou: people | ||
uid: 0xbaece8-f5f8-4e85-97d8-8bd614304bef | ||
|
||
dn: uid=e219fbc0-6df5-4bc3-a6ee-986843bb157e,ou=people,dc=example,dc=com | ||
objectClass: top | ||
objectClass: inetorgperson | ||
objectClass: organizationalPerson | ||
objectClass: person | ||
objectClass: top | ||
cn: Jhone | ||
sn: Eliet | ||
cn: Jhone | ||
ou: people | ||
uid: e219fbc0-6df5-4bc3-a6ee-986843bb157e | ||
|
||
dn: uid=cb4bc91e-21d8-4bcc-bf6a-317b84c2e58b,ou=people,dc=example,dc=com | ||
objectClass: top | ||
objectClass: inetorgperson | ||
objectClass: organizationalPerson | ||
objectClass: person | ||
objectClass: top | ||
cn: David | ||
sn: Hanks | ||
cn: David | ||
ou: people | ||
uid: cb4bc91e-21d8-4bcc-bf6a-317b84c2e58b | ||
|
||
dn: uid=4d9b08fe-9a14-4df0-9831-ea9992837f0d,ou=people,dc=example,dc=com | ||
objectClass: top | ||
objectClass: inetorgperson | ||
objectClass: organizationalPerson | ||
objectClass: person | ||
objectClass: top | ||
cn: David | ||
sn: Hanks | ||
cn: David | ||
ou: people | ||
uid: 4d9b08fe-9a14-4df0-9831-ea9992837f0d | ||
|
||
dn: ou=group,dc=example,dc=com | ||
objectClass: top | ||
objectClass: organizationalUnit | ||
ou: group | ||
description: Groups | ||
|
||
dn: cn=grp1,ou=group,dc=example,dc=com | ||
objectClass: top | ||
objectClass: groupOfNames | ||
cn: grp1 | ||
member: uid=e219fbc0-6df5-4bc3-a6ee-986843bb157e,ou=people,dc=example,dc=com | ||
|
||
dn: cn=grp2,ou=group,dc=example,dc=com | ||
objectClass: top | ||
objectClass: groupOfNames | ||
cn: grp2 | ||
member: uid=e219fbc0-6df5-4bc3-a6ee-986843bb157e,ou=people,dc=example,dc=com |
Oops, something went wrong.