527 Commits

Author SHA1 Message Date
nabbar
eb8097fad8 Fix local path operations by using a wrong package (diff between package path and path/filepath)
Bump dependencies
2022-11-15 14:37:49 +01:00
Nicolas JUHEL
c0046ae953 Merge pull request #146 from nabbar/fix_windows
Fix Windows Bug

Package IOUtils :
 - windows : cannot set the max open file number over the windows hard limit (8192)

Package Request :
 - windows : add path function fix to not using the os.DirSeparator for url path

Other :
 - Bump dependencies
v1.9.16
2022-11-15 08:57:57 +01:00
nabbar
fd8ecc0eef Package IOUtils :
- windows : cannot set the max open file number over the windows hard limit (8192)

Package Request :
 - windows : add path function fix to not using the os.DirSeparator for url path

Other :
 - Bump dependencies
2022-11-14 16:44:49 +01:00
Nicolas JUHEL
9b80624faa Merge pull request #145 from nabbar/fix_2022-11-10
Minors Fix & Enhancements

Package Status :
- optimize output writer block for Get function
- add query string params online to print all result as one line plain text format

Package logger :
- refactor closer function to specific interface
- refactor syslog linux to log message by severity instead of same severity for all message

Other :
- Bump dependencies
v1.9.15
2022-11-10 16:02:29 +01:00
nabbar
3402a00f21 Package Status :
- optimize output writer block for Get function
- add query string params online to print all result as one line plain text format

Package logger :
- refactor closer function to specific interface
- refactor syslog linux to log message by severity instead of same severity for all message

Other :
- Bump dependencies
2022-11-10 15:11:23 +01:00
Nicolas JUHEL
284521c769 Merge pull request #143 from nabbar/fix_221103
Package Logger :
- Fix too many open file for logger file
- Fix invalid FD for log file
- Fix bug with field into entry
- Fix race detection on testing

Package Status :
- Add capability to send short into query to received a short output without any result of component
- Add Connection Header as Close to router status return of Get
- Fix race detection into health with concurrent read/write data
- Fix race detection with update of main router

Package HTTPServer :
- Add option to disable keepalive for server
- Fix config tag error
- Fix logger usage / close

Package Config :
- Fix component using logger to implement a close
- Fix logger initialization :
  - use local var to setup new logger based on logger clone if loger still existing
  - if error while configuring new logger, do not change logger
  - closing old logger before replace it with new

Package Router :
- Fix missing ignore error return
- Fix golib logger not closed

Other :
- Bump dependencies
v1.9.14
2022-11-07 18:18:05 +01:00
Nicolas JUHEL
39948566e3 Package Logger :
- Fix too many open file for logger file
- Fix invalid FD for log file
- Fix bug with field into entry
- Fix race detection on testing

Package Status :
- Add capability to send short into query to received a short output without any result of component
- Add Connection Header as Close to router status return of Get
- Fix race detection into health with concurrent read/write data
- Fix race detection with update of main router

Package HTTPServer :
- Add option to disable keepalive for server
- Fix config tag error
- Fix logger usage / close

Package Config :
- Fix component using logger to implement a close
- Fix logger initialization :
  - use local var to setup new logger based on logger clone if loger still existing
  - if error while configuring new logger, do not change logger
  - closing old logger before replace it with new

Package Router :
- Fix missing ignore error return
- Fix golib logger not closed

Other :
- Bump dependencies
2022-11-07 17:47:29 +01:00
Nicolas JUHEL
6ff86118fe Package Config: fix bug with delete component list key v1.9.13 2022-11-02 14:52:44 +01:00
Nicolas JUHEL
95ddbdf65b bump dependencies and fix some evol following 2022-11-02 11:39:02 +01:00
Nicolas JUHEL
5187e7eae2 Package AWS :
- User : Add/update policy managment (list, walk, attach, detach)
- Group : Add/update policy managment (list, walk, attach, detach)
- Role : Add/update policy managment (list, walk, attach, detach)
- Policy : add capability to not list default verison policy
v1.9.12
2022-10-28 15:16:53 +02:00
Nicolas JUHEL
cdc829a8e7 Merge pull request #142 from nabbar/pkg_archive
Package Archive:
- Security : clean destination pathfile before use it (prevent down under current output path)
- Fix : do not update link / symlink if the source / destination are same
- Fix : do not create link / symlink for windows OS (need a shortcut process by ole call)

