add dukcapil

This commit is contained in:
Aditya Siregar
2026-05-07 04:01:32 +07:00
parent 9a975d146e
commit bc64eb20ea
235 changed files with 1197 additions and 28187 deletions
+6 -24
View File
@@ -24,14 +24,12 @@ var (
)
type Config struct {
Server Server `mapstructure:"server"`
Database Database `mapstructure:"postgresql"`
Jwt Jwt `mapstructure:"jwt"`
Log Log `mapstructure:"log"`
S3Config S3Config `mapstructure:"s3"`
OnlyOffice OnlyOffice `mapstructure:"onlyoffice"`
Novu Novu `mapstructure:"novu"`
Department Department `mapstructure:"department"`
Server Server `mapstructure:"server"`
Database Database `mapstructure:"postgresql"`
Jwt Jwt `mapstructure:"jwt"`
Log Log `mapstructure:"log"`
S3Config S3Config `mapstructure:"s3"`
Dukcapil Dukcapil `mapstructure:"dukcapil"`
}
var (
@@ -83,19 +81,3 @@ func (c *Config) LogFormat() string {
return c.Log.LogFormat
}
type OnlyOffice struct {
URL string `mapstructure:"url"`
Token string `mapstructure:"token"`
}
type Novu struct {
APIKey string `mapstructure:"api_key"`
ApplicationID string `mapstructure:"application_id"`
BaseURL string `mapstructure:"base_url"`
IncomingLetterWorkflowID string `mapstructure:"incoming_letter_workflow_id"`
}
type Department struct {
ParentPath string `mapstructure:"parent_path"`
ExcludedPaths []string `mapstructure:"excluded_paths"`
}
+22
View File
@@ -0,0 +1,22 @@
package config
import "time"
// Dukcapil holds configuration for the Dukcapil Face Recognition (1:N) API.
type Dukcapil struct {
BaseURL string `mapstructure:"base_url"`
CustomerID string `mapstructure:"customer_id"`
Methode string `mapstructure:"methode"`
UserID string `mapstructure:"user_id"`
Password string `mapstructure:"password"`
PublicKeyPath string `mapstructure:"public_key_path"`
DefaultIP string `mapstructure:"default_ip"`
TimeoutSecond int `mapstructure:"timeout_second"`
}
func (d *Dukcapil) Timeout() time.Duration {
if d.TimeoutSecond <= 0 {
return 30 * time.Second
}
return time.Duration(d.TimeoutSecond) * time.Second
}