ocmd

package
v2.24.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(m map[string]interface{}, log *zerolog.Logger) (global.Service, error)

New returns a new ocmd object, that implements the OCM APIs specified in https://cs3org.github.io/OCM-API/docs.html

Types

type Datatx added in v2.17.0

type Datatx struct {
	SharedSecret string `json:"sharedSecret" validate:"required"`
	SourceURI    string `json:"srcUri" validate:"required"`
	Size         uint64 `json:"size" validate:"required"`
}

Datatx contains the parameters for the Datatx protocol.

func (*Datatx) ToOCMProtocol added in v2.17.0

func (w *Datatx) ToOCMProtocol() *ocm.Protocol

ToOCMProtocol convert the protocol to a ocm Protocol struct.

type Protocol added in v2.17.0

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 added in v2.17.0

type Protocols []Protocol

Protocols is the list of protocols.

func (Protocols) MarshalJSON added in v2.17.0

func (p Protocols) MarshalJSON() ([]byte, error)

MarshalJSON implements the Marshaler interface.

func (*Protocols) UnmarshalJSON added in v2.17.0

func (p *Protocols) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the Unmarshaler interface.

type WebDAV added in v2.17.0

type WebDAV struct {
	SharedSecret string   `json:"sharedSecret" validate:"required"`
	Permissions  []string `json:"permissions" validate:"required,dive,required,oneof=read write share"`
	URL          string   `json:"url" validate:"required"`
}

WebDAV contains the parameters for the WebDAV protocol.

func (*WebDAV) ToOCMProtocol added in v2.17.0

func (w *WebDAV) ToOCMProtocol() *ocm.Protocol

ToOCMProtocol convert the protocol to a ocm Protocol struct.

type Webapp added in v2.17.0

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 added in v2.17.0

func (w *Webapp) ToOCMProtocol() *ocm.Protocol

ToOCMProtocol convert the protocol to a ocm Protocol struct.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL