Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterProviderAPIServer(s grpc.ServiceRegistrar, srv ProviderAPIServer)
- type OpenInAppRequest
- func (*OpenInAppRequest) Descriptor() ([]byte, []int)deprecated
- func (x *OpenInAppRequest) GetAccessToken() string
- func (x *OpenInAppRequest) GetOpaque() *v1beta1.Opaque
- func (x *OpenInAppRequest) GetResourceInfo() *v1beta11.ResourceInfo
- func (x *OpenInAppRequest) GetViewMode() ViewMode
- func (*OpenInAppRequest) ProtoMessage()
- func (x *OpenInAppRequest) ProtoReflect() protoreflect.Message
- func (x *OpenInAppRequest) Reset()
- func (x *OpenInAppRequest) String() string
- type OpenInAppResponse
- func (*OpenInAppResponse) Descriptor() ([]byte, []int)deprecated
- func (x *OpenInAppResponse) GetAppUrl() *OpenInAppURL
- func (x *OpenInAppResponse) GetOpaque() *v1beta1.Opaque
- func (x *OpenInAppResponse) GetStatus() *v1beta12.Status
- func (*OpenInAppResponse) ProtoMessage()
- func (x *OpenInAppResponse) ProtoReflect() protoreflect.Message
- func (x *OpenInAppResponse) Reset()
- func (x *OpenInAppResponse) String() string
- type OpenInAppURL
- func (*OpenInAppURL) Descriptor() ([]byte, []int)deprecated
- func (x *OpenInAppURL) GetAppUrl() string
- func (x *OpenInAppURL) GetFormParameters() map[string]string
- func (x *OpenInAppURL) GetHeaders() map[string]string
- func (x *OpenInAppURL) GetMethod() string
- func (x *OpenInAppURL) GetTarget() Target
- func (*OpenInAppURL) ProtoMessage()
- func (x *OpenInAppURL) ProtoReflect() protoreflect.Message
- func (x *OpenInAppURL) Reset()
- func (x *OpenInAppURL) String() string
- type ProviderAPIClient
- type ProviderAPIServer
- type Target
- type UnimplementedProviderAPIServer
- type UnsafeProviderAPIServer
- type ViewMode
Constants ¶
const (
ProviderAPI_OpenInApp_FullMethodName = "/cs3.app.provider.v1beta1.ProviderAPI/OpenInApp"
)
Variables ¶
var ( ViewMode_name = map[int32]string{ 0: "VIEW_MODE_INVALID", 1: "VIEW_MODE_VIEW_ONLY", 2: "VIEW_MODE_READ_ONLY", 3: "VIEW_MODE_READ_WRITE", 4: "VIEW_MODE_PREVIEW", } ViewMode_value = map[string]int32{ "VIEW_MODE_INVALID": 0, "VIEW_MODE_VIEW_ONLY": 1, "VIEW_MODE_READ_ONLY": 2, "VIEW_MODE_READ_WRITE": 3, "VIEW_MODE_PREVIEW": 4, } )
Enum value maps for ViewMode.
var ( Target_name = map[int32]string{ 0: "TARGET_INVALID", 1: "TARGET_IFRAME", 2: "TARGET_BLANK", } Target_value = map[string]int32{ "TARGET_INVALID": 0, "TARGET_IFRAME": 1, "TARGET_BLANK": 2, } )
Enum value maps for Target.
var File_cs3_app_provider_v1beta1_provider_api_proto protoreflect.FileDescriptor
var File_cs3_app_provider_v1beta1_resources_proto protoreflect.FileDescriptor
var ProviderAPI_ServiceDesc = grpc.ServiceDesc{ ServiceName: "cs3.app.provider.v1beta1.ProviderAPI", HandlerType: (*ProviderAPIServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "OpenInApp", Handler: _ProviderAPI_OpenInApp_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "cs3/app/provider/v1beta1/provider_api.proto", }
ProviderAPI_ServiceDesc is the grpc.ServiceDesc for ProviderAPI service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterProviderAPIServer ¶
func RegisterProviderAPIServer(s grpc.ServiceRegistrar, srv ProviderAPIServer)
Types ¶
type OpenInAppRequest ¶
type OpenInAppRequest struct { // OPTIONAL. // Opaque information. Opaque *v1beta1.Opaque `protobuf:"bytes,1,opt,name=opaque,proto3" json:"opaque,omitempty"` // REQUIRED. // The resourceInfo to be opened. The gateway grpc message has a ref instead. ResourceInfo *v1beta11.ResourceInfo `protobuf:"bytes,2,opt,name=resource_info,json=resourceInfo,proto3" json:"resource_info,omitempty"` // REQUIRED. // View mode. ViewMode ViewMode `protobuf:"varint,3,opt,name=view_mode,json=viewMode,proto3,enum=cs3.app.provider.v1beta1.ViewMode" json:"view_mode,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 filepath 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,4,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` // contains filtered or unexported fields }
func (*OpenInAppRequest) Descriptor
deprecated
func (*OpenInAppRequest) Descriptor() ([]byte, []int)
Deprecated: Use OpenInAppRequest.ProtoReflect.Descriptor instead.
func (*OpenInAppRequest) GetAccessToken ¶
func (x *OpenInAppRequest) GetAccessToken() string
func (*OpenInAppRequest) GetOpaque ¶
func (x *OpenInAppRequest) GetOpaque() *v1beta1.Opaque
func (*OpenInAppRequest) GetResourceInfo ¶
func (x *OpenInAppRequest) GetResourceInfo() *v1beta11.ResourceInfo
func (*OpenInAppRequest) GetViewMode ¶
func (x *OpenInAppRequest) GetViewMode() ViewMode
func (*OpenInAppRequest) ProtoMessage ¶
func (*OpenInAppRequest) ProtoMessage()
func (*OpenInAppRequest) ProtoReflect ¶
func (x *OpenInAppRequest) ProtoReflect() protoreflect.Message
func (*OpenInAppRequest) Reset ¶
func (x *OpenInAppRequest) Reset()
func (*OpenInAppRequest) String ¶
func (x *OpenInAppRequest) String() string
type OpenInAppResponse ¶
type OpenInAppResponse 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 or in separate browser tabs. AppUrl *OpenInAppURL `protobuf:"bytes,3,opt,name=app_url,json=appUrl,proto3" json:"app_url,omitempty"` // contains filtered or unexported fields }
func (*OpenInAppResponse) Descriptor
deprecated
func (*OpenInAppResponse) Descriptor() ([]byte, []int)
Deprecated: Use OpenInAppResponse.ProtoReflect.Descriptor instead.
func (*OpenInAppResponse) GetAppUrl ¶
func (x *OpenInAppResponse) GetAppUrl() *OpenInAppURL
func (*OpenInAppResponse) GetOpaque ¶
func (x *OpenInAppResponse) GetOpaque() *v1beta1.Opaque
func (*OpenInAppResponse) GetStatus ¶
func (x *OpenInAppResponse) GetStatus() *v1beta12.Status
func (*OpenInAppResponse) ProtoMessage ¶
func (*OpenInAppResponse) ProtoMessage()
func (*OpenInAppResponse) ProtoReflect ¶
func (x *OpenInAppResponse) ProtoReflect() protoreflect.Message
func (*OpenInAppResponse) Reset ¶
func (x *OpenInAppResponse) Reset()
func (*OpenInAppResponse) String ¶
func (x *OpenInAppResponse) String() string
type OpenInAppURL ¶
type OpenInAppURL struct { // REQUIRED. // The URL that clients will perform requests to. AppUrl string `protobuf:"bytes,1,opt,name=app_url,json=appUrl,proto3" json:"app_url,omitempty"` // REQUIRED. // The method for the request to be made. // Only GET and POST are supported. Method string `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"` // OPTIONAL. // The form parameters which have to be passed along with the request. // These are sent only if the method is 'POST'. FormParameters map[string]string `` /* 191-byte string literal not displayed */ // OPTIONAL. // The headers to be added to the request. Headers map[string]string `` /* 155-byte string literal not displayed */ // REQUIRED. // Whether the target for the app URL is an iframe or a new page. Target Target `protobuf:"varint,5,opt,name=target,proto3,enum=cs3.app.provider.v1beta1.Target" json:"target,omitempty"` // contains filtered or unexported fields }
Represents the information for the app URL to be called by the clients.
func (*OpenInAppURL) Descriptor
deprecated
func (*OpenInAppURL) Descriptor() ([]byte, []int)
Deprecated: Use OpenInAppURL.ProtoReflect.Descriptor instead.
func (*OpenInAppURL) GetAppUrl ¶
func (x *OpenInAppURL) GetAppUrl() string
func (*OpenInAppURL) GetFormParameters ¶
func (x *OpenInAppURL) GetFormParameters() map[string]string
func (*OpenInAppURL) GetHeaders ¶
func (x *OpenInAppURL) GetHeaders() map[string]string
func (*OpenInAppURL) GetMethod ¶
func (x *OpenInAppURL) GetMethod() string
func (*OpenInAppURL) GetTarget ¶
func (x *OpenInAppURL) GetTarget() Target
func (*OpenInAppURL) ProtoMessage ¶
func (*OpenInAppURL) ProtoMessage()
func (*OpenInAppURL) ProtoReflect ¶
func (x *OpenInAppURL) ProtoReflect() protoreflect.Message
func (*OpenInAppURL) Reset ¶
func (x *OpenInAppURL) Reset()
func (*OpenInAppURL) String ¶
func (x *OpenInAppURL) String() string
type ProviderAPIClient ¶
type ProviderAPIClient interface { // Returns the App URL and all necessary info to open a resource in an online editor. // MUST return CODE_NOT_FOUND if the resource does not exist. OpenInApp(ctx context.Context, in *OpenInAppRequest, opts ...grpc.CallOption) (*OpenInAppResponse, error) }
ProviderAPIClient is the client API for ProviderAPI service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewProviderAPIClient ¶
func NewProviderAPIClient(cc grpc.ClientConnInterface) ProviderAPIClient
type ProviderAPIServer ¶
type ProviderAPIServer interface { // Returns the App URL and all necessary info to open a resource in an online editor. // MUST return CODE_NOT_FOUND if the resource does not exist. OpenInApp(context.Context, *OpenInAppRequest) (*OpenInAppResponse, error) }
ProviderAPIServer is the server API for ProviderAPI service. All implementations should embed UnimplementedProviderAPIServer for forward compatibility
type Target ¶
type Target int32
Defines the valid targets for an app URL.
func (Target) Descriptor ¶
func (Target) Descriptor() protoreflect.EnumDescriptor
func (Target) EnumDescriptor
deprecated
func (Target) Number ¶
func (x Target) Number() protoreflect.EnumNumber
func (Target) Type ¶
func (Target) Type() protoreflect.EnumType
type UnimplementedProviderAPIServer ¶
type UnimplementedProviderAPIServer struct { }
UnimplementedProviderAPIServer should be embedded to have forward compatible implementations.
func (UnimplementedProviderAPIServer) OpenInApp ¶
func (UnimplementedProviderAPIServer) OpenInApp(context.Context, *OpenInAppRequest) (*OpenInAppResponse, error)
type UnsafeProviderAPIServer ¶
type UnsafeProviderAPIServer interface {
// contains filtered or unexported methods
}
UnsafeProviderAPIServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ProviderAPIServer will result in compilation errors.
type ViewMode ¶
type ViewMode int32
Defines the view modes.
const ( ViewMode_VIEW_MODE_INVALID ViewMode = 0 // The resource can be opened but not downloaded. ViewMode_VIEW_MODE_VIEW_ONLY ViewMode = 1 // The resource can be downloaded. ViewMode_VIEW_MODE_READ_ONLY ViewMode = 2 // The resource can be downloaded and updated. The underlying application // MUST be a fully capable editor to support this mode. ViewMode_VIEW_MODE_READ_WRITE ViewMode = 3 // The resource can be downloaded and updated, but must be shown in // preview mode. If the underlying application does not support a preview mode, // or if in a view-only mode users are not allowed to switch to edit mode, // then this mode MUST fall back to READ_WRITE. ViewMode_VIEW_MODE_PREVIEW ViewMode = 4 )
func (ViewMode) Descriptor ¶
func (ViewMode) Descriptor() protoreflect.EnumDescriptor
func (ViewMode) EnumDescriptor
deprecated
func (ViewMode) Number ¶
func (x ViewMode) Number() protoreflect.EnumNumber
func (ViewMode) Type ¶
func (ViewMode) Type() protoreflect.EnumType