v1

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Overview

Package v1 contains the integration API of Bucket service.

Index

Constants

View Source
const (

	// PermissionBucketServiceBucketExists is needed to checks if the specified bucket exists
	PermissionBucketServiceBucketExists = "bucketservice.bucket.exists"
	// PermissionBucketServiceBucketCreate is needed to create a bucket
	PermissionBucketServiceBucketCreate = "bucketservice.bucket.create"
	// PermissionBucketServiceBucketDelete is needed to delete a bucket
	PermissionBucketServiceBucketDelete = "bucketservice.bucket.delete"
)
View Source
const (

	// PermissionBucketServiceBucketPathGetRepositoryURL is needed to get the URL needed to store/delete objects in a bucket
	PermissionBucketServiceBucketPathGetRepositoryURL = "bucketservice.bucketpath.get-repository-url"
	// PermissionBucketServiceBucketPathDelete is needed to delete the specified path (recursively) from the provided bucket
	PermissionBucketServiceBucketPathDelete = "bucketservice.bucketpath.delete"
	// PermissionBucketServiceBucketPathGetSize is needed to get the size of a certain path in a bucket
	PermissionBucketServiceBucketPathGetSize = "bucketservice.bucketpath.get-size"
)
View Source
const (

	// PermissionBucketServiceBucketObjectRead is needed to read an object from a bucket
	PermissionBucketServiceBucketObjectRead = "bucketservice.bucketobject.read"
	// PermissionBucketServiceBucketObjectWrite is needed to write an object in a bucket
	PermissionBucketServiceBucketObjectWrite = "bucketservice.bucketobject.write"
	// PermissionBucketServiceBucketObjectGetInfo is needed to get the information of an object in a bucket
	PermissionBucketServiceBucketObjectGetInfo = "bucketservice.bucketobject.get-info"
)
View Source
const (
	// APIIDBucketService contains identifier of this API
	APIIDBucketService = "bucketservice/v1"
	// APIMajorVersion contains major version of this API
	APIMajorVersion = 1
	// APIMinorVersion contains minor version of this API
	APIMinorVersion = 1
	// APIPatchVersion contains patch version of this API
	APIPatchVersion = 0
)

Variables

View Source
var File_bucketservice_proto protoreflect.FileDescriptor

Functions

func RegisterBucketServiceServer

func RegisterBucketServiceServer(s *grpc.Server, srv BucketServiceServer)

Types

type BucketRequest

type BucketRequest struct {

	// Key-value pairs stored at the providers (as labels/tags) during CreateBucket
	Tags []*v1.KeyValuePair `protobuf:"bytes,10,rep,name=tags,proto3" json:"tags,omitempty"`
	// contains filtered or unexported fields
}

Request params for Bucket related calls

func (*BucketRequest) Descriptor deprecated

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

Deprecated: Use BucketRequest.ProtoReflect.Descriptor instead.

func (*BucketRequest) GetTags

func (x *BucketRequest) GetTags() []*v1.KeyValuePair

func (*BucketRequest) ProtoMessage

func (*BucketRequest) ProtoMessage()

func (*BucketRequest) ProtoReflect added in v0.2.0

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

func (*BucketRequest) Reset

func (x *BucketRequest) Reset()

func (*BucketRequest) String

func (x *BucketRequest) String() string

type BucketServiceClient

type BucketServiceClient interface {
	// Get the current API version of this service.
	// Required permissions:
	// - None
	GetAPIVersion(ctx context.Context, in *v11.Empty, opts ...grpc.CallOption) (*v11.Version, error)
	// BucketExists checks if the specified bucket exists
	// Required permissions:
	// - bucketservice.bucket.exists globally
	BucketExists(ctx context.Context, in *BucketRequest, opts ...grpc.CallOption) (*v11.YesOrNo, error)
	// CreateBucket creates a bucket
	// Required permissions:
	// - bucketservice.bucket.create globally
	CreateBucket(ctx context.Context, in *BucketRequest, opts ...grpc.CallOption) (*v11.Empty, error)
	// DeleteBucket deletes a bucket
	// Notice that this deletes all data contained in the bucket as well
	// Required permissions:
	// - bucketservice.bucket.delete globally
	DeleteBucket(ctx context.Context, in *BucketRequest, opts ...grpc.CallOption) (*v11.Empty, error)
	// GetRepositoryURL get the URL needed to store/delete objects in a bucket
	// Required permissions:
	// - bucketservice.bucketpath.get-repository-url globally
	GetRepositoryURL(ctx context.Context, in *PathRequest, opts ...grpc.CallOption) (*RepositoryURL, error)
	// DeletePath deletes the specified path (recursively) from the provided bucket
	// Required permissions:
	// - bucketservice.bucketpath.delete globally
	DeletePath(ctx context.Context, in *PathRequest, opts ...grpc.CallOption) (*v11.Empty, error)
	// GetPathSize provides the size in bytes for the specified path from the provided bucket
	// Required permissions:
	// - bucketservice.bucketpath.get-size globally
	GetPathSize(ctx context.Context, in *PathRequest, opts ...grpc.CallOption) (*PathSize, error)
	// ReadObject opens an object in the bucket and streams the existing data from the object into the client
	// Required permissions:
	// - bucketservice.bucketobject.read globally
	ReadObject(ctx context.Context, in *PathRequest, opts ...grpc.CallOption) (BucketService_ReadObjectClient, error)
	// CreateObject creates or opens an object in the bucket and allows the client to stream (additional) data into the object
	// Required permissions:
	// - bucketservice.bucketobject.write globally
	WriteObject(ctx context.Context, opts ...grpc.CallOption) (BucketService_WriteObjectClient, error)
	// GetObjectInfo provides information for the specified object from the provided bucket
	// A Not-Found error is returned if the object cannot be found
	// Required permissions:
	// - bucketservice.bucketobject.get-info globally
	GetObjectInfo(ctx context.Context, in *PathRequest, opts ...grpc.CallOption) (*ObjectInfo, error)
}

BucketServiceClient is the client API for BucketService service.

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

type BucketServiceServer

type BucketServiceServer interface {
	// Get the current API version of this service.
	// Required permissions:
	// - None
	GetAPIVersion(context.Context, *v11.Empty) (*v11.Version, error)
	// BucketExists checks if the specified bucket exists
	// Required permissions:
	// - bucketservice.bucket.exists globally
	BucketExists(context.Context, *BucketRequest) (*v11.YesOrNo, error)
	// CreateBucket creates a bucket
	// Required permissions:
	// - bucketservice.bucket.create globally
	CreateBucket(context.Context, *BucketRequest) (*v11.Empty, error)
	// DeleteBucket deletes a bucket
	// Notice that this deletes all data contained in the bucket as well
	// Required permissions:
	// - bucketservice.bucket.delete globally
	DeleteBucket(context.Context, *BucketRequest) (*v11.Empty, error)
	// GetRepositoryURL get the URL needed to store/delete objects in a bucket
	// Required permissions:
	// - bucketservice.bucketpath.get-repository-url globally
	GetRepositoryURL(context.Context, *PathRequest) (*RepositoryURL, error)
	// DeletePath deletes the specified path (recursively) from the provided bucket
	// Required permissions:
	// - bucketservice.bucketpath.delete globally
	DeletePath(context.Context, *PathRequest) (*v11.Empty, error)
	// GetPathSize provides the size in bytes for the specified path from the provided bucket
	// Required permissions:
	// - bucketservice.bucketpath.get-size globally
	GetPathSize(context.Context, *PathRequest) (*PathSize, error)
	// ReadObject opens an object in the bucket and streams the existing data from the object into the client
	// Required permissions:
	// - bucketservice.bucketobject.read globally
	ReadObject(*PathRequest, BucketService_ReadObjectServer) error
	// CreateObject creates or opens an object in the bucket and allows the client to stream (additional) data into the object
	// Required permissions:
	// - bucketservice.bucketobject.write globally
	WriteObject(BucketService_WriteObjectServer) error
	// GetObjectInfo provides information for the specified object from the provided bucket
	// A Not-Found error is returned if the object cannot be found
	// Required permissions:
	// - bucketservice.bucketobject.get-info globally
	GetObjectInfo(context.Context, *PathRequest) (*ObjectInfo, error)
}

BucketServiceServer is the server API for BucketService service.

type BucketService_ReadObjectClient

type BucketService_ReadObjectClient interface {
	Recv() (*ReadObjectChunk, error)
	grpc.ClientStream
}

type BucketService_ReadObjectServer

type BucketService_ReadObjectServer interface {
	Send(*ReadObjectChunk) error
	grpc.ServerStream
}

type BucketService_WriteObjectClient

type BucketService_WriteObjectClient interface {
	Send(*WriteObjectChunk) error
	Recv() (*WriteObjectControl, error)
	grpc.ClientStream
}

type BucketService_WriteObjectServer