Other
- Bump dependencies
- Fix #128 
- Fix #129 
- Fix #130 
- Fix #131
2022-10-28 13:09:03 +02:00
Nicolas JUHEL
da68aa472c Package Archive:
- Security : clean destination pathfile before use it (prevent down under current output path)
- Fix : do not update link / symlink if the source / destination are same
- Fix : do not create link / symlink for windows OS (need a shortcut process by ole call)

Issue Fix:
- Fix #128
- Fix #129
- Fix #130
- Fix #131
2022-10-28 12:46:52 +02:00
Nicolas JUHEL
db6fd4ff1c Package IOUtils :
- Fix bug : apply file permission on directory

Package errors :
- Add function dedicated to recorved : add at least 5 frame trace into message
- Add function to retrieve at least 5 frame not in golib, vendor and runtime root package
- Fix error in frame extraction

Package Logger :
- Add mutex to fix race error
- Fix missing origin error while return error for open/create file
- Clean useless commented code

Package Router :
- Skip gin context abort if context still aborted
- refactory recovery error to liberr.NewErrorRecovered to include enought trace
v1.9.11
2022-10-27 16:55:31 +02:00
Nicolas JUHEL
dfd1aca57e Package Error :
- Add function to create new Error with runtine Frame information (used for trace)
- Add a private slice of error in DefaultReturn model to add them Gin Error and retrurn them into log / stdout
Bump dependencies
- Fix CVE-2022-32149
v1.9.10
2022-10-26 14:38:19 +02:00
Nicolas JUHEL
7139797df2 Package AWS :
- Fix bug while check key len : min size was 3, AWS reference API S3 say min len is 1
Update :
- Bump dependencies
v1.9.9
2022-10-25 15:31:31 +02:00
Nicolas JUHEL
667220a886 Merge pull request #141 from nabbar/log_api_router
Package Log & Prometheus with Package Router

    Package Logger :
        Add function to log minimalist information and access log (latency, size remote info, ...)
        Add option to transform (exclusif) logger as access logger
        fix errors & optimize
    
    Package Router :
        Update methode to start gin engine with access / error logger from package logger
        fix error into middleware logger
        use specif middleware for starttime and request path
        optimize
    
    Package ioutils :
        fix tools : missing control path still existing to prevent truncate destination file
        fix tools : ignore chmod error (not mandatory if file can be create/append)
    
    Package Prometheus :
        use generic starttime into context if available
    
    Bump Dependencies
v1.9.8
2022-10-20 12:10:47 +02:00
Nicolas JUHEL
c9db0074bc Package Logger :
Add function to log minimalist information and access log (latency, size remote info, ...)
    Add option to transform (exclusif) logger as access logger
    fix errors & optimize

Package Router :
    Update methode to start gin engine with access / error logger from package logger
    fix error into middleware logger
    use specif middleware for starttime and request path
    optimize

Package ioutils :
    fix tools : missing control path still existing to prevent truncate destination file
    fix tools : ignore chmod error (not mandatory if file can be create/append)

Package Prometheus :
    use generic starttime into context if available

