-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
2,986 additions
and
2,885 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,51 @@ | ||
package attributes | ||
|
||
type AttributeType string | ||
type AttributeContentType string | ||
|
||
// AttributeType constants. These are the types of attributes that can be used in the rules. | ||
const ( | ||
STRING AttributeType = "string" | ||
INTEGER AttributeType = "integer" | ||
BOOLEAN AttributeType = "boolean" | ||
STRING AttributeContentType = "string" | ||
INTEGER AttributeContentType = "integer" | ||
BOOLEAN AttributeContentType = "boolean" | ||
) | ||
|
||
const ( | ||
DATA AttributeType = "data" | ||
INFO AttributeType = "group" | ||
GROUP AttributeType = "info" | ||
) | ||
|
||
// Attribute is a single attribute that can be used in the rules. | ||
type ( | ||
Attributes struct { | ||
UUID string `json:"uuid,omitempty"` | ||
Name string `json:"name,omitempty"` | ||
Label string `json:"label,omitempty"` | ||
Type AttributeType `json:"type,omitempty"` | ||
Required bool `json:"required,omitempty"` | ||
ReadOnly bool `json:"readOnly,omitempty"` | ||
Editable bool `json:"editable,omitempty"` | ||
Visible bool `json:"visible,omitempty"` | ||
MultiSelect bool `json:"multiSelect,omitempty"` | ||
Description bool `json:"description,omitempty"` | ||
Content interface{} `json:"content,omitempty"` | ||
List bool `json:"list"` | ||
UUID string `json:"uuid,omitempty"` | ||
Name string `json:"name,omitempty"` | ||
Type AttributeType `json:"type,omitempty"` | ||
ContentType AttributeContentType `json:"content_type,omitempty"` | ||
Description string `json:"description,omitempty"` | ||
Properties AttributeProperties `json:"properties,omitempty"` | ||
Content []BaseAttributeContent `json:"content,omitempty"` | ||
} | ||
|
||
AttributeProperties struct { | ||
Label string `json:"label,omitempty"` | ||
Required bool `json:"required,omitempty"` | ||
ReadOnly bool `json:"readOnly,omitempty"` | ||
Editable bool `json:"editable,omitempty"` | ||
Visible bool `json:"visible,omitempty"` | ||
MultiSelect bool `json:"multi,omitempty"` | ||
List bool `json:"list"` | ||
} | ||
|
||
// BaseAttributeContent for the values of attributes | ||
BaseAttributeContent struct { | ||
Value interface{} `json:"value"` | ||
Data interface{} `json:"data,omitempty"` | ||
} | ||
|
||
RequestAttributes struct { | ||
Name string `json:"name"` | ||
UUID string `json:"uuid"` | ||
Content interface{} `json:"content"` | ||
Name string `json:"name"` | ||
UUID string `json:"uuid"` | ||
Content []BaseAttributeContent `json:"content"` | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,4 @@ server: | |
|
||
# Logger related configurations | ||
log: | ||
level: INFO | ||
level: PANIC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/sh | ||
|
||
czertainlyHome="/opt/czertainly" | ||
source ${czertainlyHome}/static-functions | ||
|
||
log "INFO" "Launching X.509 Compliance Provider" | ||
./appbin | ||
|
||
#exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
log() { | ||
# 2022-02-08 15:49:15 | ||
dateString="$(date +%F' '%T)" | ||
logLevel=$(printf '%-5s' "${1:-INFO}") | ||
className="$0" | ||
processId="$$" | ||
#threadId="$(ps H -o 'tid' $processId | tail -n 1| tr -d ' ')" | ||
if [ -z "$2" ] ; then | ||
while read line ; do | ||
echo "[$dateString] $logLevel [$className] (process:$processId) ${line}" | ||
done | ||
else | ||
echo "[$dateString] $logLevel [$className] (process:$processId) ${2}" | ||
fi | ||
} |
Oops, something went wrong.