type BucketService_WriteObjectServer interface {
	Send(*WriteObjectControl) error
	Recv() (*WriteObjectChunk, error)
	grpc.ServerStream
}

type ObjectInfo

type ObjectInfo struct {

	// Indicates if the object is locked
	IsLocked bool `protobuf:"varint,1,opt,name=is_locked,json=isLocked,proto3" json:"is_locked,omitempty"`
	// Indicates the size of the object in bytes
	SizeInBytes uint64 `protobuf:"varint,2,opt,name=size_in_bytes,json=sizeInBytes,proto3" json:"size_in_bytes,omitempty"`
	// The timestamp this object has last been modified
	LastUpdatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=last_updated_at,json=lastUpdatedAt,proto3" json:"last_updated_at,omitempty"`
	// contains filtered or unexported fields
}

Response from GetObjectInfo request

func (*ObjectInfo) Descriptor deprecated

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

Deprecated: Use ObjectInfo.ProtoReflect.Descriptor instead.

func (*ObjectInfo) GetIsLocked

func (x *ObjectInfo) GetIsLocked() bool

func (*ObjectInfo) GetLastUpdatedAt

func (x *ObjectInfo) GetLastUpdatedAt() *timestamppb.Timestamp

func (*ObjectInfo) GetSizeInBytes

func (x *ObjectInfo) GetSizeInBytes() uint64

func (*ObjectInfo) ProtoMessage

func (*ObjectInfo) ProtoMessage()

func (*ObjectInfo) ProtoReflect added in v0.2.0

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

func (*ObjectInfo) Reset

func (x *ObjectInfo) Reset()

func (*ObjectInfo) String

func (x *ObjectInfo) String() string

type PathRequest

type PathRequest struct {

	// The path (Specify as "." to indicate the root folder)
	Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"`
	// contains filtered or unexported fields
}

Request params for Path related requests

func (*PathRequest) Descriptor deprecated

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

Deprecated: Use PathRequest.ProtoReflect.Descriptor instead.

func (*PathRequest) GetPath

func (x *PathRequest) GetPath() string

func (*PathRequest) ProtoMessage

func (*PathRequest) ProtoMessage()

func (*PathRequest) ProtoReflect added in v0.2.0

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

func (*PathRequest) Reset

func (x *PathRequest) Reset()

func (*PathRequest) String

func (x *PathRequest) String() string

type PathSize

type PathSize struct {

	// The size in bytes
	SizeInBytes uint64 `protobuf:"varint,1,opt,name=size_in_bytes,json=sizeInBytes,proto3" json:"size_in_bytes,omitempty"`
	// Number of files
	NumberOfFiles uint32 `protobuf:"varint,2,opt,name=number_of_files,json=numberOfFiles,proto3" json:"number_of_files,omitempty"`
	// Number of folders
	NumberOfFolders uint32 `protobuf:"varint,3,opt,name=number_of_folders,json=numberOfFolders,proto3" json:"number_of_folders,omitempty"`
	// contains filtered or unexported fields
}

Response from GetPathSize request

func (*PathSize) Descriptor deprecated

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

Deprecated: Use PathSize.ProtoReflect.Descriptor instead.

func (*PathSize) GetNumberOfFiles

func (x *PathSize) GetNumberOfFiles() uint32

func (*PathSize) GetNumberOfFolders

func (x *PathSize) GetNumberOfFolders() uint32

func (*PathSize) GetSizeInBytes

func (x *PathSize) GetSizeInBytes() uint64

func (*PathSize) ProtoMessage

func (*PathSize) ProtoMessage()

func (*PathSize) ProtoReflect added in v0.2.0

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

func (*PathSize) Reset

func (x *PathSize) Reset()

func (*PathSize) String

func (x *PathSize) String() string

type ReadObjectChunk

type ReadObjectChunk struct {

	// Raw output
	Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"`
	// contains filtered or unexported fields
}

Output message for ReadObject.

func (*ReadObjectChunk) Descriptor deprecated

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

Deprecated: Use ReadObjectChunk.ProtoReflect.Descriptor instead.

func (*ReadObjectChunk) GetChunk

func (x *ReadObjectChunk) GetChunk() []byte

func (*ReadObjectChunk) ProtoMessage

func (*ReadObjectChunk) ProtoMessage()

func (*ReadObjectChunk) ProtoReflect added in v0.2.0

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

func (*ReadObjectChunk) Reset

func (x *ReadObjectChunk) Reset()

func (*ReadObjectChunk) String

func (x *ReadObjectChunk) String() string

type RepositoryURL

