Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DirectoryService ¶ added in v2.40.0
type DirectoryService struct {
Federation string `json:"federation"`
Servers []DirectoryServiceServer `json:"servers"`
}
DirectoryService represents a directory service listing per OCM spec Appendix C.
type DirectoryServiceServer ¶ added in v2.40.0
type DirectoryServiceServer struct {
DisplayName string `json:"displayName"`
URL string `json:"url"`
// Added after discovery, not in raw response
InviteAcceptDialog string `json:"inviteAcceptDialog,omitempty"`
}
DirectoryServiceServer represents a single OCM server in a directory service.
type OCMClient ¶ added in v2.40.0
type OCMClient struct {
// contains filtered or unexported fields
}
OCMClient is the client for an OCM provider.
func (*OCMClient) Discover ¶ added in v2.40.0
func (c *OCMClient) Discover(ctx context.Context, endpoint string) (*wellknown.OcmDiscoveryData, error)
Discover returns the OCM discovery information for a remote endpoint. It tries /.well-known/ocm first, then falls back to /ocm-provider (legacy). https://cs3org.github.io/OCM-API/docs.html?branch=develop&repo=OCM-API&user=cs3org#/paths/~1ocm-provider/get
func (*OCMClient) GetDirectoryService ¶ added in v2.40.0
func (c *OCMClient) GetDirectoryService(ctx context.Context, directoryURL string) (*DirectoryService, error)
GetDirectoryService fetches a directory service listing from the given URL per OCM spec Appendix C.
type Protocol ¶
type Protocol interface {
// ToOCMProtocol convert the protocol to a ocm Protocol struct
ToOCMProtocol() *ocm.Protocol
}
Protocol represents the way of access the resource in the OCM share.
type Protocols ¶
type Protocols []Protocol
Protocols is the list of protocols.
func (Protocols) MarshalJSON ¶
MarshalJSON implements the Marshaler interface.
func (*Protocols) UnmarshalJSON ¶
UnmarshalJSON implements the Unmarshaler interface.
type WebDAV ¶
type WebDAV struct {
Permissions []string `json:"permissions" validate:"required,dive,required,oneof=read write share"`
URI string `json:"uri" validate:"required"`
}
WebDAV contains the parameters for the WebDAV protocol.
func (*WebDAV) ToOCMProtocol ¶
ToOCMProtocol convert the protocol to a ocm Protocol struct.
func (*WebDAV) UnmarshalJSON ¶ added in v2.39.1
UnmarshalJSON implements custom JSON unmarshaling for backward compatibility. It supports both "url" (legacy) and "uri" (new) field names.
type Webapp ¶
type Webapp struct {
URITemplate string `json:"uriTemplate" validate:"required"`
ViewMode string `json:"viewMode" validate:"required,dive,required,oneof=view read write"`
}
Webapp contains the parameters for the Webapp protocol.
func (*Webapp) ToOCMProtocol ¶
ToOCMProtocol convert the protocol to a ocm Protocol struct.