Skip to content

Commit

Permalink
subrequests: normalize json fields to lowercase
Browse files Browse the repository at this point in the history
Signed-off-by: Tonis Tiigi <[email protected]>
  • Loading branch information
tonistiigi committed Aug 5, 2022
1 parent f7bbe2f commit d1b0d8a
Show file tree
Hide file tree
Showing 4 changed files with 184 additions and 184 deletions.
24 changes: 12 additions & 12 deletions frontend/subrequests/outline/outline.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,27 +60,27 @@ func (o Outline) ToResult() (*client.Result, error) {
}

type Arg struct {
Name string
Description string
Value string
Location *pb.Location
Name string `json:"name"`
Description string `json:"description,omitempty"`
Value string `json:"value,omitempty"`
Location *pb.Location `json:"location,omitempty"`
}

type Secret struct {
Name string
Required bool
Location *pb.Location
Name string `json:"name"`
Required bool `json:"required,omitempty"`
Location *pb.Location `json:"location,omitempty"`
}

type SSH struct {
Name string
Required bool
Location *pb.Location
Name string `json:"name"`
Required bool `json:"required,omitempty"`
Location *pb.Location `json:"location,omitempty"`
}

type CacheMount struct {
ID string
Location *pb.Location
ID string `json:"ID"`
Location *pb.Location `json:"location,omitempty"`
}

func PrintOutline(dt []byte, w io.Writer) error {
Expand Down
16 changes: 8 additions & 8 deletions frontend/subrequests/targets/targets.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ var SubrequestsTargetsDefinition = subrequests.Request{
}

type List struct {
Targets []Target
Sources [][]byte
Targets []Target `json:"targets"`
Sources [][]byte `json:"sources"`
}

func (l List) ToResult() (*client.Result, error) {
Expand All @@ -50,12 +50,12 @@ func (l List) ToResult() (*client.Result, error) {
}

type Target struct {
Name string `json:"name,omitempty"`
Default bool `json:"default,omitempty"`
Description string `json:"description,omitempty"`
Base string `json:"base,omitempty"`
Platform string `json:"platform,omitempty"`
Location *pb.Location
Name string `json:"name,omitempty"`
Default bool `json:"default,omitempty"`
Description string `json:"description,omitempty"`
Base string `json:"base,omitempty"`
Platform string `json:"platform,omitempty"`
Location *pb.Location `json:"location,omitempty"`
}

func PrintTargets(dt []byte, w io.Writer) error {
Expand Down
Loading

0 comments on commit d1b0d8a

Please sign in to comment.