Skip to content

Commit

Permalink
more comments and switch to Unix line separators
Browse files Browse the repository at this point in the history
  • Loading branch information
smrz2001 committed Nov 14, 2021
1 parent 839e273 commit b120c5b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions dagjose/gen/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ func main() {

// -- Decode types -->

// While `Base64Url` is a `String` type and generated through the schema, it has some (surgical) modifications that
// allow it to be treated as a base64url-encoded string "lens" looking at raw, un-encoded bytes being decoded.
ts.Accumulate(schema.SpawnString("Base64Url"))

// JWS
ts.Accumulate(schema.SpawnStruct("DecodedSignature", []schema.StructField{
schema.SpawnStructField("header", "Any", true, false),
Expand Down Expand Up @@ -91,6 +95,10 @@ func main() {

// -- Encode types -->

// While `Raw` is a `Bytes` type and generated through the schema, it has some (surgical) modifications that allow
// it to be treated as a raw, un-encoded bytes "lens" looking at base64url-encoded strings being encoded.
ts.Accumulate(schema.SpawnBytes("Raw"))

// JWS
ts.Accumulate(schema.SpawnStruct("EncodedSignature", []schema.StructField{
schema.SpawnStructField("header", "Any", true, false),
Expand Down

0 comments on commit b120c5b

Please sign in to comment.