Commit Graph

477 Commits

Author SHA1 Message Date
Nicolas JUHEL
0f92caff5f Fix Package Duration & Add new Package for big duration (#203)
- Add: allowing parsing day in Duration package who's parsing value before a d letter
- Add: a sub package named big with another custom type Duration but this Duration is based of number of seconds instead of number of nanosecond to golib/Duration or time.Duration package. The result big Duration package allow to manage duration up to 106,751,991,167,300 d 15 h 30 m 7 s
- Add: into some BDD test with ginkgo framework
- Fix: marshaller function in package Duration 
- Fix: big Duration
- Refactor: optimize some code convertion
- Refactor: truncate function to not use float64 casting
2025-03-26 12:56:34 +01:00
Nicolas JUHEL
c1adb1e090 Package Duration:
- fix marshaller in yaml/toml
- optimize marchaller
- add sub package big to manage duration with big walue like 1000 days
- big duration have limit to seconds and to not keep any milliseconds, microseconds or nanoseconds
- big duraction have max value of 106,751,991,167,300 d 15 h 30 m 7 s
2025-03-26 12:18:19 +01:00
Nicolas JUHEL
b1a8a6dbe9 Package Duration:
- add self parsing to allow capabilities parsing days like '4d13h25m41s'
2025-03-25 11:06:18 +01:00
Nicolas JUHEL
a39ad5f911 Package HTTPClient/DNSMApper:
- fix boolean bug to initialize TLS Config when no tls config set in config
v1.17.6
2025-03-17 08:39:39 +01:00
Nicolas JUHEL
6e49a0bd4a Package Encoding:
- interface Coder: replace all return io.reader/io.writer to same io interface but with closer implementation
- interface Coder: add Reset function to free memory
- add sha256: add new sub package that implement coder interface to calculate checksum (no decode available)

Other:
- bump dependencies
v1.17.5
2025-03-14 14:57:58 +01:00
Nicolas JUHEL
3d9eee878f Package AWS:
- fix bug whos aws config checksum not loaded from config struct, using callback on config process
- bump to latest sdk release

Other:
- bump dependencies
v1.17.4
2025-03-13 16:47:17 +01:00
Nicolas JUHEL
99db544ce7 Bump dependencies 2025-03-07 14:19:21 +01:00
Nicolas JUHEL
be538d6cff Package Config/component:
- component HTTPCli: apply change into component
2025-03-07 14:16:37 +01:00
Nicolas JUHEL
fb3d5efd40 Bump dependencies 2025-03-07 09:45:32 +01:00
Nicolas JUHEL
90dd383441 Package AWS/Objects:
- add metadata function to walk objects / walk object version function, who's contain the len of result (objects, version, deletemarkers)
2025-03-07 09:41:01 +01:00
Nicolas JUHEL
a7978fce36 Package HTTPClient/DNSMapper:
- allow using a given TLS Config pointer
- allow to retrieve / update the default transport
2025-03-07 09:39:39 +01:00
Nicolas JUHEL
1528588499 Package errors:
- implement GOROOT/src/errors Is interface
- fix bug with GOROOT/src/errors UnWrap / Is
v1.17.3
2025-02-28 17:37:31 +01:00
Nicolas JUHEL
0c1f4675fb Package IOUtils/BufferReadCloser:
- refactor package to allow closer for bytes.Buffer, bufio.Reader, bufio.Writer, bufio.ReadWriter
- implement ReadFrom, WriterTo, StringWriter, ReadRune, ReadByte, WriteByte
- allow specify a custom close function, called in close statement
- add NewBuffer (New declare as deprecated), NewReader, NewWriter, NewReadWriter to each types bytes / bufio
- remove call of Reset in close for ReadWriter: ambigous function (ambigous in bufio struct)

Package Static:
- replace BufferReadCloser New function to NewBuffer

Other:
- bump dependencies
v1.17.2
2025-02-10 14:49:32 +01:00
Nicolas JUHEL
fe90c8e82c Package Errors: fix compatiblity with GOROOT errors packages + fix recursive HasCode function v1.17.1 2025-02-05 17:17:29 +01:00
Nicolas JUHEL
82d32d81b0 Package AWS:
- bump dependencies aws sdk go v2 with checksum calulation when supported by default
- add function in config interface to allow changing checksum calculation
- set checksum calculation as 'when required' with custom config
- set checksum calcultation as 'when supported' with aws config

Other:
- bump dependencies
v1.17.0
2025-01-28 16:42:02 +01:00
Nicolas JUHEL
61a73ba606 Package Certificates:
- fix bug with cert type marshall/unmarshall
- add old config to allow retro compatibility
- add new type function to retrieve a tls root ca cert instead of a slice of string to get root ca

Package HTTPCli:
- fix default DNS Mapper
- optimze global DNS Mapper
- fix non closing sub goroutine

Package HTTPCli/DNS-Mapper:
- change request function of Root CA with function of root ca cert instance
- add function to return a root ca cert from a function that return a slice of root ca string

Package Config/Components:
- httpcli: bump sub package of certificate, httpcli
- httpcli: adjust code following bump
- httpcli: change request function of Root CA with function of root ca cert instance
- httpcli: add function to return a root ca cert from a function that return a slice of root ca string
- tls: change request function of Root CA with function of root ca cert instance
- tls: add function to return a root ca cert from a function that return a slice of root ca string

Package IOUtils/mapCloser:
- fix bug with mapcloser not stopped
- optimize code & goroutine

Package Logger:
- rework mapCloser call
- optimize mapClaoser managment

Package Request:
- rework error managment
- using []byte instead of buffer to read response body
- add free capability
- optimize memory consumption

Package Socket / Server:
- add filtering error capability
- add params to specify a function called on each new connection and before using the connection
- the new function param allow to update the network incomming connection (like buffer, deadline...)
- rework some useless atomic to direct value to optimize code

Package Socket/Delim:
- rework to optimize memory & variable use
- remove capabilities of update the instance when running, prefert recreate new one if necessary

Other:
- bump dependencies
- minor bug / fix
2025-01-14 15:01:54 +01:00
Nicolas JUHEL
22b364593e Package certificates:
- rework package to allow convert config to model and retrive config from model
- add sub package to manage cipher, curves, auth client, tls version, certificates, root ca...
- add some small test (can be expande to having more coverage)
- optimize some code

Package httpcli:
- update code following change in certificates

Package httpserver:
- update code following change in certificates

Package Config/Components:
- update code following change in certificates

Package FTPClient:
- update code following change in certificates

Package Nats:
- update code following change in certificates
2024-12-04 17:30:22 +01:00
Nicolas JUHEL
eca6890e32 Package Archive: add Helper & Compress DetectOnly (#199)
Package archive/helper
- adding package to compress/uncompress with reader or writer
- refactor to allowing to use same source of io as result: io.reader or
io.writer
- optimize code & buf to limit mem use
- rework variable to be thread safe

Package archive/compress
- add function DetectOnly to detect algo and return an updated reader
but not the decompressor reader
- update function Detect to use DetectOnly to limit duplication code

Other
- bump dependencies


## Type of Change
Please select the type of change your PR introduces by checking the
appropriate box:
- [ ] Fixes an issue
- [X] Adds a new feature
- [X] Refactor
- [ ] Documentation update
- [ ] Other (please describe it in the Description Section)
2024-11-27 17:44:41 +01:00
Salim Amine Bou Aram
cd083bb53f Package archive/helper
- adding package to compress/uncompress with reader or writer
- refactor to allowing to use same source of io as result: io.reader or io.writer
- optimize code & buf to limit mem use
- rework variable to be thread safe

Package archive/compress
- add function DetectOnly to detect algo and return an updated reader but not the decompressor reader
- update function Detect to use DetectOnly to limit duplication code

Other
- bump dependencies
2024-11-27 17:23:14 +01:00
Nicolas JUHEL
cb8afe8b62 Package Ldap - Add features to filter multiple group entries (#195)
Package Ldap :
- Add features to filter multiple group entries
2024-11-19 09:20:06 +01:00
Nicolas JUHEL
42573c7ebd Update SECURITY.md
Signed-off-by: Nicolas JUHEL <githubatcom@nabbar.com>
2024-11-19 08:35:54 +01:00
nabbar
3cad34d6c9 Package Ldap:
- Add function to filter multiple LDAP group entries attributes based on user
2024-11-19 08:21:49 +01:00
Nicolas JUHEL
8451eae3be tls version type, fix missing char 2024-10-31 12:04:54 +01:00
Nicolas JUHEL
dafe59079d Package Certificates:
- Add sub package tlsversion: manage tls version to stringer / crypto tls constant, with marshaller & unmarshaller
2024-10-24 16:42:57 +02:00
Nicolas JUHEL
5e6e2949ee golib-issue-templates (#189)
ISSUE templates => bug or new feature
2024-10-17 12:40:06 +02:00
Salim Amine Bou Aram
d8f1369e5c golib-issue-templates 2024-10-11 15:25:09 +02:00
Nicolas JUHEL
8c8b001d0f adding a PR template to golib (#187)
Adding the PR template to golib
2024-10-11 14:37:58 +02:00
Nicolas JUHEL
0d730e542b golib retro sub pkg (#186)
Package retro
This package is a golib Golang sub-package designed to support backward-compatible models through semantic versioning. 
It introduces a new struct field tag, retro, which manages the serialization and deserialization of model fields based on specified versions.
This package works with json, yaml, and toml formats and dynamically marshals or unmarshals model data according to the version in use.
2024-10-11 14:37:21 +02:00
Salim Amine Bou Aram
939d665288 adding a PR template to golib 2024-10-11 13:43:19 +02:00
Salim Amine Bou Aram
7a3c521144 golib retro sub pkg 2024-10-11 13:12:57 +02:00
Nicolas JUHEL
8746c37784 Package aws/pusher:
- fix defer called before triggered
- fix info called without data when loaded source is closed
2024-10-08 12:09:33 +02:00
Nicolas JUHEL
24dd03ae05 Package Duration:
- RangeFrom / RangeTo: truncate second to not save lower than second in resulted range
2024-10-08 12:08:06 +02:00
Nicolas JUHEL
57a08a8ec5 Package Duration:
- fix range time (min & max was not included in range)
2024-10-07 16:56:12 +02:00
nabbar
4ad73c4833 bump go for github action 2024-10-06 18:46:32 +02:00
nabbar
3235cc0909 Package Cluster / nutsdb:
- removing package cluster & nutsdb (+ test) in waiting stabilisation of
  dependencies
- adding olld source code in tarball file

Dependencies golang/x/exp:
- removing experiment dependency when using slices to root/slices
  package

Bump dependencies (some dependences still use exp who's need go1.22)
2024-10-06 18:28:59 +02:00
Nicolas JUHEL
3c6318b33a Package PID Controller:
- add package to calculate range of value for Progressive Integrate Derivative

Package Duration:
- add function to parse float64 to Duration
- add function to return a PID Duration range from another given duration
- add function to return a PID Duration range to another given duration
2024-10-04 16:08:22 +02:00
Nicolas JUHEL
6213eeb560 Package AWS:
- fix anonymousCredential with retrieve following bump of aws sdk

Package Logger:
- add check on io interface to prevent closing instance and allowing gracefull closing

Other:
- bump dependencies
2024-10-02 15:07:59 +02:00
Nicolas JUHEL
102d16391e Package Socket:
- client: fix TLS config for client
v1.16.2
2024-09-06 15:01:26 +02:00
Nicolas JUHEL
556cb36c64 Bump dependencies v1.16.1 2024-09-04 11:51:53 +02:00
Nicolas JUHEL
a535f637f4 Package Logger
- add missing options in default json
2024-09-04 10:35:18 +02:00
Nicolas JUHEL
9cd0ad0777 Package HTTPServer
- replace time.duration / os.FileMode type by golib package duration & file perms to allow parsing string in json

Package Logger
- replace time.duration / os.FileMode type by golib package duration & file perms to allow parsing string in json
- fix json bug in default options

Package Monitor
- replace time.duration / os.FileMode type by golib package duration & file perms to allow parsing string in json
2024-09-04 09:55:17 +02:00
Nicolas JUHEL
a5845082c9 Package atomic:
- new package to simplify usage of atomic.Value & sync map by using generic struct/interface with cast
 - add generic function to cast model
v1.16.0
2024-08-14 12:33:50 +02:00
Nicolas JUHEL
a231261029 Package Duration:
- fix bug with 0s duration
2024-08-14 08:45:23 +02:00
nabbar
07a63f9636 Package aws:
- add new sub package pusher: pusher is an helper who's allow to push
  single put object or multipart upload and implement io.writer &
  io.readFrom interface

Other:
- bump dependencies
2024-08-11 15:07:00 +02:00
Nicolas JUHEL
b23addbfad Package Request:
- fix bug with retryer and io reader body (body was not resend on retryed request)
- remove mutex and use atomic on potential race field
- simplify & optimize some code
v1.15.4
2024-06-14 11:50:36 +02:00
Nicolas JUHEL
2d70f142e6 Package Duration:
- fix days: using ceil instead of floor
- add tuncate function for micro, milli, seconds, minutes, hours and days

Other:
- bump dependencies
v1.15.3
2024-06-11 10:26:58 +02:00
Nicolas JUHEL
39df39938e Package AWS:
- fix double import with different tag for validator in config model
- applys MR about fix on bucket validator to config AWS model
v1.15.2
2024-05-30 16:34:02 +02:00
Valentin Morel
88421f1aac Package AWS : Validator tag for s3 bucket (#184)
Package AWS:
- fix validator tag for s3 bucket: use custom function instead of hostname
2024-05-30 16:23:39 +02:00
Nicolas JUHEL
dbeb385267 Package Encoding/RandReader:
- optimize code
- remplace some pointer by atomic to prevent RACE

Other:
- bump dependencies
2024-05-29 16:39:59 +02:00
Nicolas JUHEL
1ed0b00db2 Package Semaphore: Fix issue #182 2024-05-28 16:00:33 +02:00