Bump Dependencies
2022-10-20 11:52:58 +02:00
Nicolas JUHEL
609eaa68e1 bump dependencies v1.9.7 2022-09-27 14:51:36 +02:00
Nicolas JUHEL
917819b8b7 Fix error code collision:
- Package Config
- Package Archive
v1.9.6
2022-09-14 13:01:37 +02:00
Nicolas JUHEL
3dc1cbe9ff Merge pull request #140 from nabbar/upd-22-09-13
PKG Status - Config + PKG Config - Component
v1.9.5
2022-09-13 12:54:38 +02:00
Nicolas JUHEL
573af6ce3a Package AWS :
- Config Model : add a config model with a golib RouerStatus Config Model to use a AWS connection for API with a request status health check
  - Config Interface : add function GetAccessKey to retrieve the accesskey value currently used into the current connection
  - function Walk (Object, version, ...) : fix bug with pointer of string not initialized

Package Config :
  - interface Component : add status router pointer into the Init function to allow used a global router status for all component status registration as router status component

Package Status :
  - move Status Config as an sub package of Package Status

Package Errors :
  - add CamelCase const

Package Logger :
  - fix following bump dependencies

Global :
  - bump dependencies
  - change init of errors files : change function never call vy panic to prevent an error code collision
2022-09-13 12:31:04 +02:00
Nicolas JUHEL
55aa0c3637 Package AWS:
- Bucket : add function Walk based on list but run a given function for each found bucket
- Object : add function Walk & WalkPrefix based on ListPrefix to run a given function for each returned object
- Object : add function WalkVersion & WalkVersionPrefix based on ListVersion to run a given function for each returned object version
Package logger:
- Fix bug with compat : a nil error not clean when sent to logger
Package Context:
- Fix bug with context/config : the load key return an atomic value instead of the interface stored
2022-08-10 11:11:34 +02:00
Nicolas JUHEL
e28c21b26c Package Semaphore :
+ Add interface SemBar to expose same interface between ProgressBar & Semaphore
  + Add empty function for compatibility with SemBar
Package Progress :
  + Refactor sem function to depend of Sem interface
  + Replace interface function into interface and use Sem & SemBar interface as dependencies
Update following test
v1.9.4
2022-08-03 13:09:23 +02:00
Nicolas JUHEL
f0a5a894f2 Pakcage AWS :
+ Add Tag function for object
  + Add Lock function for object
  + Add Attributes function for object
  + Add lifecycle function for bucket
  + Add function to get client in AWS interface
Package Certificates :
  + Add clean certifs function in config
Bump dependencies
2022-08-03 12:13:15 +02:00
Nicolas JUHEL
90ceb19d2f - Chg :
- Package AWS : extend aws helper to manage accessKey
	- Package Cobra : refactor configure function to allow use independant part of the command
	- Package ldap : fix error
	- Package config
		- interface : add shutdown method
		- components:
			- request : syntax error in default json
			- mail : syntax error default json
			- ldap :
				- allow to access loaded config
				- mutex lock circular
			- tls : allow to access loaded config
	- Package request :
		- add error managment
		- fix error with circular mutex
		- fix bug with empty response body
		- fix some other errors
	- Package status : default label in component default config
	- Bump dependancies
	- Bump yaml to v3 (in waiting fix for CVE-2022-28948)
	- force dependancies gogo/protobuff to v1.3.2+
v1.9.3
2022-07-25 16:00:36 +02:00
Nicolas JUHEL
01308cc8f2 Optimize errors for package aws & logger
Bump dependancies
v1.9.2
2022-04-28 16:19:55 +02:00
Nicolas JUHEL
48b47ec97e Package AWS :
- fix missing commit : version function
- fix missing commut : deleteall function
- add function to load bucket replication configuration
- add AWS feature to create new client for a config based on current client
- add Config feature to change the credentials of current config
2022-04-22 14:37:59 +02:00
Nicolas JUHEL
017c24f2df - Package AWS : fix missing field for clone function
- Bump dependancies
v1.9.1
2022-04-21 15:51:08 +02:00
Nicolas JUHEL
9f3cc9f045 Bump dependancies v1.9.0 2022-04-20 14:51:17 +02:00
Nicolas JUHEL
529ec00a94 Merge pull request #138 from nabbar/fix_security_alert_2
fix security alert #2 - sub dependancies github.com/gogo/protobuf@<1.3.2' (CVE-2021-3121)
    + update use 'go get github.com/gogo/protobuf@v1.3.2' and 'go get -u ./...'
    + update go get -u github.com/lni/dragonboat/v3@master => force sub dependancies update
