Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(sdk): add assertion to tdf - phase1 #575

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

sujankota
Copy link
Contributor

No description provided.

)

func (a AssertionType) String() string {
return [...]string{"Handling", "Base"}[a]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spread these out so we have clean blames for new enum values

Suggested change
return [...]string{"Handling", "Base"}[a]
return [...]string{
"Handling",
"Base",
}[a]

sdk/assertion.go Outdated
Comment on lines 53 to 55
func (s StatementType) String() string {
return [...]string{"ReferenceStatement", "StructuredStatement", "StringStatement",
"Base64BinaryStatement", "XMLBase64", "HandlingStatement", "String"}[s]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
func (s StatementType) String() string {
return [...]string{"ReferenceStatement", "StructuredStatement", "StringStatement",
"Base64BinaryStatement", "XMLBase64", "HandlingStatement", "String"}[s]
func (s StatementType) String() string {
return [...]string{
"ReferenceStatement",
"StructuredStatement",
"StringStatement",
"Base64BinaryStatement",
"XMLBase64",
"HandlingStatement",
"String",
}[s]

sdk/assertion.go Outdated
)

func (s Scope) String() string {
return [...]string{"TDO", "PAYL", "EXPLICIT"}[s]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return [...]string{"TDO", "PAYL", "EXPLICIT"}[s]
return [...]string{
"TDO",
"PAYL",
"EXPLICIT",
}[s]

sdk/assertion.go Outdated
)

func (a AppliesToState) String() string {
return [...]string{"encrypted", "unencrypted"}[a]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return [...]string{"encrypted", "unencrypted"}[a]
return [...]string{
"encrypted",
"unencrypted",
}[a]

@@ -51,9 +51,29 @@ type EncryptionInformation struct {
IntegrityInformation `json:"integrityInformation"`
}

type Statement struct {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a spec link you can drop here so I or someone familiar can validate this?

Is this right: http://www.datypic.com/sc/ic/e-tdf_StructuredStatement-1.html

sdk/manifest.go Outdated
Value string `json:"value"`
Filename string `json:"filename,omitempty"`
MediaType string `json:"mediaType,omitempty"`
Uri string `json:"uri,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the linter errors here for URI and ID needing to be capitalized if appropriate

@sujankota sujankota requested review from a team as code owners April 26, 2024 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants