@@ -15,11 +15,11 @@
|
|||||||
package cookiebanner
|
package cookiebanner
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"maps"
|
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"maps"
|
||||||
"net/url"
|
"net/url"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
@@ -1746,7 +1746,7 @@ func buildBannerConfig(
|
|||||||
return &BannerConfig{
|
return &BannerConfig{
|
||||||
BannerID: banner.ID,
|
BannerID: banner.ID,
|
||||||
Version: version.Version,
|
Version: version.Version,
|
||||||
Language: resolvedLang,
|
Language: resolvedLang,
|
||||||
DefaultLanguage: defaultLang,
|
DefaultLanguage: defaultLang,
|
||||||
AvailableLanguages: availableLanguages,
|
AvailableLanguages: availableLanguages,
|
||||||
PrivacyPolicyURL: snapshot.PrivacyPolicyURL,
|
PrivacyPolicyURL: snapshot.PrivacyPolicyURL,
|
||||||
|
|||||||
@@ -30,13 +30,13 @@ import (
|
|||||||
|
|
||||||
type (
|
type (
|
||||||
CookieBannerTranslation struct {
|
CookieBannerTranslation struct {
|
||||||
ID gid.GID `db:"id"`
|
ID gid.GID `db:"id"`
|
||||||
OrganizationID gid.GID `db:"organization_id"`
|
OrganizationID gid.GID `db:"organization_id"`
|
||||||
CookieBannerID gid.GID `db:"cookie_banner_id"`
|
CookieBannerID gid.GID `db:"cookie_banner_id"`
|
||||||
Language string `db:"language"`
|
Language string `db:"language"`
|
||||||
Translations json.RawMessage `db:"translations"`
|
Translations json.RawMessage `db:"translations"`
|
||||||
CreatedAt time.Time `db:"created_at"`
|
CreatedAt time.Time `db:"created_at"`
|
||||||
UpdatedAt time.Time `db:"updated_at"`
|
UpdatedAt time.Time `db:"updated_at"`
|
||||||
}
|
}
|
||||||
|
|
||||||
CookieBannerTranslations []*CookieBannerTranslation
|
CookieBannerTranslations []*CookieBannerTranslation
|
||||||
|
|||||||
@@ -30,17 +30,17 @@ import (
|
|||||||
|
|
||||||
type (
|
type (
|
||||||
CookieBannerVersionSnapshot struct {
|
CookieBannerVersionSnapshot struct {
|
||||||
PrivacyPolicyURL string `json:"privacy_policy_url"`
|
PrivacyPolicyURL string `json:"privacy_policy_url"`
|
||||||
ConsentExpiryDays int `json:"consent_expiry_days"`
|
ConsentExpiryDays int `json:"consent_expiry_days"`
|
||||||
ConsentMode string `json:"consent_mode"`
|
ConsentMode string `json:"consent_mode"`
|
||||||
DefaultLanguage string `json:"default_language"`
|
DefaultLanguage string `json:"default_language"`
|
||||||
Categories []CookieBannerVersionSnapshotCategory `json:"categories"`
|
Categories []CookieBannerVersionSnapshotCategory `json:"categories"`
|
||||||
Translations map[string]CookieBannerVersionSnapshotTranslation `json:"translations,omitempty"`
|
Translations map[string]CookieBannerVersionSnapshotTranslation `json:"translations,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
CookieBannerVersionSnapshotTranslation struct {
|
CookieBannerVersionSnapshotTranslation struct {
|
||||||
UI map[string]string `json:"ui"`
|
UI map[string]string `json:"ui"`
|
||||||
Categories []CookieBannerVersionSnapshotCategoryTranslation `json:"categories"`
|
Categories []CookieBannerVersionSnapshotCategoryTranslation `json:"categories"`
|
||||||
}
|
}
|
||||||
|
|
||||||
CookieBannerVersionSnapshotCategoryTranslation struct {
|
CookieBannerVersionSnapshotCategoryTranslation struct {
|
||||||
|
|||||||
Reference in New Issue
Block a user