Skip to content

Commit 0a0cb8d

Browse files
committed
added more documentation and updated copyrights
1 parent cb99e7e commit 0a0cb8d

20 files changed

Lines changed: 112 additions & 27 deletions

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99
### Added
1010
- Upcoming changes...
1111

12+
## [1.0.0] - 2023-01-23
13+
### Added
14+
- Added GitHub action to build/unit test on push/pr
15+
- Added supporting README files
16+
17+
## [0.7.0] - 2023-01-22
18+
### Added
19+
- Added unit tests
20+
- Added integration tests
21+
- Added End-to-end container testing
22+
1223
## [0.5.0] - 2023-01-07
1324
### Added
1425
- Added attribution endpoint
@@ -30,3 +41,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3041
[0.0.1]: https://github.com/scanoss/wayuu2/compare/v0.0.0...v0.0.1
3142
[0.4.1]: https://github.com/scanoss/wayuu2/compare/v0.0.1...v0.4.1
3243
[0.5.0]: https://github.com/scanoss/wayuu2/compare/v0.4.1...v0.5.0
44+
[0.7.0]: https://github.com/scanoss/wayuu2/compare/v0.5.0...v0.7.0
45+
[1.0.0]: https://github.com/scanoss/wayuu2/compare/v0.7.0...v1.0.0

README.md

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -52,19 +52,7 @@ git tag v1.0.1
5252
```
5353

5454
### Deployment
55-
56-
The [scripts](scripts) folder contains an [env_setup.sh](scripts/env-setup.sh) script which attempts to do the following:
57-
* Set up the default folders
58-
* Set permissions
59-
* Set up service registration ([scanoss-go-api.service](scripts/scanoss-go-api.service))
60-
* Copy in binaries (if `scanoss-go-api` and/or `scanoss` exist in the folder)
61-
* Copy in preferred configuration (if `app-config-prod.json` exists in the folder)
62-
63-
A sample production configuration file can be found in [config/app-config-prod.json](config/app-config-prod.json).
64-
65-
Logs are written by default to `/var/log/scanoss/api/scanoss-api-prod.log`.
66-
67-
Configuration is written by default to: `/usr/local/etc/scanoss/api`.
55+
This [scripts](scripts) folder contains convenience utilities for deploying, configuring and running the SCANOSS GO API server. More details can be found [here](scripts/README.md).
6856

6957
### Running the Service
7058

@@ -103,7 +91,7 @@ To use a different config file, simply run the command manually using:
10391
go run cmd/server/main.go -json-config config/app-config-dev.json -debug
10492
```
10593

106-
Note, this will simulate the `scanoss` command (using [scanoss.sh](test-support/scanoss.sh)), so you might need to change this if you have the actual binary on your system.
94+
Note, this will simulate the `scanoss` binary (using [scanoss.sh](test-support/scanoss.sh)), so you might need to change this if you have the actual binary on your system.
10795

10896
### Unit Testing
10997
This project contains unit tests and can be invoked using:

cmd/server/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// SPDX-License-Identifier: GPL-2.0-or-later
22
/*
3-
* Copyright (C) 2018-2022 SCANOSS.COM
3+
* Copyright (C) 2018-2023 SCANOSS.COM
44
*
55
* This program is free software: you can redistribute it and/or modify
66
* it under the terms of the GNU General Public License as published by

config/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Sample SCANOSS Scanning GO API Configs
2+
This folder contains some examples of configuration for running the SCANOSS GO API.
3+
4+
There are two types of configuration:
5+
* Application Config
6+
* IP Filtering
7+
8+
## App Config
9+
There are two configs provided here:
10+
* Dev - [app-config-dev.json](app-config-dev.json)
11+
* Prod - [app-config-prod.json](app-config-prod.json)
12+
13+
A description of each field and its intended usage can be found in [server_config.go](../pkg/config/server_config.go).
14+
15+
## IP Filtering
16+
There are two types of IP filtering supports:
17+
* Allow List - [allow_list.txt](allow_list.txt)
18+
* Deny List - [deny_list.txt](deny_list.txt)
19+
20+
The implementation for this is based on [jpillora/ipfilter](https://github.com/jpillora/ipfilter).
21+
22+
Configuration for this is controlled via the `Filtering` block in the [config file](app-config-prod.json).
23+
24+
Currently, specific IP addresses and subnet masks are supported. Blocking by default can be controlled via `Filtering -> BlockByDefault` and Proxy support using `Filtering -> TrustProxy`.

config/allow_list.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
127.0.0.1
2+
#10.0.0.0/24

config/deny_list.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#10.0.0.0/24

get_version.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
###
33
# SPDX-License-Identifier: GPL-2.0-or-later
44
#
5-
# Copyright (C) 2018-2022 SCANOSS.COM
5+
# Copyright (C) 2018-2023 SCANOSS.COM
66
#
77
# This program is free software: you can redistribute it and/or modify
88
# it under the terms of the GNU General Public License as published by

pkg/cmd/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// SPDX-License-Identifier: GPL-2.0-or-later
22
/*
3-
* Copyright (C) 2018-2022 SCANOSS.COM
3+
* Copyright (C) 2018-2023 SCANOSS.COM
44
*
55
* This program is free software: you can redistribute it and/or modify
66
* it under the terms of the GNU General Public License as published by

pkg/config/server_config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// SPDX-License-Identifier: GPL-2.0-or-later
22
/*
3-
* Copyright (C) 2018-2022 SCANOSS.COM
3+
* Copyright (C) 2018-2023 SCANOSS.COM
44
*
55
* This program is free software: you can redistribute it and/or modify
66
* it under the terms of the GNU General Public License as published by

pkg/config/server_config_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// SPDX-License-Identifier: GPL-2.0-or-later
22
/*
3-
* Copyright (C) 2018-2022 SCANOSS.COM
3+
* Copyright (C) 2018-2023 SCANOSS.COM
44
*
55
* This program is free software: you can redistribute it and/or modify
66
* it under the terms of the GNU General Public License as published by

0 commit comments

Comments
 (0)