Skip to content

Commit

Permalink
Added ocm 1.2 optional fields (unused for now)
Browse files Browse the repository at this point in the history
  • Loading branch information
glpatcern committed Feb 13, 2025
1 parent d8ff782 commit 7f69c85
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/http/services/opencloudmesh/ocmd/specs.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ type Protocol interface {
type WebDAV struct {
SharedSecret string `json:"sharedSecret" validate:"required"`
Permissions []string `json:"permissions" validate:"required,dive,required,oneof=read write share"`
Requirements []string `json:"requirements"`
URI string `json:"uri" validate:"required"`
}

Expand Down Expand Up @@ -135,8 +136,9 @@ func (w *WebDAV) ToOCMProtocol() *ocm.Protocol {

// Webapp contains the parameters for the Webapp protocol.
type Webapp struct {
URI string `json:"uri" validate:"required"`
ViewMode string `json:"viewMode" validate:"required,dive,required,oneof=view read write"`
URI string `json:"uri" validate:"required"`
ViewMode string `json:"viewMode" validate:"required,dive,required,oneof=view read write"`
SharedSecret string `json:"sharedSecret"`
}

// ToOCMProtocol convert the protocol to a ocm Protocol struct.
Expand Down

0 comments on commit 7f69c85

Please sign in to comment.