type RepositoryURL struct {

	// The URL
	Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	// The URL without provider information
	BucketPath string `protobuf:"bytes,2,opt,name=bucket_path,json=bucketPath,proto3" json:"bucket_path,omitempty"`
	// contains filtered or unexported fields
}

Response from GetRepositoryURL request

func (*RepositoryURL) Descriptor deprecated

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

Deprecated: Use RepositoryURL.ProtoReflect.Descriptor instead.

func (*RepositoryURL) GetBucketPath

func (x *RepositoryURL) GetBucketPath() string

func (*RepositoryURL) GetUrl

func (x *RepositoryURL) GetUrl() string

func (*RepositoryURL) ProtoMessage

func (*RepositoryURL) ProtoMessage()

func (*RepositoryURL) ProtoReflect added in v0.2.0

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

func (*RepositoryURL) Reset

func (x *RepositoryURL) Reset()

func (*RepositoryURL) String

func (x *RepositoryURL) String() string

type UnimplementedBucketServiceServer

type UnimplementedBucketServiceServer struct {
}

UnimplementedBucketServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedBucketServiceServer) BucketExists

func (*UnimplementedBucketServiceServer) CreateBucket

func (*UnimplementedBucketServiceServer) DeleteBucket

func (*UnimplementedBucketServiceServer) DeletePath

func (*UnimplementedBucketServiceServer) GetAPIVersion

func (*UnimplementedBucketServiceServer) GetObjectInfo

func (*UnimplementedBucketServiceServer) GetPathSize

func (*UnimplementedBucketServiceServer) GetRepositoryURL

func (*UnimplementedBucketServiceServer) ReadObject

func (*UnimplementedBucketServiceServer) WriteObject

type WriteObjectChunk

type WriteObjectChunk struct {

	// Base request params for Path related requests.
	// This field cannot change during the stream.
	Path *PathRequest `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	// Raw input
	Chunk []byte `protobuf:"bytes,2,opt,name=chunk,proto3" json:"chunk,omitempty"`
	// If set, the caller wants to send a next message with more input data.
	// If not set, no more control message will be sent.
	HasMore bool `protobuf:"varint,3,opt,name=has_more,json=hasMore,proto3" json:"has_more,omitempty"`
	// contains filtered or unexported fields
}

Input message for WriteObject

func (*WriteObjectChunk) Descriptor deprecated

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

Deprecated: Use WriteObjectChunk.ProtoReflect.Descriptor instead.

func (*WriteObjectChunk) GetChunk

func (x *WriteObjectChunk) GetChunk() []byte

func (*WriteObjectChunk) GetHasMore

func (x *WriteObjectChunk) GetHasMore() bool

func (*WriteObjectChunk) GetPath

func (x *WriteObjectChunk) GetPath() *PathRequest

func (*WriteObjectChunk) ProtoMessage

func (*WriteObjectChunk) ProtoMessage()

func (*WriteObjectChunk) ProtoReflect added in v0.2.0

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

func (*WriteObjectChunk) Reset

func (x *WriteObjectChunk) Reset()

func (*WriteObjectChunk) String

func (x *WriteObjectChunk) String() string

type WriteObjectControl

type WriteObjectControl struct {

	// If set, the next chunk of input is allowed.
	// If unset, the caller is expected to terminate the call.
	AllowMoreOutput bool `protobuf:"varint,1,opt,name=allow_more_output,json=allowMoreOutput,proto3" json:"allow_more_output,omitempty"`
	// Maximum number of bytes the caller is allowed to send in the next input chunk.
	MaxChunkBytes int32 `protobuf:"varint,2,opt,name=max_chunk_bytes,json=maxChunkBytes,proto3" json:"max_chunk_bytes,omitempty"`
	// contains filtered or unexported fields
}

Output message for WriteObject

func (*WriteObjectControl) Descriptor deprecated

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

Deprecated: Use WriteObjectControl.ProtoReflect.Descriptor instead.

func (*WriteObjectControl) GetAllowMoreOutput

func (x *WriteObjectControl) GetAllowMoreOutput() bool

func (*WriteObjectControl) GetMaxChunkBytes

func (x *WriteObjectControl) GetMaxChunkBytes() int32

func (*WriteObjectControl) ProtoMessage

func (*WriteObjectControl) ProtoMessage()

func (*WriteObjectControl) ProtoReflect added in v0.2.0

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

func (*WriteObjectControl) Reset

func (x *WriteObjectControl) Reset()

func (*WriteObjectControl) String

func (x *WriteObjectControl) String() string

Jump to

Keyboard shortcuts

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