2022-04-20 14:44:03 +02:00
Nicolas JUHEL
051c0bf420 fix security alert #2 - sub dependancies github.com/gogo/protobuf@<1.3.2' (CVE-2021-3121)
+ update use 'go get github.com/gogo/protobuf@v1.3.2' and 'go get -u ./...'
+ update go get -u github.com/lni/dragonboat/v3@master => force sub dependancies update
2022-04-20 14:02:24 +02:00
Nicolas JUHEL
70d88049b4 Merge pull request #137 from nabbar/package_aws_fix
Fix & Enhancement to Package AWS

Package AWS :
- Fix issue #136 
  - add function ForceSignerOptions to pass options funct to signer
  - if not option exist, use default signer v4, else specify the options function list to the new signer
- fix error with multiple ptr identifier on model
- add function to list and cancel multipart uploads
- add function to list, get and delete version object
- add function to delete all objects following the S3 API DeleteObjects function (to send array of object key / version) in one request

Package Config :
- modify component interface :
  - add cpt as custom function parameters to prevent new component still not stored when running custom function
  - re-order mutex on start / reload process

Change :
- Bump dependancies
2022-04-20 12:38:06 +02:00
Nicolas JUHEL
f073bca2d3 Package AWS :
- Fix issue #136 :
  - add function ForceSignerOptions to pass options funct to signer
  - if not option exist, use default signer v4, else specify the options function list to the new signer
- fix error with multiple ptr identifier on model
- add function to list and cancel multipart uploads
- add function to list, get and delete version object
- add function to delete all objects following the S3 API DeleteObjects function (to send array of object key / version) in one request

Package Config :
- modify component interface :
    - add cpt as custom function parameters to prevent new component still not stored when running custom function
    - re-order mutex on start / reload process

Change :
- Bump dependancies
2022-04-20 12:21:26 +02:00
Nicolas JUHEL
7db933b96e Merge pull request #135 from nabbar/pkg_request_features
Package Request :
- Add features to integer package Status
- Add features to allow overwrite the default status info func
- Change context params as internal function context given
- Add new param to set the func context
- Add func to set function context

Package config :
- Add component to package request
- Add LDAP component for LDAP package
- Fix the min value for ErrorCode in Head component

Major Change :
- Bump go release to go 1.18
- Bump dependancies
- Use env var GOAMD64=v4 for GOARCH=amd64

>> 💡 TODO for next work: 
- Simplify many tools function with generic function introduced into go 1.18
- Refactor LDAP package to bump struct as all new package with status package features, context, ...
2022-04-14 13:57:12 +02:00
Nicolas JUHEL
2435b773de Package Request :
- Add features to integer package Status
- Add features to allow overwrite the default status info func
- Change context params as internal function context given
- Add new param to set the func context
- Add func to set function context

Package config :
- Fix the min value for ErrorCode in Head component
- Add LDAP component for LDAP package
- Add Request component to Request package

Change / Fix :
- Bump Go to release 1.18
- Bump dependancies

TODO (in next work) :
- implement generic function (go 1.18) to simplify and reduce redondant code
- refactor package LDAP to be more compliant with other package structure
2022-04-07 04:04:41 +02:00
Nicolas JUHEL
b1f5e42db7 Package HttpCli :
- slipt package between pure httpcli and request to become new package Request
- Add options to httpcli allowed to create an http client based on options

Package AWS :
- add option for delete object : check boolean to make or not the check (head) before delete
- add exclusion of NoSuchKey error if check is false

Package Request :
- integer option capabilities to configure the request inteface
- use httpcli option to get httpcli (keep custom function to get an *http.client)
- extend function to mode manage the request
2022-04-01 13:33:21 +02:00
Nicolas JUHEL
eb0c034074 Merge pull request #134 from nabbar/PKG_HTTP_CLI
Refactor Package HTTPCli:
- Reword Const (timeout + errors)
- Remove old request interface
- Add new request interface to make a request, send it, parse a result model and check response status
- Add function to skip DNS resolution for http client connection

