providerv1beta1

package
v0.0.0-...-6b5d9df Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	OpenRequest_ViewMode_name = map[int32]string{
		0: "VIEW_MODE_INVALID",
		1: "VIEW_MODE_VIEW_ONLY",
		2: "VIEW_MODE_READ_ONLY",
		3: "VIEW_MODE_READ_WRITE",
	}
	OpenRequest_ViewMode_value = map[string]int32{
		"VIEW_MODE_INVALID":    0,
		"VIEW_MODE_VIEW_ONLY":  1,
		"VIEW_MODE_READ_ONLY":  2,
		"VIEW_MODE_READ_WRITE": 3,
	}
)

Enum value maps for OpenRequest_ViewMode.

View Source
var File_cs3_app_provider_v1beta1_provider_api_proto protoreflect.FileDescriptor

Functions

func RegisterProviderAPIHandler

func RegisterProviderAPIHandler(s server.Server, hdlr ProviderAPIHandler, opts ...server.HandlerOption) error

func RegisterProviderAPIServer

func RegisterProviderAPIServer(s *grpc.Server, srv ProviderAPIServer)

Types

type OpenRequest

type OpenRequest struct {

	// OPTIONAL.
	// Opaque information.
	Opaque *v1beta1.Opaque `protobuf:"bytes,1,opt,name=opaque,proto3" json:"opaque,omitempty"`
	// REQUIRED.
	// The resource reference.
	ResourceInfo *v1beta11.ResourceInfo `protobuf:"bytes,2,opt,name=resource_info,json=resourceInfo,proto3" json:"resource_info,omitempty"`
	// REQUIRED.
	// The access token this application provider will use when contacting
	// the storage provider to read and write.
	// Service implementors MUST make sure that the access token only grants
	// access to the requested resource.
	// Service implementors should use a ResourceId rather than a filename to grant access, as
	// ResourceIds MUST NOT change when a resource is renamed.
	// The access token MUST be short-lived.
	// TODO(labkode): investigate token derivation techniques.
	AccessToken string               `protobuf:"bytes,3,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
	ViewMode    OpenRequest_ViewMode `` /* 137-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*OpenRequest) Descriptor deprecated

func (*OpenRequest) Descriptor() ([]byte, []int)

Deprecated: Use OpenRequest.ProtoReflect.Descriptor instead.

func (*OpenRequest) GetAccessToken

func (x *OpenRequest) GetAccessToken() string

func (*OpenRequest) GetOpaque

func (x *OpenRequest) GetOpaque() *v1beta1.Opaque

func (*OpenRequest) GetResourceInfo

func (x *OpenRequest) GetResourceInfo() *v1beta11.ResourceInfo

func (*OpenRequest) GetViewMode

func (x *OpenRequest) GetViewMode() OpenRequest_ViewMode

func (*OpenRequest) ProtoMessage

func (*OpenRequest) ProtoMessage()

func (*OpenRequest) ProtoReflect

func (x *OpenRequest) ProtoReflect() protoreflect.Message

func (*OpenRequest) Reset

func (x *OpenRequest) Reset()

func (*OpenRequest) String

func (x *OpenRequest) String() string

type OpenRequest_ViewMode

type OpenRequest_ViewMode int32

REQUIRED. View mode.

const (
	OpenRequest_VIEW_MODE_INVALID OpenRequest_ViewMode = 0
	// The file can be opened but not downloaded.
	OpenRequest_VIEW_MODE_VIEW_ONLY OpenRequest_ViewMode = 1
	// The file can be downloaded.
	OpenRequest_VIEW_MODE_READ_ONLY OpenRequest_ViewMode = 2
	// The file can be downloaded and updated.
	OpenRequest_VIEW_MODE_READ_WRITE OpenRequest_ViewMode = 3
)

func (OpenRequest_ViewMode) Descriptor

func (OpenRequest_ViewMode) Enum

func (OpenRequest_ViewMode) EnumDescriptor deprecated

func (OpenRequest_ViewMode) EnumDescriptor() ([]byte, []int)

Deprecated: Use OpenRequest_ViewMode.Descriptor instead.

func (OpenRequest_ViewMode) Number

func (OpenRequest_ViewMode) String

func (x OpenRequest_ViewMode) String() string

func (OpenRequest_ViewMode) Type

type OpenResponse

type OpenResponse struct {

	// REQUIRED.
	// The response status.
	Status *v1beta12.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// OPTIONAL.
	// Opaque information.
	Opaque *v1beta1.Opaque `protobuf:"bytes,2,opt,name=opaque,proto3" json:"opaque,omitempty"`
	// REQUIRED.
	// The url that user agents will render to clients.
	// Usually the rendering happens by using HTML iframes,
	// at least, Office 365, Collabora, OnlyOffice do like that.
	IframeUrl string `protobuf:"bytes,3,opt,name=iframe_url,json=iframeUrl,proto3" json:"iframe_url,omitempty"`
	// contains filtered or unexported fields
}

func (*OpenResponse) Descriptor deprecated

func (*OpenResponse) Descriptor() ([]byte, []int)

Deprecated: Use OpenResponse.ProtoReflect.Descriptor instead.

func (*OpenResponse) GetIframeUrl

func (x *OpenResponse) GetIframeUrl() string

func (*OpenResponse) GetOpaque

func (x *OpenResponse) GetOpaque() *v1beta1.Opaque

func (*OpenResponse) GetStatus

func (x *OpenResponse) GetStatus() *v1beta12.Status

func (*OpenResponse) ProtoMessage

func (*OpenResponse) ProtoMessage()

func (*OpenResponse) ProtoReflect

func (x *OpenResponse) ProtoReflect() protoreflect.Message

func (*OpenResponse) Reset

func (x *OpenResponse) Reset()

func (*OpenResponse) String

func (x *OpenResponse) String() string

type ProviderAPIClient

type ProviderAPIClient interface {
	// Returns the iframe url
	// MUST return CODE_NOT_FOUND if the resource does not exist.
	Open(ctx context.Context, in *OpenRequest, opts ...grpc.CallOption) (*OpenResponse, error)
}

ProviderAPIClient is the client API for ProviderAPI service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type ProviderAPIHandler

type ProviderAPIHandler interface {
	// Returns the iframe url
	// MUST return CODE_NOT_FOUND if the resource does not exist.
	Open(context.Context, *OpenRequest, *OpenResponse) error
}

type ProviderAPIServer

type ProviderAPIServer interface {
	// Returns the iframe url
	// MUST return CODE_NOT_FOUND if the resource does not exist.
	Open(context.Context, *OpenRequest) (*OpenResponse, error)
}

ProviderAPIServer is the server API for ProviderAPI service.

type ProviderAPIService

type ProviderAPIService interface {
	// Returns the iframe url
	// MUST return CODE_NOT_FOUND if the resource does not exist.
	Open(ctx context.Context, in *OpenRequest, opts ...client.CallOption) (*OpenResponse, error)
}

func NewProviderAPIService

func NewProviderAPIService(name string, c client.Client) ProviderAPIService

type UnimplementedProviderAPIServer

type UnimplementedProviderAPIServer struct {
}

UnimplementedProviderAPIServer can be embedded to have forward compatible implementations.

func (*UnimplementedProviderAPIServer) Open

Jump to

Keyboard shortcuts

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