Change
- Bump dependancies
2022-03-31 13:32:28 +02:00
Nicolas JUHEL
6645bcc05e Refactor Package HTTPCli:
- Reword Const (timeout + errors)
- Remove old request interface
- Add new request interface to make a request, send it, parse a result model and check response status
- Add function to skip DNS resolution for http client connection

Change
- Bump dependancies
2022-03-31 13:11:00 +02:00
Nicolas JUHEL
b80f6e7eb0 Fix issue #133 v1.8.11 2022-03-29 08:45:56 +02:00
Nicolas JUHEL
3a4960c304 Bump dependancies 2022-03-29 08:39:03 +02:00
Nicolas JUHEL
312ce42dc3 Fix issue #132 2022-03-29 08:36:19 +02:00
Nicolas JUHEL
beecd4a006 Merge pull request #123 from nabbar/pkg_database
Add packages :
- package databse : use gorm lib to  implement this helpers
- package fpt client : expose a helper to post / read file from ftp server

Add component into package Config :
- refactor component interface : simplify + add flag register process
- add AWS custom / standard
- add database
- add Nats cluster
- add NutsDB cluster
- add smtp client
- fix some errors into tls, http component

Fix / Update :
- bump dependancies
- adapt some fix into aws config, smtp, http server, nats, nutsdb, status packages
- add gorm logger into logger pacakge
- fix issue #125 
- fix issue #126 
- fix issue #127
v1.8.10
2022-03-16 15:09:51 +01:00
Nicolas JUHEL
425962f8c0 Add packages :
- package databse : use gorm lib to  implement this helpers
- package fpt client : expose a helper to post / read file from ftp server

Add component into package Config :
- add AWS custom / standard
- add database
- add Nats cluster
- add NutsDB cluster
- add smtp client
- fix some errors into tls, http component

Fix / Update :
- bump dependancies
- adapt some fix into aws config, smtp, http server, nats, nutsdb, status packages
- add gorm logger into logger pacakge
- fix issue #125
- fix issue #126
- fix issue #127
2022-03-16 15:08:33 +01:00
Nicolas JUHEL
0da13f4394 Merge pull request #124 from nabbar/dependabot/go_modules/github.com/nats-io/nats-server/v2-2.7.4
Bump github.com/nats-io/nats-server/v2 from 2.7.3 to 2.7.4
2022-03-15 07:40:51 +01:00
dependabot[bot]
66dcf9e6da Bump github.com/nats-io/nats-server/v2 from 2.7.3 to 2.7.4
Bumps [github.com/nats-io/nats-server/v2](https://github.com/nats-io/nats-server) from 2.7.3 to 2.7.4.
- [Release notes](https://github.com/nats-io/nats-server/releases)
- [Changelog](https://github.com/nats-io/nats-server/blob/main/.goreleaser.yml)
- [Commits](https://github.com/nats-io/nats-server/compare/v2.7.3...v2.7.4)

---
updated-dependencies:
- dependency-name: github.com/nats-io/nats-server/v2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-11 23:24:19 +00:00
Nicolas JUHEL
02f694418a Pkg Config - HTTP : fix bug with dependencies keys v1.8.9 2022-02-25 12:23:34 +01:00
Nicolas JUHEL
c4c7800d80 Pkg Config - TLS : fix bug with loading config 2022-02-25 12:23:08 +01:00
Nicolas JUHEL
71000e6374 Bump dependancies v1.8.8 2022-02-25 11:12:13 +01:00
Nicolas JUHEL
726e003fc7 PKG Config : add retry for dependancies + tempo 2022-02-25 11:08:17 +01:00
Nicolas JUHEL
b5f18c0974 Add package prometheus 2022-02-25 11:07:30 +01:00